------------------------------------------------------------
revno: 1270
committer: Mark Sapiro <m...@msapiro.net>
branch nick: 2.2
timestamp: Fri 2013-07-19 16:11:12 -0700
message:
  - Fixed cron/disabled to send a fresh cookie when notifying disabled
    members.  (LP: #1203200)
modified:
  NEWS
  cron/disabled


--
lp:mailman/2.2
https://code.launchpad.net/~mailman-coders/mailman/2.2

Your team Mailman Checkins is subscribed to branch lp:mailman/2.2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/2.2/+edit-subscription
=== modified file 'NEWS'
--- NEWS	2013-07-19 21:40:31 +0000
+++ NEWS	2013-07-19 23:11:12 +0000
@@ -119,6 +119,9 @@
 
   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)
 

=== modified file 'cron/disabled'
--- cron/disabled	2008-06-06 18:13:09 +0000
+++ cron/disabled	2013-07-19 23:11:12 +0000
@@ -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 @@
                     # 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',

_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to