diff options
Diffstat (limited to 'Mailman/Message.py')
| -rw-r--r-- | Mailman/Message.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Mailman/Message.py b/Mailman/Message.py index 56dd2ec64..f2c57fe8e 100644 --- a/Mailman/Message.py +++ b/Mailman/Message.py @@ -112,11 +112,15 @@ class IncomingMessage(rfc822.Message): try: realname, mail_address = self.getaddr('from') except: - # The unix from line is all we have left... - if self.unixfrom: - return string.lower(string.split(self.unixfrom)[1]) + real_name = mail_address = None - return string.lower(mail_address) + # We can't trust that any of the headers really contained an address + if mail_address and type(mail_address) == type(""): + return string.lower(mail_address) + else: + # The unix from line is all we have left... + if self.unixfrom: + return string.lower(string.split(self.unixfrom)[1]) def GetEnvelopeSender(self): # |
