From 38130ec85d2cc75b70f647b0b1f9a769a196d6a9 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Thu, 21 Jan 2016 14:43:42 -0800 Subject: Fixed garbled From: with DMARC mitigations and non-ascii display name. --- Mailman/Handlers/CookHeaders.py | 7 +++++-- NEWS | 3 +++ 2 files changed, 8 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: diff --git a/NEWS b/NEWS index 1a62d446..6e242fd4 100644 --- a/NEWS +++ b/NEWS @@ -36,6 +36,9 @@ Here is a history of user visible changes to Mailman. Bug fixes and other patches + - Fixed a bug that could create a garbled From: header with certain DMARC + mitigation actions. (LP: #1536816) + - Treat a poster's address which matches an equivalent_domains address as a list member for the regular_exclude_ignore check. (LP: #1526550) -- cgit v1.2.3