From a3626485b450da99548342f89c49b77a54f50678 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Thu, 6 Dec 2007 23:17:29 -0800 Subject: cron/disabled - Fixed to check for stale bounce info before disabling a member. Stale bounce info is reset. --- cron/disabled | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'cron') diff --git a/cron/disabled b/cron/disabled index 6624ff21..ac62582a 100644 --- a/cron/disabled +++ b/cron/disabled @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 2001-2004 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2007 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 @@ -14,7 +14,8 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, +# USA. """Process disabled members, recommended once per day. @@ -154,14 +155,17 @@ def main(): # disabled. This is a sweep through the membership catching # situations where they've bounced a bunch, then the list admin # lowered the threshold, but we haven't (yet) seen more bounces - # from the member. Note: we won't worry about stale information - # or anything else since the normal bounce processing code will - # handle that. + # from the member. disables = [] for member in mlist.getBouncingMembers(): if mlist.getDeliveryStatus(member) <> MemberAdaptor.ENABLED: continue info = mlist.getBounceInfo(member) + if (Utils.midnight(info.date) + mlist.bounce_info_stale_after + < Utils.midnight()): + # Bounce info is stale; reset it. + mlist.setBounceInfo(member, None) + continue if info.score >= mlist.bounce_score_threshold: disables.append((member, info)) if disables: -- cgit v1.2.3