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

Modified Files:
      Tag: Release_2_1-maint
        DSN.py Qmail.py SimpleMatch.py 
Log Message:
Recognize more bounces - DSN.py, Qmail.py and SimpleMatch.py

Index: DSN.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/DSN.py,v
retrieving revision 2.7.2.5
retrieving revision 2.7.2.6
diff -u -d -r2.7.2.5 -r2.7.2.6
--- DSN.py      24 Mar 2006 18:15:27 -0000      2.7.2.5
+++ DSN.py      4 Apr 2006 23:23:16 -0000       2.7.2.6
@@ -71,6 +71,13 @@
                     # 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 @@
     # 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)

Index: Qmail.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/Qmail.py,v
retrieving revision 2.4.2.2
retrieving revision 2.4.2.3
diff -u -d -r2.4.2.2 -r2.4.2.3
--- Qmail.py    1 Mar 2006 02:34:10 -0000       2.4.2.2
+++ Qmail.py    4 Apr 2006 23:23:16 -0000       2.4.2.3
@@ -32,7 +32,8 @@
 # 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>[^>]*)>:')
 

Index: SimpleMatch.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/SimpleMatch.py,v
retrieving revision 2.10.2.8
retrieving revision 2.10.2.9
diff -u -d -r2.10.2.8 -r2.10.2.9
--- SimpleMatch.py      24 Mar 2006 18:15:27 -0000      2.10.2.8
+++ SimpleMatch.py      4 Apr 2006 23:23:16 -0000       2.10.2.9
@@ -89,11 +89,11 @@
      _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>[EMAIL PROTECTED]@[^\s@:]+):')),
     # thehartford.com
     (_c('Delivery to the following recipients failed'),
@@ -119,6 +119,14 @@
     (_c('^Invalid final delivery userid:'),
      _c('^Original message follows.'),
      _c('\s*(?P<addr>[EMAIL PROTECTED]@[EMAIL PROTECTED])\s*$')),
+    # [EMAIL PROTECTED]
+    (_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>[EMAIL PROTECTED]@[^\s@)]+)')),
     # Next one goes here...
     ]
 

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

Reply via email to