diff options
Diffstat (limited to 'Mailman')
-rw-r--r-- | Mailman/Bouncers/DSN.py | 9 | ||||
-rw-r--r-- | Mailman/Bouncers/Qmail.py | 3 | ||||
-rw-r--r-- | Mailman/Bouncers/SimpleMatch.py | 12 |
3 files changed, 20 insertions, 4 deletions
diff --git a/Mailman/Bouncers/DSN.py b/Mailman/Bouncers/DSN.py index c6e17479..869e0461 100644 --- a/Mailman/Bouncers/DSN.py +++ b/Mailman/Bouncers/DSN.py @@ -71,6 +71,13 @@ def check(msg): # Note that params should already be unquoted. addrs.extend(params) break + else: + # MAS: This is a kludge, but SMTP-GATEWAY01.intra.home.dk + # has a final-recipient with an angle-addr and no + # address-type parameter at all. Non-compliant, but ... + for param in params: + if param.startswith('<') and param.endswith('>'): + addrs.append(param[1:-1]) # Uniquify rtnaddrs = {} for a in addrs: @@ -89,6 +96,6 @@ def process(msg): # The report-type parameter should be "delivery-status", but it seems that # some DSN generating MTAs don't include this on the Content-Type: header, # so let's relax the test a bit. - if not msg.is_multipart() or msg.get_subtype() <> 'report': + if not msg.is_multipart() or msg.get_content_subtype() <> 'report': return None return check(msg) diff --git a/Mailman/Bouncers/Qmail.py b/Mailman/Bouncers/Qmail.py index 2a2f8cd6..def4abfa 100644 --- a/Mailman/Bouncers/Qmail.py +++ b/Mailman/Bouncers/Qmail.py @@ -32,7 +32,8 @@ import email.Iterators # Other (non-standard?) intros have been observed in the wild. introtags = [ 'Hi. This is the', - "We're sorry. There's a problem" + "We're sorry. There's a problem", + 'Check your send e-mail address.' ] acre = re.compile(r'<(?P<addr>[^>]*)>:') diff --git a/Mailman/Bouncers/SimpleMatch.py b/Mailman/Bouncers/SimpleMatch.py index 232b8b7a..12eeffdc 100644 --- a/Mailman/Bouncers/SimpleMatch.py +++ b/Mailman/Bouncers/SimpleMatch.py @@ -89,11 +89,11 @@ PATTERNS = [ _c('<(?P<addr>[^>]*)>:')), # kundenserver.de (_c('A message that you sent could not be delivered'), - _c('^--- The header of the original'), + _c('^---'), _c('<(?P<addr>[^>]*)>')), # another kundenserver.de (_c('A message that you sent could not be delivered'), - _c('^--- The header of the original'), + _c('^---'), _c('^(?P<addr>[^\s@]+@[^\s@:]+):')), # thehartford.com (_c('Delivery to the following recipients failed'), @@ -119,6 +119,14 @@ PATTERNS = [ (_c('^Invalid final delivery userid:'), _c('^Original message follows.'), _c('\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')), + # E500_SMTP_Mail_Service@lerctr.org + (_c('------ Failed Recipients ------'), + _c('-------- Returned Mail --------'), + _c('<(?P<addr>[^>]*)>')), + # cynergycom.net + (_c('A message that you sent could not be delivered'), + _c('^---'), + _c('(?P<addr>[^\s@]+@[^\s@)]+)')), # Next one goes here... ] |