On Sat, Nov 18, 2023 at 1:42 AM Mark Sapiro <mark@msapiro.net> wrote:
On 11/17/23 00:51, Odhiambo Washington wrote:
I am scratching my head bald trying to figure out how to bring in this other MM3 site and list into my existing server, especially with regard to the DB backend.
The list - let's call it users@domainX.name was using MySQL backend and had a separate DB for Mailman core and Mailman web. I believe combining these into one isn't a problem. But getting to merge this DB into my current one is what I am not sure about.
This is https://gitlab.com/mailman/postorius/-/issues/13 which is a real need, but doesn't yet exist.
I think the easiest thing for the archives is to forget the Mailman web DB and just export the archive as a mbox from the other site (if it's large, exporting the entire archive will time out so you have to do it in pieces). Then you can use hyperkitty_import to import it.
What is the command to export the archive as a mbox from the DB? I can't figure out which option it is by looking at 'mailman-web -h'.
For the list data, it's probably easiest to just create the list manually and go through the settings in Postorius and make them match,
I want to go with the above.
although you could dump the mailinglist table entry where list_id =
'users@domainx.name' and load that, but you'd need to edit the id field in the dump to match the id on your server.
Not going with that.
That leaves the members.
Given that I have a dump of the two DBs (mailman and mailman-web) I just created one DB and imported them. I have been able to dump the members into a text file. Now importing is not a problem. BTW, how will ' mailman addmembers' treat a file containing:
Firstname Lastname <email@address>
Onlyname <email2@address>
?
Doing this with a DB dump/load would be very complex because while the member table has a list_id field which is the id of the list's entry in the mailinglist table and can be used to select the relevant members, these records also link to entries in the address, preferences and user tables and matching them would be an issue.
I am also not taking that path.
I think a custom script would be required. If I were doing this, I would
make a separate database on my server with a copy of the data from the other server and then try to make a script that would extract data from the other database and add it to mine.
Alternatively you could just dump the members from the other servers
with the
mailman members
command perhaps separately for regular and the different digest types and then add them with themailman addmembers
command. This wouldn't get all their attributes, but it could work.
I have opted for the simple way to do this:
- Create the site in Django Admin and create/configure the list in Postorius
- Add the members from the file dump, with delivery set to regular.
- Send the members an email informing them that they need to set their delivery preferences.
I am stuck on the issue of exporting the archives to mbox file as already stated above.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html]