------------------------------------------------------------
revno: 1016
committer: Mark Sapiro <[EMAIL PROTECTED]>
branch nick: 2.1
timestamp: Mon 2007-11-19 12:30:51 -0800
message:
  BounceRunner.py - Fixed a mail loop if a list owner puts the list's -bounces
                    or -admin address in the list's owner attribute (1834569).
modified:
  Mailman/Queue/BounceRunner.py

=== modified file 'Mailman/Queue/BounceRunner.py'
--- a/Mailman/Queue/BounceRunner.py     2006-03-09 22:09:34 +0000
+++ b/Mailman/Queue/BounceRunner.py     2007-11-19 20:30:51 +0000
@@ -180,11 +180,21 @@
         #   but a list owner address itself bounced.  That's bad, and for now
         #   we'll simply log the problem and attempt to deliver the message to
         #   the site owner.
-        #
+        # - the list owner could have set listname-bounces as the owner
+        #   address.  That's really bad as it results in a loop of ever
+        #   growing unrecognized bounce messages.  We detect this based on the
+        #   X-BeenThere header and handle it like a list owner bounce.  No
+        #   real bounce will have an X-BeenThere header for the list.
+        bts = [s.strip().lower() for s in msg.get_all('x-beenthere', [])]
+        if mlist.GetListEmail().lower() in bts:
+            bt = True
+        else:
+            bt = False
         # All messages to [EMAIL PROTECTED] have their envelope sender set
         # to [EMAIL PROTECTED] (no virtual domain).  Is this a bounce for a
-        # message to a list owner, coming to the site owner?
-        if msg.get('to', '') == Utils.get_site_email(extra='owner'):
+        # message to a list owner, coming to the site owner, or an owner
+        # notice sent directly to the -bounces address?
+        if msg.get('to', '') == Utils.get_site_email(extra='owner') or bt:
             # Send it on to the site owners, but craft the envelope sender to
             # be the -loop detection address, so if /they/ bounce, we won't
             # get stuck in a bounce loop.
@@ -192,6 +202,7 @@
                          recips=[Utils.get_site_email()],
                          envsender=Utils.get_site_email(extra='loop'),
                          )
+            return
         # List isn't doing bounce processing?
         if not mlist.bounce_processing:
             return



--

https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.1/+subscription/mailman-checkins.
_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to