aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Bouncer.py
diff options
context:
space:
mode:
authorbwarsaw <>2004-02-10 22:38:26 +0000
committerbwarsaw <>2004-02-10 22:38:26 +0000
commit3fbdcda658b9d0506f86214f5d4ac6d2008af494 (patch)
tree94014eb46ec580165021165a84d399aa94510e29 /Mailman/Bouncer.py
parentd8f0638ced1b086e27750424f7279076baa0861d (diff)
downloadmailman2-3fbdcda658b9d0506f86214f5d4ac6d2008af494.tar.gz
mailman2-3fbdcda658b9d0506f86214f5d4ac6d2008af494.tar.xz
mailman2-3fbdcda658b9d0506f86214f5d4ac6d2008af494.zip
Hook in the new bounce processing actions. Specifically,
registerBounce(): When the bounce score is higher than the threshold, instead of disabling the address right way, we send a probe message, then we reset the bounce score to zero. disableBouncingMember(): Use the new pending db interface and update the log messages. sendNextNotification(): Use the new pending db interface.
Diffstat (limited to 'Mailman/Bouncer.py')
-rw-r--r--Mailman/Bouncer.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/Mailman/Bouncer.py b/Mailman/Bouncer.py
index 2eaab83c..588e91b1 100644
--- a/Mailman/Bouncer.py
+++ b/Mailman/Bouncer.py
@@ -1,4 +1,4 @@
-# Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
+# Copyright (C) 1998-2004 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
@@ -151,17 +151,20 @@ class Bouncer:
# Now that we've adjusted the bounce score for this bounce, let's
# check to see if the disable-by-bounce threshold has been reached.
if info.score >= self.bounce_score_threshold:
- self.disableBouncingMember(member, info, msg)
+ syslog('bounce', 'sending %s list probe to: %s (score %s >= %s)',
+ self.internal_name(), member, info.score,
+ self.bounce_score_threshold)
+ self.sendProbe(member, msg)
+ info.reset(0, info.date, info.noticesleft)
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)
+ cookie = self.pend_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,
- info.score, self.bounce_score_threshold)
+ syslog('bounce', '%s: %s disabling due to probe bounce received',
+ self.internal_name(), member)
self.setDeliveryStatus(member, MemberAdaptor.BYBOUNCE)
self.sendNextNotification(member)
if self.bounce_notify_owner_on_disable:
@@ -212,7 +215,7 @@ class Bouncer:
userack=1)
# Expunge the pending cookie for the user. We throw away the
# returned data.
- Pending.confirm(info.cookie)
+ self.pend_confirm(info.cookie)
if reason == MemberAdaptor.BYBOUNCE:
syslog('bounce', '%s: %s deleted after exhausting notices',
self.internal_name(), member)