aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman')
-rwxr-xr-xMailman/Handlers/CookHeaders.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py
index f0a2fc47..110302ea 100755
--- a/Mailman/Handlers/CookHeaders.py
+++ b/Mailman/Handlers/CookHeaders.py
@@ -122,7 +122,10 @@ def process(mlist, msg, msgdata):
if mm_cfg.ALLOW_FROM_IS_LIST and mlist.from_is_list and not fasttrack:
realname, email = parseaddr(msg['from'])
if not realname:
- realname = email
+ if mlist.isMember(email):
+ realname = mlist.getMemberName(email) or email
+ else:
+ realname = email
# Remove domain from realname if it looks like an email address
realname = re.sub(r'@([^ .]+\.)+[^ .]+$', '---', realname)
replies = getaddresses(msg.get('reply-to', ''))