summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhmeland1999-07-01 12:26:51 +0000
committerhmeland1999-07-01 12:26:51 +0000
commit4cc27c1bb327951c9d6600de0c058664c80ed6d2 (patch)
tree7dfb97c4e6bd7b12196de237e7a0662f9c71f330
parent150c7ed35792ff60899d3d0e8e397767c5bbe02f (diff)
downloadmailman-4cc27c1bb327951c9d6600de0c058664c80ed6d2.tar.gz
mailman-4cc27c1bb327951c9d6600de0c058664c80ed6d2.tar.zst
mailman-4cc27c1bb327951c9d6600de0c058664c80ed6d2.zip
-rw-r--r--Mailman/Message.py12
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):
#