On 6/21/19 8:38 PM, J.B. Nicholson wrote:
What is the recommended file format for mail archives to share?
I ask because I often see mailman mailing list archives available as some format of mbox file. I like this feature. I want to quickly import a bunch of archived messages into my account so that I can read old threads and get more discussion context anytime I need it.
Some flavor of mbox is ubiquitous in the *nix world. The problem with this format is lines in the message body beginning with 'From '. Most modern software that writes mbox format files avoids this problem by somhow mangling such lines. The Python mailbox package will prefix such lines with '>' when writing a message to a mbox.
Before Mailman 3, Mailman kept a cumulative archive in mbox format. Even after pipermail was included, the cumulative mbox was normally written and could be used to rebuild the pipermail archive or move the archive elsewhere. The problem is that the Python mailbox package didn't always mangle 'From ' lines in the body, so archive mboxes that go back many years are likely to have problems.
A more robust mailbox format which is still a single file is MMDF format. This is similar to mbox with the addition that each message is preceded and followed by a line consisting of exactly four control-A bytes. I.e., there is one such line at the beginning and at the end of the file and two such lines between each message. Mailman 3 uses this format for the mailboxes that accumulate messages for digests.
However, lot's of things including HyperKitty's importer and Mailman 2's bin/arch tool require input in mbox format.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan