diff options
author | Mark Sapiro <mark@msapiro.net> | 2010-07-11 11:19:30 -0700 |
---|---|---|
committer | Mark Sapiro <mark@msapiro.net> | 2010-07-11 11:19:30 -0700 |
commit | 27dfc16018fad74e935d4e6d093d0a969308137c (patch) | |
tree | 82d3286650aa89bf4a4ae3b7caabe9ade3a59a29 | |
parent | 6786292e5070a26e4112625899147d6a56c8f407 (diff) | |
download | mailman2-27dfc16018fad74e935d4e6d093d0a969308137c.tar.gz mailman2-27dfc16018fad74e935d4e6d093d0a969308137c.tar.xz mailman2-27dfc16018fad74e935d4e6d093d0a969308137c.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Bouncer.py | 33 | ||||
-rw-r--r-- | NEWS | 8 |
2 files changed, 39 insertions, 2 deletions
diff --git a/Mailman/Bouncer.py b/Mailman/Bouncer.py index 0ad873e7..036b58a0 100644 --- a/Mailman/Bouncer.py +++ b/Mailman/Bouncer.py @@ -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 Utils 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 @@ class Bouncer: # 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: @@ -21,8 +21,16 @@ Here is a history of user visible changes to Mailman. 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. |