Stephen J. Turnbull wrote:
>
>At least in earlier implementations of the email lib and Mailman, the
>original parse of the message was not enclosed in the shunt mechanism,
>so the exception got caught by the catchall handler, not the shunt
>handler.

You're right Stephen. I overlooked that. The dequeue of the message is
in it's own try, not in the main try that runs the process. Thus, the
failure to parse the message in dequeue is supposed to result in the
message being discarded and an 'Ignoring unparseable message:' entry
in the 'error' log. The problem here is ValueError is not one of the
exceptions we catch in the try around dequeue. We only catch
email.Errors.MessageParseError.

Another problem is in implementing backup queue entries to prevent
message loss in the event of catastrophic failure, we forgot to delete
the backup queue entry at this juncture. The attached patch needs to
be applied to Mailman/Queue/Runner.py, but that won't fix this
immediate problem. For that, we need to expand the exceptions we catch
at

            try:
                # Ask the switchboard for the message and metadata
objects
                # associated with this filebase.
                msg, msgdata = self._switchboard.dequeue(filebase)
            except email.Errors.MessageParseError, e:

A workaround in the interim is to change the except above to

            except Exception, e:

This will require some more thought for a permanent fix.

-- 
Mark Sapiro <[EMAIL PROTECTED]>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

Index: Runner.py
===================================================================
--- Runner.py   (revision 8094)
+++ Runner.py   (revision 8095)
@@ -107,6 +107,7 @@
                 # metadata, so just log the exception and continue.
                 self._log(e)
                 syslog('error', 'Ignoring unparseable message: %s', filebase)
+                self._switchboard.finish(filebase)
                 continue
             try:
                 self._onefile(msg, msgdata)
------------------------------------------------------
Mailman-Users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp;file=faq01.027.htp

Reply via email to