On 12/20/22 22:25, Odhiambo Washington wrote:
In my case, running
mailman
without any arguments just makes it grok :)(venv) [mailman@gw ~/mm]$ mailman info
...
*config file: /opt/mailman/mm/mailman.cfg*
That's because it first looks in the current directory for mailman.cfg
and only if it doesn't find it there does it look in /etc/mailman3.
Ultimately, when I did the import, there was only one email from the
archives that failed to be imported - which I honestly don't mind, but maybe there is a solution for this "'utf-8' codec can't encode character '\udcae' in position 331: surrogates not allowed" ??
If you provide a copy of that message from the mbox, either on the list or to me directly, I'll investigate.
A mbox file containing that email and the associated thread can be downloaded from here: https://webmail.kictanet.or.ke/~wash/chunk_7.txt.gz
The offending message is multipart with an attached message/rfc822 part and that part has a preamble which in bytes is
b'This document is a Single File Web Page, also known as a Web Archive file. If you are seeing this message, your browser or editor doesn't support Web Archive files. Please download a browser that supports Web Archive, such as Windows\xae Internet Explorer\xae.'
The '\xae' is an iso-8859-1 encoding for '®', but no charset is
specified for this preamble so email message parsing ends up decoding
those as surrogates '\udcae' which throws the exception when
hyperkitty.lib.incoming.add_to_list() in trying to save the attachment
does att.set_content(content)
.
Normally, when messages to be archived arrive from core via mailman_hyperkitty, the surrogates are replaced by email.utils._sanitize(), but this doesn't happen with messages from hyperkitty_import.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan