------------------------------------------------------------
revno: 1101
committer: Mark Sapiro <[EMAIL PROTECTED]>
branch nick: 2.1
timestamp: Fri 2008-06-20 12:47:28 -0700
message:
  Rearranged calls to the list setBounceInfo() method in Bouncer.py
  to accommodate MemberAdaptors that store bounce info outside the
  list instance.
modified:
  Mailman/Bouncer.py

=== modified file 'Mailman/Bouncer.py'
--- a/Mailman/Bouncer.py        2005-12-06 22:49:49 +0000
+++ b/Mailman/Bouncer.py        2008-06-20 19:47:28 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 1998-2005 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2008 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
@@ -113,7 +113,7 @@
             # This is the first bounce we've seen from this member
             info = _BounceInfo(member, weight, day,
                                self.bounce_you_are_disabled_warnings)
-            self.setBounceInfo(member, info)
+            # setBounceInfo is now called below after check phase.
             syslog('bounce', '%s: %s bounce score: %s', self.internal_name(),
                    member, info.score)
             # Continue to the check phase below
@@ -160,12 +160,20 @@
                 info.reset(0, info.date, info.noticesleft)
             else:
                 self.disableBouncingMember(member, info, msg)
+        # We've set/changed bounce info above.  We now need to tell the
+        # MemberAdaptor to set/update it.  We do it here in case the
+        # MemberAdaptor stores bounce info externally to the list object to
+        # be sure updated information is stored.
+        self.setBounceInfo(member, info)
 
     def disableBouncingMember(self, member, info, msg):
         # Initialize their confirmation cookie.  If we do it when we get the
         # first bounce, it'll expire by the time we get the disabling bounce.
         cookie = self.pend_new(Pending.RE_ENABLE, self.internal_name(), member)
         info.cookie = cookie
+        # In case the MemberAdaptor stores bounce info externally to
+        # the list, we need to tell it to save the cookie
+        self.setBounceInfo(member, info)
         # Disable them
         if mm_cfg.VERP_PROBES:
             syslog('bounce', '%s: %s disabling due to probe bounce received',
@@ -271,6 +279,9 @@
         msg.send(self)
         info.noticesleft -= 1
         info.lastnotice = time.localtime()[:3]
+        # In case the MemberAdaptor stores bounce info externally to
+        # the list, we need to tell it to update
+        self.setBounceInfo(member, info)
 
     def BounceMessage(self, msg, msgdata, e=None):
         # Bounce a message back to the sender, with an error message if



--
Stable, maintained release series
https://code.launchpad.net/~mailman-coders/mailman/2.1

You are receiving this branch notification because you are subscribed to it.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to