diff options
author | bwarsaw <> | 2003-11-21 22:44:33 +0000 |
---|---|---|
committer | bwarsaw <> | 2003-11-21 22:44:33 +0000 |
commit | faf713ab278b2e0a97992ce56a4f657972e18d74 (patch) | |
tree | d43c3e887b95711504626f13e894711c89657aa6 | |
parent | 64767fb00bf81dc5d02b4bc02b78f9034768a170 (diff) | |
download | mailman2-faf713ab278b2e0a97992ce56a4f657972e18d74.tar.gz mailman2-faf713ab278b2e0a97992ce56a4f657972e18d74.tar.xz mailman2-faf713ab278b2e0a97992ce56a4f657972e18d74.zip |
_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.
Diffstat (limited to '')
-rw-r--r-- | Mailman/Bouncer.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Mailman/Bouncer.py b/Mailman/Bouncer.py index 196d6fa3..2eaab83c 100644 --- a/Mailman/Bouncer.py +++ b/Mailman/Bouncer.py @@ -52,9 +52,9 @@ _ = i18n._ 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 @@ class Bouncer: 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 @@ class Bouncer: 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, |