handle DiscardMessage in ToDigest handler
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Mailman |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Our scrubber was raising DiscardMessage exceptions when
trying to scrub messages from the digest. This
situation may have arisen because of a configuration
change that allowed some messages to get into the
digest mailbox when they would previously have been
scrubbed out.
In any case, it was causing exceptions like this:
Traceback (most recent call last):
File "/usr/local/
main()
File "/usr/local/
in main
mlist.
File "/usr/local/
60, in send_digest_now
ToDigest.
File
"/usr/local/
131, in send_digests
send_
File
"/usr/local/
304, in send_i18n_digests
msg = scrubber(mlist, msg)
File
"/usr/local/
178, in process
raise DiscardMessage
Mailman.
It seems reasonable to have the ToDigest handler
respond to these exceptions by discarding the message,
per this patch
--- ToDigest.py.orig Mon Dec 15 02:21:51 2003
+++ ToDigest.py Mon Dec 15 02:23:19 2003
@@ -44,6 +44,7 @@
from Mailman import Utils
from Mailman import Message
from Mailman import i18n
+from Mailman import Errors
from Mailman.Mailbox import Mailbox
from Mailman.
from Mailman.
@@ -301,7 +302,10 @@
print >> plainmsg, separator30
print >> plainmsg
# Use Mailman.
get plain text
- msg = scrubber(mlist, msg)
+ try:
+ msg = scrubber(mlist, msg)
+ except (Errors.
+ continue
# Honor the default setting
for h in mm_cfg.
if msg[h]: