Importing Mailman 2 Lists apart from Django
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?
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?
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.
Thanks.
-- 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/
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?
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?
Its an interesting question, my understanding on this is that Mailman Core and Hyperkitty are separate projects and so if you are building a replacement to Hyperkitty you would need to deal with how messages get posted to it (currently Mailman sends messages to Hyperkitty when they get posted) and also how archives can be imported.
I may be wrong on this but if you were creating a new archiver you would need to factor this in, you also would have the choice to use the current schema that Hyperkitty uses or your own database schema elsewhere. If you use the Hyperkitty schema I guess you could continue to use it's import process, but that may limit your design decisions for the software you are writing.
Andrew.
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.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
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/
participants (3)
-
Andrew Hodgson
-
Brian Carpenter
-
Mark Sapiro