On Thu, Dec 22, 2022 at 9:36 AM Mark Sapiro <mark@msapiro.net> wrote:
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.
And that happens because I have all my config files in /opt/mailman/mm/. So if I moved all of them to /etc/mailman3/ it would settle for that? I will test it.
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.
I am glad it's an email that is probably overtaken by events. However, the good thing is that I will have the archives from MM2 still accessible once I move to MM3.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)