summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authormailman1998-04-23 16:26:33 +0000
committermailman1998-04-23 16:26:33 +0000
commit5d4d03ce0c09d6a28f904778c46bb6924e76465c (patch)
tree4a0c3bb3d4de0b7d345da8981bc435e9566ec660 /modules
parentfdebf3a7aae930d399efd84bc737723bccad4329 (diff)
downloadmailman-5d4d03ce0c09d6a28f904778c46bb6924e76465c.tar.gz
mailman-5d4d03ce0c09d6a28f904778c46bb6924e76465c.tar.zst
mailman-5d4d03ce0c09d6a28f904778c46bb6924e76465c.zip
Diffstat (limited to 'modules')
-rw-r--r--modules/mm_bouncer.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/mm_bouncer.py b/modules/mm_bouncer.py
index 7aea2d322..11444119f 100644
--- a/modules/mm_bouncer.py
+++ b/modules/mm_bouncer.py
@@ -1,6 +1,6 @@
"Handle delivery bounce messages, doing filtering when list is set for it."
-__version__ = "$Revision: 463 $"
+__version__ = "$Revision: 467 $"
# It's possible to get the mail-list senders address (list-admin) in the
# bounce list. You probably don't want to have list mail sent to that
@@ -212,8 +212,12 @@ class Bouncer:
candidates = []
who_info = string.lower(msg.GetSender())
at_index = string.find(who_info, '@')
- who_from = who_info[:at_index]
- remote_host = who_info[at_index+1:]
+ if at_index != -1:
+ who_from = who_info[:at_index]
+ remote_host = who_info[at_index+1:]
+ else:
+ who_from = who_info
+ remote_host = self.host_name
if not who_from in ['mailer-daemon', 'postmaster', 'orphanage',
'postoffice', 'ucx_smtp', 'a2']:
return 0
@@ -311,15 +315,17 @@ class Bouncer:
did = []
for i in candidates:
+ el = string.find(i, "...")
+ if el != -1: i = i[:el]
if i not in did:
self.HandleBouncingAddress(i)
did.append(i)
return message_groked
def ExtractBouncingAddr(self, line):
- # First try with angles:
email = regsub.splitx(line, '[^ \t@<>]+@[^ \t@<>]+\.[^ \t<>.]+')[1]
if email[0] == '<':
+ # Remove what's within the angles.
return regsub.splitx(email[1:], ">")[0]
else:
return email