diff options
author | Mark Sapiro <msapiro@value.net> | 2007-12-06 23:17:29 -0800 |
---|---|---|
committer | Mark Sapiro <msapiro@value.net> | 2007-12-06 23:17:29 -0800 |
commit | a3626485b450da99548342f89c49b77a54f50678 (patch) | |
tree | 58e7be49ddc657a48cf40786421f6287ddaa8b89 /cron | |
parent | 0f3f02aa5b6d9e88cbd147865c38322bef3121f4 (diff) | |
download | mailman2-a3626485b450da99548342f89c49b77a54f50678.tar.gz mailman2-a3626485b450da99548342f89c49b77a54f50678.tar.xz mailman2-a3626485b450da99548342f89c49b77a54f50678.zip |
cron/disabled - Fixed to check for stale bounce info before disabling
a member. Stale bounce info is reset.
Diffstat (limited to 'cron')
-rw-r--r-- | cron/disabled | 14 |
1 files changed, 9 insertions, 5 deletions
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: |