Bug 1392371 - Add pref mail.override_list_reply_to to restore reply-to behaviour. r=aceman a=jorgk
--- a/mailnews/compose/src/nsMsgCompose.cpp
+++ b/mailnews/compose/src/nsMsgCompose.cpp
@@ -2501,16 +2501,19 @@ NS_IMETHODIMP QuotingOutputStreamListene
MSG_ComposeType type;
compose->GetType(&type);
// Assign cite information if available...
if (!mCiteReference.IsEmpty())
compose->SetCiteReference(mCiteReference);
+ bool overrideReplyTo =
+ mozilla::Preferences::GetBool("mail.override_list_reply_to", true);
+
if (mHeaders && (type == nsIMsgCompType::Reply ||
type == nsIMsgCompType::ReplyAll ||
type == nsIMsgCompType::ReplyToList ||
type == nsIMsgCompType::ReplyToSender ||
type == nsIMsgCompType::ReplyToGroup ||
type == nsIMsgCompType::ReplyToSenderAndGroup) &&
mQuoteOriginal)
{
@@ -2749,17 +2752,18 @@ NS_IMETHODIMP QuotingOutputStreamListene
// handle Mail-Reply-To (http://cr.yp.to/proto/replyto.html)
compFields->SetTo(mailReplyTo);
needToRemoveDup = true;
}
else if (!replyTo.IsEmpty())
{
// default reply behaviour then
- if (!listPost.IsEmpty() && replyTo.Find(listPost) != kNotFound)
+ if (overrideReplyTo &&
+ !listPost.IsEmpty() && replyTo.Find(listPost) != kNotFound)
{
// Reply-To munging in this list post. Reply to From instead,
// as the user can choose Reply List if that's what he wants.
compFields->SetTo(from);
}
else
{
compFields->SetTo(replyTo);
@@ -2794,17 +2798,18 @@ NS_IMETHODIMP QuotingOutputStreamListene
else if (mailFollowupTo.IsEmpty()) {
// default reply-all behaviour then
nsAutoString allTo;
if (!replyTo.IsEmpty())
{
allTo.Assign(replyTo);
needToRemoveDup = true;
- if (!listPost.IsEmpty() && replyTo.Find(listPost) != kNotFound)
+ if (overrideReplyTo &&
+ !listPost.IsEmpty() && replyTo.Find(listPost) != kNotFound)
{
// Reply-To munging in this list. Add From to recipients, it's the
// lesser evil...
allTo.AppendLiteral(", ");
allTo.Append(from);
}
}
else
--- a/mailnews/mailnews.js
+++ b/mailnews/mailnews.js
@@ -9,16 +9,20 @@ pref("mail.advance_on_spacebar", true);
//mailnews.timeline_is_enabled should be set to true ONLY for perf measurement-timeline builds.
pref("mailnews.timeline_is_enabled", false);
pref("mailnews.logComposePerformance", false);
pref("mail.wrap_long_lines", true);
pref("mail.inline_attachments", true);
pref("mail.reply_quote_inline", false);
+// When in a message the List-Post header contains the content of the Reply-To
+// (which is called "Reply-To Munging") we override the Reply-To header with
+// the From header.
+pref("mail.override_list_reply_to", true);
// hidden pref for controlling if the user agent string
// is displayed in the message pane or not...
pref("mailnews.headers.showUserAgent", false);
// hidden pref for controlling if the organization string
// is displayed in the message pane or not...
pref("mailnews.headers.showOrganization", false);