aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers/CookHeaders.py
diff options
context:
space:
mode:
authorMark Sapiro <mark@msapiro.net>2014-05-11 17:54:13 -0700
committerMark Sapiro <mark@msapiro.net>2014-05-11 17:54:13 -0700
commit8b03576a41b082df803bb0696af9eb440ff219f4 (patch)
tree30ad32d5fa9a3cba360f6ce85d28ad875ccc9efd /Mailman/Handlers/CookHeaders.py
parent307a5e4da3877c944be296b278ab59b7c70e24b7 (diff)
downloadmailman2-8b03576a41b082df803bb0696af9eb440ff219f4.tar.gz
mailman2-8b03576a41b082df803bb0696af9eb440ff219f4.tar.xz
mailman2-8b03576a41b082df803bb0696af9eb440ff219f4.zip
Enhance the fix for (LP: #1318025)
Diffstat (limited to 'Mailman/Handlers/CookHeaders.py')
-rwxr-xr-xMailman/Handlers/CookHeaders.py2
1 files changed, 2 insertions, 0 deletions
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: