[Mailman-Users] Need queue error help
Harald Meland
Harald.Meland at usit.uio.no
Tue Jun 15 20:39:24 CEST 1999
[John Lewis]
> Greetings,
>
> What does this error mean? And how do I go about resolving it?
It means one of your queue files are corrupted -- and that Mailman's
croaking on it is a bad thing.
Resolving it is easiest done by removing the corrupted file -- here's
a (only lightly tested) patch to make Mailman log exactly what file(s)
that's corrupted (and continue to process the rest of the queue
files):
Index: OutgoingQueue.py
===================================================================
RCS file: /export/public/cvsroot/mailman/Mailman/OutgoingQueue.py,v
retrieving revision 1.13
diff -u -r1.13 OutgoingQueue.py
--- OutgoingQueue.py 1999/02/27 17:05:54 1.13
+++ OutgoingQueue.py 1999/06/15 18:34:36
@@ -36,6 +36,7 @@
# only one such process to happen at a time.
#
+import sys
import os
import stat
import marshal
@@ -117,10 +118,31 @@
st[stat.ST_CTIME] > (time.time() - MAX_ACTIVE)):
# then
continue
- f = open(full_fname,"r")
- recip,sender,text = marshal.load(f)
- f.close()
- Utils.TrySMTPDelivery(recip,sender,text,full_fname)
+ try:
+ f = open(full_fname,"r")
+ recip,sender,text = marshal.load(f)
+ f.close()
+ Utils.TrySMTPDelivery(recip,sender,text,full_fname)
+ failure = None
+ except (# marshal.load() failed
+ EOFError, ValueError, TypeError,
+ # open() or close() failed
+ IOError):
+ failure = sys.exc_info()
+
+ if failure:
+ # Should we risk moving the queue file out of the way? That
+ # might cause another exception, if the permissions are
+ # wrong enough...
+ t, v = failure[0], failure[1]
+ from Logging.StampedLogger import StampedLogger
+ l = StampedLogger("error", "processQueue", immediate=1)
+ l.write("Processing of queue file %s failed:\n" % full_fname)
+ l.write("\t %s" % t)
+ if v:
+ l.write(' / %s' % v)
+ l.write('\n')
+ l.flush()
lock_file.unlock()
--
Harald
More information about the Mailman-Users
mailing list