Make mailman more resilient to errors
Hi,
While setting up mailman, we made some mistakes: One thing we did was not restoring some important files.
One missing file in question was /opt/mailman/var/lists/b1.LISTDOMAIN.ch/digest.mmdf
.
Mailman was still able to hold incoming messages. Accepting returns a The message was accepted
message.
Mailman then removed the message from the held messages, but was unable to actually send the message (see error below).
It would be nice if the mail would not have beed removed from the held messages list. I think a little more resilience to errors (like corruptions of files) would greatly increase the experience of mailman.
May 02 15:15:30 2018 (67) Uncaught runner exception: [Errno 2] No such file or directory: '/opt/mailman/var/lists/b1.LISTDOMAIN.ch/digest.mmdf'
May 02 15:15:30 2018 (67) Traceback (most recent call last):
File "/usr/lib/python3.5/mailbox.py", line 579, in __init__
f = open(self._path, 'rb+')
FileNotFoundError: [Errno 2] No such file or directory: '/opt/mailman/var/lists/b1.LISTDOMAIN.ch/digest.mmdf'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/mailman/core/runner.py", line 171, in _one_iteration
self._process_one_file(msg, msgdata)
File "/usr/local/lib/python3.5/dist-packages/mailman/core/runner.py", line 264, in _process_one_file
keepqueued = self._dispose(mlist, msg, msgdata)
File "/usr/local/lib/python3.5/dist-packages/mailman/runners/pipeline.py", line 37, in _dispose
process(mlist, msg, msgdata, pipeline)
File "/usr/local/lib/python3.5/dist-packages/mailman/core/pipelines.py", line 52, in process
handler.process(mlist, msg, msgdata)
File "/usr/local/lib/python3.5/dist-packages/mailman/handlers/to_digest.py", line 47, in process
with Mailbox(mailbox_path, create=True) as mbox:
File "/usr/lib/python3.5/mailbox.py", line 891, in __init__
_mboxMMDF.__init__(self, path, factory, create)
File "/usr/lib/python3.5/mailbox.py", line 583, in __init__
f = open(self._path, 'wb+')
FileNotFoundError: [Errno 2] No such file or directory: '/opt/mailman/var/lists/b1.LISTDOMAIN.ch/digest.mmdf'