diff options
author | Malte S. Stretz <mss@apache.org> | 2010-06-29 18:01:58 +0200 |
---|---|---|
committer | Malte S. Stretz <mss@apache.org> | 2010-06-29 18:01:58 +0200 |
commit | 7dd19919d132ae6b7b0446c569d96303d6091a5d (patch) | |
tree | 39b88c2e5f90a91550bce87cedc87124e33fe7ac /Mailman/Handlers/SMTPDirect.py | |
parent | 66dc59ab5f368b1373f34d6487d7b43ad3af6941 (diff) | |
download | mailman2-7dd19919d132ae6b7b0446c569d96303d6091a5d.tar.gz mailman2-7dd19919d132ae6b7b0446c569d96303d6091a5d.tar.xz mailman2-7dd19919d132ae6b7b0446c569d96303d6091a5d.zip |
Added option include_sender_header to suppress rewrite of the Sender header which confuses Outlook (formerly known as FAQ 2.3). See also <http://mail.python.org/pipermail/mailman-developers/2006-July/019040.html>. Bug #266824.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Handlers/SMTPDirect.py | 20 |
1 files changed, 18 insertions, 2 deletions
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. |