On 12/10/19 5:35 AM, Marvin Gülker wrote:
Am 10. Dezember 2019 um 17:09 Uhr +0900 schrieb Stephen J. Turnbull:
I would guess this is in the shunt queue. If there's only one file there, you can just delete it.
The issue in this case is not a shunted message. it is a message held for moderation. The message itself is in Mailman's var/messages/ directory. It is pointed to by an entry in the database 'message' table.
The var/messages/ directory contains two levels of subdirectories and the message files. The file name is the message-id hash. The first subdirectory is the first two characters of the name and the second subdirectory is the next two characters of the name. E.g. a message with message-id hash = UPZXRAAO6Q7HDDJR7LH5NAYTIX57C32X will be stored as a pickle in the file var/messages/UP/ZX/UPZXRAAO6Q7HDDJR7LH5NAYTIX57C32X.
The underlying issue here is probably <https://bugs.python.org/issue32330>, but that knowledge doesn't help us. We need to get rid of the offending message in the message store. The first step is in mailman shell. Note the paths /opt/mailman/mm/bin/ and /opt/mailman/mm/var/ will need to be adjusted.
/opt/mailman/mm/bin/mailman shell Welcome to the GNU Mailman shell
import os import pickle for root, dirs, files in os.walk('/opt/mailman/mm/var/messages'): ... for fn in files: ... print(fn) ... with open(os.path.join(root, fn), 'rb') as fp: ... msg = pickle.load(fp) ... print(msg['Message-ID-Hash']) ...
This should print the file name and Message-ID-Hash (two lines the same) for each message in the messages directory until it prints only one line followed by the UnicodeEncodeError exception. That list line is the file name/Message-ID-Hash of the offending message.
Then you need to run the query
DELETE FROM message WHERE message_id_hash = xxx;
against the mailman database where xxx is the hash value you found above.
I confess that I haven't visited the held messages page for a very long time (because I didn't have a reason to; I received no notifications of held messages). Only after I received the notification that my errorneous message was being held, I visited it, and I was faced with the 500 error. If Mailman failed to notify me of held messages previously, they might have been in hold status already and one of them might be the cause.
As of Mailman core 3.3.0 there is a 'mailman notify' command designed to be run periodically by cron to notify owners/moderators of prnding requests.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan