Update of /cvsroot/mailman/mailman/Mailman
In directory sc8-pr-cvs1:/tmp/cvs-serv1894
Modified Files:
Tag: Release_2_1-maint
Bouncer.py
Log Message:
_BounceInfo.__init__(), registerBounce(), disableBouncingMember(): A
fix for SF bug # 846681, where the confirmation cookie emailed in a
bounce disabled notification was always out of date. The problem was
that we created the cookie at the time of the first bounce. This is
very likely more than three days before the time of the last bounce,
which is when we should have (and now do) create the cookie.
Index: Bouncer.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Bouncer.py,v
retrieving revision 2.37.2.1
retrieving revision 2.37.2.2
diff -u -d -r2.37.2.1 -r2.37.2.2
--- Bouncer.py 22 Sep 2003 02:58:12 -0000 2.37.2.1
+++ Bouncer.py 21 Nov 2003 22:44:33 -0000 2.37.2.2
@@ -52,9 +52,9 @@
class _BounceInfo:
- def __init__(self, member, score, date, noticesleft, cookie):
+ def __init__(self, member, score, date, noticesleft):
self.member = member
- self.cookie = cookie
+ self.cookie = None
self.reset(score, date, noticesleft)
def reset(self, score, date, noticesleft):
@@ -111,11 +111,8 @@
day = time.localtime()[:3]
if not isinstance(info, _BounceInfo):
# This is the first bounce we've seen from this member
- cookie = Pending.new(Pending.RE_ENABLE, self.internal_name(),
- member)
info = _BounceInfo(member, weight, day,
- self.bounce_you_are_disabled_warnings,
- cookie)
+ self.bounce_you_are_disabled_warnings)
self.setBounceInfo(member, info)
syslog('bounce', '%s: %s bounce score: %s', self.internal_name(),
member, info.score)
@@ -157,6 +154,10 @@
self.disableBouncingMember(member, info, msg)
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 = Pending.new(Pending.RE_ENABLE, self.internal_name(), member)
+ info.cookie = cookie
# Disable them
syslog('bounce', '%s: %s disabling due to bounce score %s >= %s',
self.internal_name(), member,
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins