aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman/Handlers
diff options
context:
space:
mode:
authortkikuchi <>2005-06-26 05:27:47 +0000
committertkikuchi <>2005-06-26 05:27:47 +0000
commit91d89547af9bdb312b0a199bffe678d4f44ded99 (patch)
treecfb32aed00447254105a5b3abec6bed2252623c3 /Mailman/Handlers
parent70a084d5a3cd711d14407bbb1ec24be0b74a2299 (diff)
downloadmailman2-91d89547af9bdb312b0a199bffe678d4f44ded99.tar.gz
mailman2-91d89547af9bdb312b0a199bffe678d4f44ded99.tar.xz
mailman2-91d89547af9bdb312b0a199bffe678d4f44ded99.zip
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.
Diffstat (limited to 'Mailman/Handlers')
-rw-r--r--Mailman/Handlers/ToDigest.py17
1 files changed, 14 insertions, 3 deletions
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()