aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2014-04-08 09:28:26 -0700
committerMark Sapiro <mark@msapiro.net>2014-04-08 09:28:26 -0700
commitd16f784d5a781ce4e5abbb39afba77515b1cb345 (patch)
treeec1dc44892ec837676a505b9fa4f9d6230c1550e
parenteea27951e62a1a2be6a1b708623ca8583f9c397a (diff)
downloadmailman2-d16f784d5a781ce4e5abbb39afba77515b1cb345.tar.gz
mailman2-d16f784d5a781ce4e5abbb39afba77515b1cb345.tar.xz
mailman2-d16f784d5a781ce4e5abbb39afba77515b1cb345.zip
For from_is_list feature, use email address from original From: if
original From: has no display name and strip domain part from resultant names that look like email addresses. (LP: #1304511)
-rwxr-xr-xMailman/Handlers/CookHeaders.py2
-rwxr-xr-xNEWS4
2 files changed, 6 insertions, 0 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py
index 1333e650..f0a2fc47 100755
--- a/Mailman/Handlers/CookHeaders.py
+++ b/Mailman/Handlers/CookHeaders.py
@@ -123,6 +123,8 @@ def process(mlist, msg, msgdata):
realname, email = parseaddr(msg['from'])
if not realname:
realname = email
+ # Remove domain from realname if it looks like an email address
+ realname = re.sub(r'@([^ .]+\.)+[^ .]+$', '---', realname)
replies = getaddresses(msg.get('reply-to', ''))
reply_addrs = [x[1].lower() for x in replies]
if reply_addrs:
diff --git a/NEWS b/NEWS
index 263ed723..3e27f993 100755
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,10 @@ Here is a history of user visible changes to Mailman.
Bug Fixes and other patches
+ - For from_is_list feature, use email address from original From: if
+ original From: has no display name and strip domain part from resultant
+ names that look like email addresses. (LP: #1304511)
+
- Added the list name to the vette log "held message approved" entry.
(LP: 1295875)