[Mailman-Developers] Fix (I think) for duplicates problem
Barry A. Warsaw
barry@wooz.org
Thu, 2 Nov 2000 18:08:51 -0500 (EST)
The last followup to bug #117015 by deejster provided what I think is
the critical clue to the strange duplication problem. Given that
recipe I was indeed able to reproduce the bug:
- a message gets held for whatever reason
- the message is approved, but there are smtp errors during delivery
- the message gets re-queued, but with a file name composed of the old
filebase, not the new filebase.
- fwap! you've now got a duplicate of the original message
Here's a fix for this problem. It removes the filebase value from the
original msgdata, so that this will be recalculated when the file is
re-queued after approval. For those of you seeing duplicates, please
apply this patch and let me know if it fixes your dup problem.
This is important enough to spin a second release candidate.
-Barry
Index: ListAdmin.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/ListAdmin.py,v
retrieving revision 1.46
diff -u -r1.46 ListAdmin.py
--- ListAdmin.py 2000/10/10 06:33:31 1.46
+++ ListAdmin.py 2000/11/02 23:05:57
@@ -208,6 +208,12 @@
return LOST
msg = Message.Message(fp)
msgdata['approved'] = 1
+ # Calculate a new filebase for the approved message, otherwise
+ # delivery errors will cause duplicates.
+ try:
+ del msgdata['filebase']
+ except KeyError:
+ pass
# Queue the file for delivery by qrunner. Trying to deliver the
# message directly here can lead to a huge delay in web
# turnaround.