summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Mailman/MailList.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Mailman/MailList.py b/Mailman/MailList.py
index 6f3059a55..609c59d79 100644
--- a/Mailman/MailList.py
+++ b/Mailman/MailList.py
@@ -1205,6 +1205,11 @@ it will not be changed."""),
for header in ('to', 'cc', 'resent-to', 'resent-cc'):
to.extend(msg.getaddrlist(header))
for fullname, addr in to:
+ # It's possible that if the header doesn't have a valid
+ # (i.e. RFC822) value, we'll get None for the address. So skip
+ # it.
+ if addr is None:
+ continue
addr = string.lower(addr)
localpart = string.split(addr, '@')[0]
if (# TBD: backwards compatibility: deprecated