------------------------------------------------------------
revno: 1120
committer: Mark Sapiro <[email protected]>
branch nick: 2.2
timestamp: Sun 2010-07-11 11:21:41 -0700
message:
  Bounce processing has been enhanced so that if a bounce is returned to a
  list from a non-member who is a member of a regular_include_list, the
  bounce will be processed as a bounce for the included list.
modified:
  Mailman/Bouncer.py
  NEWS


--
lp:mailman/2.2
https://code.launchpad.net/~mailman-coders/mailman/2.2

Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription
=== modified file 'Mailman/Bouncer.py'
--- Mailman/Bouncer.py	2009-02-16 16:53:20 +0000
+++ Mailman/Bouncer.py	2010-07-11 18:21:41 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2009 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2010 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -29,6 +29,7 @@
 from Mailman import Message
 from Mailman import MemberAdaptor
 from Mailman import Pending
+from Mailman.Errors import MMUnknownListError
 from Mailman.Logging.Syslog import syslog
 from Mailman import i18n
 
@@ -102,8 +103,36 @@
         # New style delivery status
         self.delivery_status = {}
 
-    def registerBounce(self, member, msg, weight=1.0, day=None):
+    def registerBounce(self, member, msg, weight=1.0, day=None, sibling=False):
         if not self.isMember(member):
+            # check regular_include_lists, only one level
+            if not self.regular_include_lists or sibling:
+                return
+            from Mailman.MailList import MailList
+            for listaddr in self.regular_include_lists:
+                listname, hostname = listaddr.split('@')
+                listname = listname.lower()
+                if listname == self.internal_name():
+                    syslog('error',
+                           'Bouncer: %s: Include list self reference',
+                           listname)
+                    continue
+                try:
+                    siblist = None
+                    try:
+                        siblist = MailList(listname)
+                    except MMUnknownListError:
+                        syslog('error',
+                               'Bouncer: %s: Include list "%s" not found.',
+                               self.real_name,
+                               listname)
+                        continue
+                    siblist.registerBounce(member, msg, weight, day,
+                                           sibling=True)
+                    siblist.Save()
+                finally:
+                    if siblist and siblist.Locked():
+                        siblist.Unlock()
             return
         info = self.getBounceInfo(member)
         if day is None:

=== modified file 'NEWS'
--- NEWS	2010-07-03 20:56:47 +0000
+++ NEWS	2010-07-11 18:21:41 +0000
@@ -91,8 +91,16 @@
       to remove the include_sender_header setting from General Options, and
       thus preserve the prior behavior completely.
 
+    - Bounce processing has been enhanced so that if a bounce is returned to a
+      list from a non-member who is a member of a regular_include_list, the
+      bounce will be processed as a bounce for the included list.
+
   i18n
 
+    - Updated Dutch translation from Jan Veuger.
+
+    - Updated Japanese Translation from Tokio Kikuchi.
+
     - Updated Finnish translation from Joni Töyrylä.
 
     - Made a few corrections to some Polish templates.  Bug #566731.

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

Reply via email to