From 91d89547af9bdb312b0a199bffe678d4f44ded99 Mon Sep 17 00:00:00 2001 From: tkikuchi <> Date: Sun, 26 Jun 2005 05:27:47 +0000 Subject: Fix SF BugID 1179487: Although the RFC2231 bug example in the tracker has been solved in mailman-2.1.6, there may be more cases where ToDigest.send_digests() can block regular delivery. I put the send_digests() calling part in try - except clause and leave a message in the error log if something happened in send_digests(). Daily call of cron/senddigests will notify more details to the site administrator. --- Mailman/Handlers/ToDigest.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'Mailman/Handlers') diff --git a/Mailman/Handlers/ToDigest.py b/Mailman/Handlers/ToDigest.py index ac0c31d9..d385f476 100644 --- a/Mailman/Handlers/ToDigest.py +++ b/Mailman/Handlers/ToDigest.py @@ -88,9 +88,20 @@ def process(mlist, msg, msgdata): if size / 1024.0 >= mlist.digest_size_threshhold: # This is a bit of a kludge to get the mbox file moved to the digest # queue directory. - mboxfp.seek(0) - send_digests(mlist, mboxfp) - os.unlink(mboxfile) + try: + # Let's close in try - except here because a error in send_digest + # can stop regular delivery silently. Unsuccessful digest + # delivery should be tried again by cron and the site + # administrator will be notified of any error explicitly by the + # cron error message. + mboxfp.seek(0) + send_digests(mlist, mboxfp) + os.unlink(mboxfile) + except Exception, errmsg: + # I know bare except is prohibited in mailman coding but we can't + # forcast what new exception can occur here. + syslog('error', 'send_digests() failed: %s', errmsg) + pass mboxfp.close() -- cgit v1.2.3