On 12/11/19 12:43 AM, Marvin Gülker wrote:
Thanks for this information. Ubuntu's mailman stores the messages below /var/lib/mailman3/messages. The "mailman" command is in the $PATH.
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.
I've execucted that code, but it does not cause an exception at all. It quietly runs through. I've attached the transcript of the shell session to this mail. With a little crude use of grep(1), however I found my held message in WQ/ZS/WQZSFFJLVMWQHMG4VYKGXJEKQVQXVK67.
Here's a revised script:
$ mailman shell
Welcome to the GNU Mailman shell
>>> import os
>>> import pickle
>>> for root, dirs, files in os.walk('/var/lib/mailman3/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'])
... x = msg.as_string()
...
I have adjusted the paths for your package, changed the second print to
print the message-is and added the
x = msg.as_string()
line. Now we expect to see the hash of each message-id followed by the
message-id followed by the exception for the offending message.
Does the messages directory contain only held messages? I've looked at some messages and all of these I looked at were spam. The directory structure contains 40 messages in total, accumulating to 480 KiB disk space.
Yes, the directory and the corresponding database table contains only messages held for moderator approval.
DELETE FROM message WHERE message_id_hash = xxx;
As the exception you expected did not occur, I didn't do this yet. I can make a database and directory backup and then run it, though. Should I try?
I assume after this I should also delete the respective files from the messages/ directory?
Actually, a better way to deal with this is in mailman shell
Welcome to the GNU Mailman shell
>>> ms = getUtility(IMessageStore)
>>> ms.delete_message('xxx')
>>>
where xxx is the message-id value printed from the above script.
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 pending requests.
I did receive an e-mail to the list owner address that told me that the e-mail from my incorrect e-mail address "requires approval". That was the first time I received such an e-mail. In parallel, on the incorrect e-mail address, I received the notification for moderator approval.
Yes, those are the only messages unless you are running mailman notify
. It seems however that the latest Debian (hence Ubuntu) package
doesn't have 3.3 yet.
As to why you didn't receive owner notices about the held spam, perhaps they were spam filtered or somehow otherwise lost.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan