diff options
| author | hmeland | 1999-07-01 12:26:51 +0000 |
|---|---|---|
| committer | hmeland | 1999-07-01 12:26:51 +0000 |
| commit | 4cc27c1bb327951c9d6600de0c058664c80ed6d2 (patch) | |
| tree | 7dfb97c4e6bd7b12196de237e7a0662f9c71f330 /Mailman/Message.py | |
| parent | 150c7ed35792ff60899d3d0e8e397767c5bbe02f (diff) | |
| download | mailman-4cc27c1bb327951c9d6600de0c058664c80ed6d2.tar.gz mailman-4cc27c1bb327951c9d6600de0c058664c80ed6d2.tar.zst mailman-4cc27c1bb327951c9d6600de0c058664c80ed6d2.zip | |
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): # |
