diff options
author | Mark Sapiro <mark@msapiro.net> | 2016-01-21 14:43:42 -0800 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2016-01-21 14:43:42 -0800 |
commit | 38130ec85d2cc75b70f647b0b1f9a769a196d6a9 (patch) | |
tree | 030944cdd0831406409ff63ed0df6301c82fabfb /Mailman/Handlers/CookHeaders.py | |
parent | 8f79812f3e5537f06e3da4514d3373c32a89f619 (diff) | |
download | mailman2-38130ec85d2cc75b70f647b0b1f9a769a196d6a9.tar.gz mailman2-38130ec85d2cc75b70f647b0b1f9a769a196d6a9.tar.xz mailman2-38130ec85d2cc75b70f647b0b1f9a769a196d6a9.zip |
Fixed garbled From: with DMARC mitigations and non-ascii display name.
Diffstat (limited to '')
-rwxr-xr-x | Mailman/Handlers/CookHeaders.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py index 4e005dc5..8b371b77 100755 --- a/Mailman/Handlers/CookHeaders.py +++ b/Mailman/Handlers/CookHeaders.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2015 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2016 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 @@ -152,8 +152,11 @@ def process(mlist, msg, msgdata): realname = email # Remove domain from realname if it looks like an email address realname = re.sub(r'@([^ .]+\.)+[^ .]+$', '---', realname) + # RFC 2047 encode realname if necessary. + realname = str(uheader(mlist, realname)) + lrn = mlist.real_name change_header('From', - formataddr(('%s via %s' % (realname, mlist.real_name), + formataddr((_('%(realname)s via %(lrn)s'), mlist.GetListEmail())), mlist, msg, msgdata) else: |