On 11/20/23 00:58, Odhiambo Washington wrote:
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'.
Normally you do this on the old server via the HyperKitty web UI which has download buttons which do things like
https://example.com/archives/list/list@example.com/export/list@example.com.m...
or for a partial archive
However, in your case I don't think you have the old installation working any more so the above won't help.
BTW, how will ' mailman addmembers' treat a file containing:
Firstname Lastname <email@address> Onlyname <email2@address>
Correctly. It will import email@address with display name = 'Firstname Lastname' and email2@address with display name = 'Onlyname'.
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.
Perhaps you can export the mbox via the web UI on the old server or maybe temporarily create a second mailman-web on your server with the old mailman-web database and use that web UI. Otherwise, if you have a working mailman-web that can access this database, you could try something like
$ mailman-web shell
>>> from hyperkitty.lib.compat import get_list_by_name
>>> mlist = get_list_by_name('list_name_only', 'list_domain')
>>> with open('output.mbox', 'wb') as fp:
... for email in mlist.emails.order_by("archived_date").all():
... fp.write(email.as_bytes() + b'\n')
...
>>>
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan