[Bug 1223725] [NEW] update dumps traceback when resetting bounce for non members
Public bug reported: The script bin/update is run when upgrading between mailman releases. The script has code to enable users that have been disabled due to bouncing messages but lacks a bounce score. However, if there are users that are marked as disabled due to bounces but that are no longer members of the list, the script dumps a traceback: Resetting 1 BYBOUNCEs disabled addrs with no bounce info Traceback (most recent call last): File "/usr/lib/mailman/bin/update", line 771, in <module> errors = main() File "/usr/lib/mailman/bin/update", line 661, in main errors = errors + dolist(listname) File "/usr/lib/mailman/bin/update", line 218, in dolist mlist.setDeliveryStatus(addr, ENABLED) File "/var/lib/mailman/Mailman/OldStyleMemberships.py", line 352, in setDeliveryStatus self.__assertIsMember(member) File "/var/lib/mailman/Mailman/OldStyleMemberships.py", line 114, in __assertIsMember raise Errors.NotAMemberError, member The problematic code is line 217 in bin/update: 213 if n > 0: 214 print _( 215 'Resetting %(n)s BYBOUNCEs disabled addrs with no bounce info') 216 for addr in noinfo.keys(): 217 mlist.setDeliveryStatus(addr, ENABLED) A proposed solution is to ignore non members (add mlist.isMember(addr) in the for loop) or to remove the address from the list of disabled addresses. ** Affects: mailman Importance: Undecided Status: New ** Tags: bounce disable update -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1223725 Title: update dumps traceback when resetting bounce for non members To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1223725/+subscriptions
The real bug is whatever caused the member to be left with a delivery_status after being removed from the list. Do you have any idea how that happened? What Mailman version were you upgrading from, and what prior version if any did you upgrade from before that? ** Changed in: mailman Status: New => Incomplete ** Changed in: mailman Assignee: (unassigned) => Mark Sapiro (msapiro) -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1223725 Title: update dumps traceback when resetting bounce for non members To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1223725/+subscriptions
We have a script that updates the list of users running: mlist = MailList.MailList(list, lock=1) mlist.members = listmembers mlist.Save() -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1223725 Title: update dumps traceback when resetting bounce for non members To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1223725/+subscriptions
If you use Mailman's bin/sync-members to match the list membership to a file of addresses, you won't have this problem. In any case, you should at least use the MemberAdaptor list methods getMembers, addNewMember and removeMember to read and manipulate the list membership. ** Changed in: mailman Importance: Undecided => Wishlist ** Changed in: mailman Status: Incomplete => Invalid -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/1223725 Title: update dumps traceback when resetting bounce for non members To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/1223725/+subscriptions
participants (2)
-
David Westlund
-
Mark Sapiro