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 <msapiro@value.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan