What ways are there to move a forum to an existing Mailman 3 list, so that each old forum message is displayed in the archive as if it had been an email?
Thank you
Jonathan
Sent from my iPhone
On 10/7/20 2:52 PM, Jonathan M wrote:
What ways are there to move a forum to an existing Mailman 3 list, so that each old forum message is displayed in the archive as if it had been an email?
Can you export the posts from the forum in a format that looks like email messages? Python's standard library mailbox module can be used to read a set of messages in any of Maildir, mbox, MH, Babyl, or MMDF format and write them to a mbox format file which can then be imported into HyperKitty. The requirements are that the exported messages have headers like an email message. At a minimum, From:, Date: and Subject:.
See <https://docs.python.org/3/library/mailbox.html> for more detail about mailbox formats.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro wrote:
Can you export the posts from the forum in a format that looks like email messages? Python's standard library mailbox module can be used to read a set of messages in any of Maildir, mbox, MH, Babyl, or MMDF format and write them to a mbox format file which can then be imported into HyperKitty. The requirements are that the exported messages have headers like an email message. At a minimum, From:, Date: and Subject:.
Thanks for this. I’m sure I could turn that basic information (from, date, subject) into an mbox file somehow. What else does Mailman need, eg to work out which messages are in reply to which?
Would it be possible to add ex-forum message “emails” like this to an existing mailing list archive?
Thank you
Jonathan
On 10/9/20 4:39 PM, jonathan.mailing.lists@gmail.com wrote:
Thanks for this. I’m sure I could turn that basic information (from, date, subject) into an mbox file somehow. What else does Mailman need, eg to work out which messages are in reply to which?
To properly thread messages, each message should have a unique Message-ID: header and all replies should have an In-Reply-To: header with the Massage-ID: of the message to which it's a reply.
E.g. the first message in a thread has
Message-ID: <some_unique_string@example.com>
A reply to that has
Message-ID: <different_unique_string@example.com> In-Reply-To: <some_unique_string@example.com>
and a reply to that message has
Message-ID: <third_unique_string@example.com> In-Reply-To: <different_unique_string@example.com>
The angle brackets around the strings are required and every Message-ID: in the entire archive for a list must be unique. If threading is not an issue, hyperkitty_import will generate a unique Message-ID: for any message without one. References: headers are not required.
Would it be possible to add ex-forum message “emails” like this to an existing mailing list archive?
Yes. When running hyperkitty_import you probably need to specify since= in this case, otherwise only messages with dates newer that the newes message in the existing archive will be imported.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro writes:
On 10/9/20 4:39 PM, jonathan.mailing.lists@gmail.com wrote:
Thanks for this. I’m sure I could turn that basic information (from, date, subject) into an mbox file somehow. What else does Mailman need, eg to work out which messages are in reply to which?
To properly thread messages, each message should have a unique Message-ID: header and all replies should have an In-Reply-To: header with the Massage-ID: of the message to which it's a reply.
[example thread omitted]
The angle brackets around the strings are required and every Message-ID: in the entire archive for a list must be unique.
This is harder to do well (or even "well enough") than you might think. I recommend using some software targeting RFC 4122: https://tools.ietf.org/html/rfc4122. RFC 4122 is implemented in the Python standard library (the uuid module), so if you have Mailman, you have it. The command line utility uuidgen is also good, and you probably have that too if you prefer CLI scripting to Python.
Steve
participants (4)
-
Jonathan M
-
jonathan.mailing.lists@gmail.com
-
Mark Sapiro
-
Stephen J. Turnbull