From 73b6ca9d4aa001265d0413e78a4648b4b94d5696 Mon Sep 17 00:00:00 2001 From: Mark Sapiro Date: Fri, 19 Jul 2013 16:09:02 -0700 Subject: - Fixed cron/disabled to send a fresh cookie when notifying disabled members. (LP: #1203200) --- NEWS | 3 +++ cron/disabled | 15 +++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 8b80e6bb..57be5b6b 100755 --- a/NEWS +++ b/NEWS @@ -75,6 +75,9 @@ Here is a history of user visible changes to Mailman. Bug Fixes and other patches + - Fixed cron/disabled to send a fresh cookie when notifying disabled + members. (LP: #1203200) + - Added "message_id" to the interpolation dictionary for the Article.html template. (LP: #725498) diff --git a/cron/disabled b/cron/disabled index ac62582a..409fba60 100755 --- a/cron/disabled +++ b/cron/disabled @@ -1,6 +1,6 @@ #! @PYTHON@ # -# Copyright (C) 2001-2007 by the Free Software Foundation, Inc. +# Copyright (C) 2001-2013 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 @@ -185,21 +185,24 @@ def main(): # other reason. status = mlist.getDeliveryStatus(member) if status == MemberAdaptor.BYBOUNCE: + # Bouncing member with no bounce info. Just log it and continue. syslog( 'error', '%s disabled BYBOUNCE lacks bounce info, list: %s', member, mlist.internal_name()) continue + # Disabled other than by bounce. Create bounce info (why?) info = _BounceInfo( member, 0, today, - mlist.bounce_you_are_disabled_warnings, - mlist.pend_new(Pending.RE_ENABLE, - mlist.internal_name(), - member)) - mlist.setBounceInfo(member, info) + mlist.bounce_you_are_disabled_warnings) lastnotice = time.mktime(info.lastnotice + (0,) * 6) if force or today >= lastnotice + interval: notify.append(member) + # Get a fresh re-enable cookie and set it. + info.cookie = mlist.pend_new(Pending.RE_ENABLE, + mlist.internal_name(), + member) + mlist.setBounceInfo(member, info) # Now, send notifications to anyone who is due for member in notify: syslog('bounce', 'Notifying disabled member %s for list: %s', -- cgit v1.2.3