-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark Sapiro wrote:
|
| In particular, see my post at
|
<http://mail.python.org/pipermail/mailman-developers/2005-October/018261.html>

|
| for an alternate patch which I thought was more complete. As I note in
| that post, I was new to Mailman at that time and was reluctant to commit
| that patch without additional input. In fact, I think I only acquired
| commit privileges during the time of that thread.
|
| In any case, I'll revisit it now for inclusion in 2.1.11.


See the attached Bouncer.patch.txt file for the current patch.

I think there are problems with Fil's patch posted here. In particular,
I think that when a user is disabled for bounce, the re-enable cookie
won't be stored in the bounce_info which I think is not too significant,
but I also think that the updated info.noticesleft in the
sendNextNotification() method is not saved which, if I am right will
mean that no bouncing member is ever unsubscribed - they just keep
getting periodic notices forever.

I think there was also a problem with my original patch in that it
didn't reset bounce info when a probe was sent, but I don't think this
is too significant.

I have tested this patch with OldStyleMemberships.py and it appears to
cause no regression. I also installed it in a production system using
OldStyleMemberships.py and will be monitoring that, but of course this
doesn't say anything about how it works with MysqlMemberAdaptor.py or
any other which saves bounce info outside the list instance.

Fil, I would appreciate your trying the attached patch instead of the
one you're using and reporting the results.

/Mark

- --
Mark Sapiro <[EMAIL PROTECTED]>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)

iD8DBQFIWCClVVuXXpU7hpMRAo57AJ9aYDnC+8YrysO3l8ecXvnBfB3lXACgpIqc
ERIX3ort5Ky1P1OX/7zCwv4=
=4LXA
-----END PGP SIGNATURE-----
=== modified file 'Mailman/Bouncer.py'
--- Mailman/Bouncer.py  2005-12-06 22:49:49 +0000
+++ Mailman/Bouncer.py  2008-06-17 19:37:36 +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

Attachment: Bouncer.patch.txt.sig
Description: Binary data

_______________________________________________
Mailman-Developers mailing list
Mailman-Developers@python.org
http://mail.python.org/mailman/listinfo/mailman-developers
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: 
http://www.mail-archive.com/mailman-developers%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp

Reply via email to