Update of /cvsroot/mailman/mailman/Mailman/Bouncers
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9187/Mailman/Bouncers

Modified Files:
      Tag: Release_2_1-maint
        DSN.py SimpleMatch.py 
Log Message:
Added bounce tests. Updated bounce recognizers to pick up a few more.

Index: DSN.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/DSN.py,v
retrieving revision 2.7.2.4
retrieving revision 2.7.2.5
diff -u -d -r2.7.2.4 -r2.7.2.5
--- DSN.py      1 Mar 2006 02:34:10 -0000       2.7.2.4
+++ DSN.py      24 Mar 2006 18:15:27 -0000      2.7.2.5
@@ -82,6 +82,10 @@
 
 
 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.

Index: SimpleMatch.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/SimpleMatch.py,v
retrieving revision 2.10.2.7
retrieving revision 2.10.2.8
diff -u -d -r2.10.2.7 -r2.10.2.8
--- SimpleMatch.py      6 Mar 2006 18:12:01 -0000       2.10.2.7
+++ SimpleMatch.py      24 Mar 2006 18:15:27 -0000      2.10.2.8
@@ -100,9 +100,25 @@
      _c("Bogus - there actually isn't anything"),
      _c('^\s*(?P<addr>[EMAIL PROTECTED]@[EMAIL PROTECTED])\s*$')),
     # and another thehartfod.com/hartfordlife.com
-    (_c('^Your message'),
+    (_c('^Your message\s*$'),
      _c('^because:'),
      _c('^\s*(?P<addr>[EMAIL PROTECTED]@[EMAIL PROTECTED])\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>[EMAIL PROTECTED]@[EMAIL PROTECTED])\s+')),
+    # ademe.fr
+    (_c('^A message could not be delivered to:'),
+     _c('^Subject:'),
+     _c('^\s*(?P<addr>[EMAIL PROTECTED]@[EMAIL PROTECTED])\s*$')),
+    # andrew.ac.jp
+    (_c('^Invalid final delivery userid:'),
+     _c('^Original message follows.'),
+     _c('\s*(?P<addr>[EMAIL PROTECTED]@[EMAIL PROTECTED])\s*$')),
     # Next one goes here...
     ]
 

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to