From 7dd19919d132ae6b7b0446c569d96303d6091a5d Mon Sep 17 00:00:00 2001 From: "Malte S. Stretz" Date: Tue, 29 Jun 2010 18:01:58 +0200 Subject: Added option include_sender_header to suppress rewrite of the Sender header which confuses Outlook (formerly known as FAQ 2.3). See also . Bug #266824. --- Mailman/Handlers/SMTPDirect.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/SMTPDirect.py b/Mailman/Handlers/SMTPDirect.py index 8e3c7d73..1930a549 100644 --- a/Mailman/Handlers/SMTPDirect.py +++ b/Mailman/Handlers/SMTPDirect.py @@ -355,10 +355,26 @@ def bulkdeliver(mlist, msg, msgdata, envsender, failures, conn): # the Sender header at all. Brad Knowles points out that MTAs tend to # wipe existing Return-Path headers, and old MTAs may still honor # Errors-To while new ones will at worst ignore the header. - del msg['sender'] + # + # With some MUAs (eg. Outlook 2003) rewriting the Sender header with our + # envelope sender causes more problems than it solves, because some will + # include the Sender address in a reply-to-all, which is not only + # confusing to subscribers, but can actually disable/unsubscribe them from + # lists, depending on how often they accidentally reply to it. Also, when + # forwarding mail inline, the sender is replaced with the string "Full + # Name (on behalf bounce@addr.ess)", essentially losing the original + # sender address. + # + # The drawback of not touching the Sender: header is that some MTAs might + # still send bounces to it, so by not trapping it, we can miss bounces. + # (Or worse, MTAs might send bounces to the From: address if they can't + # find a Sender: header.) So instead of completely disabling the sender + # rewriting, we offer an option to disable it. del msg['errors-to'] - msg['Sender'] = envsender msg['Errors-To'] = envsender + if mlist.include_sender_header: + del msg['sender'] + msg['Sender'] = envsender # Get the plain, flattened text of the message, sans unixfrom # using our as_string() method to not mangle From_ and not fold # sub-part headers possibly breaking signatures. -- cgit v1.2.3