From 8b03576a41b082df803bb0696af9eb440ff219f4 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Sun, 11 May 2014 17:54:13 -0700 Subject: Enhance the fix for (LP: #1318025) --- Mailman/Handlers/CookHeaders.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Mailman') diff --git a/Mailman/Handlers/CookHeaders.py b/Mailman/Handlers/CookHeaders.py index 78701850..5b20f23c 100755 --- a/Mailman/Handlers/CookHeaders.py +++ b/Mailman/Handlers/CookHeaders.py @@ -122,6 +122,8 @@ def process(mlist, msg, msgdata): if (msgdata.get('from_is_list') or mlist.from_is_list) and not fasttrack: # Be as robust as possible here. faddrs = getaddresses(msg.get_all('from', [])) + # Strip the nulls and bad emails. + faddrs = [x for x in faddrs if x[1].find('@') > 0] if len(faddrs) == 1: realname, email = o_from = faddrs[0] else: -- cgit v1.2.3