Update of /cvsroot/mailman/mailman/Mailman/Bouncers
In directory sc8-pr-cvs1:/tmp/cvs-serv3807

Modified Files:
        DSN.py 
Log Message:
check(): If the action is 'disabled', stop the bounce processor from
running, but don't attempt to dig out an email address.


Index: DSN.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncers/DSN.py,v
retrieving revision 2.8
retrieving revision 2.9
diff -u -d -r2.8 -r2.9
--- DSN.py      2 Mar 2003 23:26:03 -0000       2.8
+++ DSN.py      18 Aug 2003 02:50:16 -0000      2.9
@@ -24,6 +24,8 @@
 from email.Utils import parseaddr
 from cStringIO import StringIO
 
+from Mailman.BouncerAPI import Stop
+
 
 
 def check(msg):
@@ -43,13 +45,10 @@
             # that for other purposes :(
             #
             # Also grok out Action so we can do something with that too.
-            action = msgblock.get('action', '')
-            # BAW: Should we treat delayed bounces the same?  Yes, because if
-            # the transient problem clears up, they should get unbounced.  The
-            # other problem is what to do about a DSN that has both delayed
-            # and failed actions in multiple header blocks?  We're not
-            # architected to handle that. ;/
-            if action.lower() not in ('failed', 'failure', 'delayed'):
+            action = msgblock.get('action', '').lower()
+            if action == 'delayed':
+                return Stop
+            if action not in ('failed', 'failure'):
                 # Some non-permanent failure, so ignore this block
                 continue
             params = []



_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins

Reply via email to