[ mailman-Patches-860135 ] handle DiscardMessage in ToDigest handler
Patches item #860135, was opened at 2003-12-14 21:27 Message generated for change (Settings changed) made by bwarsaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300103&aid=860135&group_id=103 Category: mail delivery Group: Mailman 2.1
Status: Closed Resolution: Fixed Priority: 5 Submitted By: Martin Pool (mbp) Assigned to: Nobody/Anonymous (nobody) Summary: handle DiscardMessage in ToDigest handler
Initial Comment: 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/mailman/cron/senddigests", line 94, in ? main() File "/usr/local/mailman/cron/senddigests", line 86, in main mlist.send_digest_now() File "/usr/local/mailman/Mailman/Digester.py", line 60, in send_digest_now ToDigest.send_digests(self, mboxfp) File "/usr/local/mailman/Mailman/Handlers/ToDigest.py", line 131, in send_digests send_i18n_digests(mlist, mboxfp) File "/usr/local/mailman/Mailman/Handlers/ToDigest.py", line 304, in send_i18n_digests msg = scrubber(mlist, msg) File "/usr/local/mailman/Mailman/Handlers/Scrubber.py", line 178, in process raise DiscardMessage Mailman.Errors.DiscardMessage 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.MemberAdaptor import ENABLED from Mailman.Handlers.Decorate import decorate @@ -301,7 +302,10 @@ print >> plainmsg, separator30 print >> plainmsg # Use Mailman.Handlers.Scrubber.process() to get plain text - msg = scrubber(mlist, msg) + try: + msg = scrubber(mlist, msg) + except (Errors.DiscardMessage): + continue # Honor the default setting for h in mm_cfg.PLAIN_DIGEST_KEEP_HEADERS: if msg[h]: ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300103&aid=860135&group_id=103
participants (1)
-
SourceForge.net