Hello,
occasionally we face the problem "The content of this message was lost." when handling a message on hold.
We use the mailman3 packages on Debian 12: 3.3.8-2~deb12u2 GNU Mailman 3.3.8 (Tom Sawyer) Python 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0] with postgresql, exim and Apache httpd on the same machine.
To get closer to this problem we made 2 changes: /usr/lib/python3/dist-packages/mailman/app/moderator.py
def _lost_message(mlist, subject, sender, message_id):
# Create a substitute for a message not found in the message store.
text = _("""
The content of this message was lost. It was probably cross-posted to
multiple lists and previously handled on another list.
""")
+ # Don’t send an empty message to all members in case this event occurs.
+ # raise an exception instead:
+ raise Exception("_lost_message",subject, sender, message_id)
/usr/lib/python3/dist-packages/mailman/runners/task.py
def _evict_pendings(self): … messages = getUtility(IMessageStore) for msg in messages.messages: # msg can be None if file is already removed. if msg is not None: mid = msg.get('message-id') if mid not in mids: messages.delete_message(mid) # 2024-12-11 fri: Debug inserted + tlog.debug('Task runner deleted message %s', mid) count += 1 tlog.info('Task runner deleted %d orphaned messages', count)
So let’s see what happens:
A message sent to one list is set on hold:
exim mainlog: 2025-01-28 14:10:23 1tclMF-00H6cW-1s <= user@s2024.tu-chemnitz.de H=vittal.hrz.tu-chemnitz.de (mail.tu-chemnitz.de) [2001:638:911:b01:134:109:133:32] P=esmtps X=TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256 CV=no K S=9058 id=2f972b-6798d700-9f-5b841500@14907502 2025-01-28 14:10:23 1tclMF-00H6cW-1s => fsr-hsw@lists.tu-chemnitz.de R=lists_mailman T=mailman3_transport H=localhost [::1] C="250 Ok" 2025-01-28 14:10:23 1tclMF-00H6cW-1s Completed
vette.log Jan 28 14:10:24 2025 (2602) HOLD: fsr-hsw@lists.tu-chemnitz.de post from user@s2024.tu-chemnitz.de held, message-id=<2f972b-6798d700-9f-5b841500@14907502>: The message is not from a list member
A task runner deleted the message 5 seconds later: task.log Jan 28 14:10:29 2025 (2609) Task runner deleted message <2f972b-6798d700-9f-5b841500@14907502> Jan 28 14:10:29 2025 (2609) Task runner deleted 1 orphaned messages
Later an owner/moderator want to do a moderation action: mailman.log: 2025-01-28 17:40:54 [FALCON] [ERROR] POST /3.1/lists/fsr-hsw@lists.tu-chemnitz.de/held/7544 => Traceback (most recent call last): File "falcon/app.py", line 365, in falcon.app.App.__call__ File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 155, in on_post handle_message(self._mlist, request_id, **arguments) File "/usr/lib/python3/dist-packages/mailman/app/moderator.py", line 144, in handle_message msg = _lost_message(mlist, subject, sender, message_id) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/mailman/app/moderator.py", line 104, in _lost_message raise Exception("_lost_message",subject, sender, message_id) Exception: ('_lost_message', 'Re: [Fsr-hsw] ...', 'user@s2024.tu-chemnitz.de', '<2f972b-6798d700-9f-5b841500@14907502>')
Do you have any suggestions what we can do to find the reason, why the task runner deletes the message? Or any other hints …
Thanks and kind regards Frank
-- Frank Richter, Chemnitz University of Technology, Germany