On 4/30/20 11:59 AM, Mark Sapiro wrote:
On 4/30/20 7:59 AM, Brian Carpenter wrote:
Hello Mailman Users,
Are there instructions on importing a Mailman 2 list into a Mailman 3 core installation only? Does the import21 script not need Django/Postorius/Hyperkitty?
import21 requires only Mailman core.
It seems Django is required to import archives I guess because of the use of Hyperkitty. How about importing archives without having a Django installation? Is that what the prototype archiver for?
The only current archive import we support is
django-admin hyperkitty_import
which imports archive .mbox files into HyperKitty.The prototype archiver is just a maildir format collection of messages.
Converting an mbox file to a maildir is trivial.
from mailbox import Maildir, mbox mb = mbox('/path/to/mbox', create=False) md = Maildir('/path/to/maildir', create=True) for msg in mb: md.add(msg)
We are getting ready to start working on a custom forum application for Mailman 3 (called Empathy) and I am would like to import some mailman 2 archives into the development server to work with.
First you have to decide how Empathy will store messages. Look at <https://gitlab.com/mailman/hyperkitty/-/blob/master/hyperkitty/management/commands/hyperkitty_import.py#L93>. This is how HyperKitty gets messages from a mbox and adds them to its database. It's actually fairly simple - a lot of the code is handling exceptions due to defective messages.
Presumably Empathy will have a method for adding a message to the archive, so importing is just getting messages from the mbox and using Empathy's method to add it.
Thank you Mark. Your response was very helpful. This should help my developer make some decisions.
-- Please let me know if you need further assistance.
Thank you for your business. We appreciate our clients. Brian Carpenter EMWD.com
-- EMWD's Knowledgebase: https://clientarea.emwd.com/index.php/knowledgebase
EMWD's Community Forums http://discourse.emwd.com/