
- On 4/17/25 19:44, Mihai Moldovan wrote:
Great, that will definitely create it in the format expected by Python and hence mailman! Thank you very much.
Then again, I realized that just adding messages from a mailman 2.1 mbox to the prototype Maildir is not the correct route to take, because they'd be missing at least the Message-ID-Hash and Archived-At headers (the last one should probably point to the Hyperkitty archives, which makes it just a bit more difficult). There might be other headers that need to added or mangled, these are just the two that stood out to me.
Getting this right is more involved, especially since these headers are generated in the guts of mailman and commonly seem to be retrieved from a msgdata object coming from the switchboard.
New incoming messages will have the correct data, of course, but imported ones wouldn't, so I'll have to use a more sophisticated approach to handle them, probably by going through mailman's email wrapper, figuring out how to generate a msgdata object for a message, using RFC2369.process and maybe more.
Mihai