aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman')
-rw-r--r--Mailman/Bouncers/DSN.py4
-rw-r--r--Mailman/Bouncers/SimpleMatch.py18
2 files changed, 21 insertions, 1 deletions
diff --git a/Mailman/Bouncers/DSN.py b/Mailman/Bouncers/DSN.py
index d78a1f4f..c6e17479 100644
--- a/Mailman/Bouncers/DSN.py
+++ b/Mailman/Bouncers/DSN.py
@@ -82,6 +82,10 @@ def check(msg):
def process(msg):
+ # A DSN has been seen wrapped with a "legal disclaimer" by an outgoing MTA
+ # in a multipart/mixed outer part.
+ if msg.is_multipart() and msg.get_content_subtype() == 'mixed':
+ msg = msg.get_payload()[0]
# 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.
diff --git a/Mailman/Bouncers/SimpleMatch.py b/Mailman/Bouncers/SimpleMatch.py
index c3749b4a..232b8b7a 100644
--- a/Mailman/Bouncers/SimpleMatch.py
+++ b/Mailman/Bouncers/SimpleMatch.py
@@ -100,9 +100,25 @@ PATTERNS = [
_c("Bogus - there actually isn't anything"),
_c('^\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
# and another thehartfod.com/hartfordlife.com
- (_c('^Your message'),
+ (_c('^Your message\s*$'),
_c('^because:'),
_c('^\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
+ # kviv.be (NTMail)
+ (_c('^Unable to deliver message to'),
+ _c(r'\*+\s+End of message\s+\*+'),
+ _c('<(?P<addr>[^>]*)>')),
+ # earthlink.net supported domains
+ (_c('^Sorry, unable to deliver your message to'),
+ _c('^A copy of the original message'),
+ _c('\s*(?P<addr>[^\s@]+@[^\s@]+)\s+')),
+ # ademe.fr
+ (_c('^A message could not be delivered to:'),
+ _c('^Subject:'),
+ _c('^\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
+ # andrew.ac.jp
+ (_c('^Invalid final delivery userid:'),
+ _c('^Original message follows.'),
+ _c('\s*(?P<addr>[^\s@]+@[^\s@]+)\s*$')),
# Next one goes here...
]