diff options
author | Mark Sapiro <msapiro@value.net> | 2011-03-21 13:27:19 -0700 |
---|---|---|
committer | Mark Sapiro <msapiro@value.net> | 2011-03-21 13:27:19 -0700 |
commit | 8e61b45661ef34d49e8a92494d2c1c9c63171fa7 (patch) | |
tree | 16ec21f6ffd4bdb7fbe2adde6c354e8430525223 /Mailman/Handlers | |
parent | f7a1c245cdb78a300cf56432b73e547f51ce573d (diff) | |
download | mailman2-8e61b45661ef34d49e8a92494d2c1c9c63171fa7.tar.gz mailman2-8e61b45661ef34d49e8a92494d2c1c9c63171fa7.tar.xz mailman2-8e61b45661ef34d49e8a92494d2c1c9c63171fa7.zip |
Added the list name as 'display-name' in added Sender: headers to help
mitigate Outlook et al 'on behalf of' displays. Bug #736849.
Diffstat (limited to 'Mailman/Handlers')
-rw-r--r-- | Mailman/Handlers/SMTPDirect.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Mailman/Handlers/SMTPDirect.py b/Mailman/Handlers/SMTPDirect.py index e248ad1f..1d11d19a 100644 --- a/Mailman/Handlers/SMTPDirect.py +++ b/Mailman/Handlers/SMTPDirect.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2010 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2011 by the Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -363,7 +363,8 @@ def bulkdeliver(mlist, msg, msgdata, envsender, failures, conn): # 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. + # sender address. To partially mitigate this, we add the list name as a + # display-name in the Sender: header that we add. # # 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. @@ -374,7 +375,7 @@ def bulkdeliver(mlist, msg, msgdata, envsender, failures, conn): msg['Errors-To'] = envsender if mlist.include_sender_header: del msg['sender'] - msg['Sender'] = envsender + msg['Sender'] = '"%s" <%s>' % (mlist.real_name, 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. |