aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Bouncers
diff options
context:
space:
mode:
authormsapiro <>2006-03-24 18:13:53 +0000
committermsapiro <>2006-03-24 18:13:53 +0000
commit6cd54b29ce171114c8ab927f29a3c8b9a26c5dc2 (patch)
tree60f03b8129982876daf37bab21dec570cad00546 /Mailman/Bouncers
parentea25cca695ecf01801417a3e17053ebdafb191df (diff)
downloadmailman2-6cd54b29ce171114c8ab927f29a3c8b9a26c5dc2.tar.gz
mailman2-6cd54b29ce171114c8ab927f29a3c8b9a26c5dc2.tar.xz
mailman2-6cd54b29ce171114c8ab927f29a3c8b9a26c5dc2.zip
Added bounce tests. Updated bounce recognizers to pick up a few more.
Diffstat (limited to 'Mailman/Bouncers')
-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...
]