Pony Mail supports many ways of importing your old mail archives via the
import-mbox.py script. For command line argument tips, run
Imports are digested equally every time (*), so you can import from the same source multiple times without creating duplicate emails in the archive. Both the archiver and the importer use the same digest method, so they can overlap. Usually, you'll want to set up the archiver first, and when emails start flowing through it, you'll use the importer to import older emails.
Provided you have the main mod_mbox page at https://your.tld/mod_mbox/ and your (sub)domain resources at https://your.tld/mod_mbox/$list-yourdomain/, you can import all lists from that domain using:
python3 import-mbox.py --source https://your.tld/mod_mbox/ --mod-mbox --project yourdomain
For a quick update, which only imports the last 2 months of mail, append the
You can also import just a single list by specifying that list ID:
python3 import-mbox.py --source https://your.tld/mod_mbox/ --mod-mbox --project listname-yourdomain
To import an entire site, use the same command as above, but omit the
python3 import-mbox.py --source https://your.tld/mod_mbox/ --mod-mbox
If your old archive varies in terms of list IDs across time, you can force harmonization by using the
python3 import-mbox.py --source https://your.tld/mod_mbox/ --mod-mbox --project listid-yourdomain --lid "<listid.yourdomain.tld>"
This should only be done one list at a time.
To import from pipermail, you will have to run the import one list at a time. As with mod_mbox imports, you must specify a source, but use
--pipermail instead of
python3 import-mbox.py --source https://your.tld/pipermail/foolist/ --pipermail
While you can convert HTML-only emails to text using
--html2text, Pipermail has some peculiarities
where it adds a text/plain message to these emails, thus preventing html2text from working. You can
circumvent this by using the
--ignorebody "foo" arg to ignore all text/plain bodies containing
project flag is not needed here, you may wish to specify the list ID for the import.
To import from one or more local mbox files, specify a filesystem path as the source:
python3 import-mbox.py --source /tmp/mylists/
This will recursively import all files with the extension '.mbox'.
You can change the extension as follows:
python3 import-mbox.py --source /tmp/mylists/ --ext .mbx
To match all files with any non-empty extension:
python3 import-mbox.py --source /tmp/mylists/ --ext '.*'
To match files regardless of extension:
python3 import-mbox.py --source /tmp/mylists/ --ext ''
Or you can import a single file:
python3 import-mbox.py --source 2016-11.mbox
(This is supported in versions after 0.9)
We have a few test archives for those that wish to test large imports. They can be found in gzip format at http://ponymail.info/mboxes/
(*) The digest depends on the [archiver] generator setting in ponymail.cfg If that varies between imports, then duplicates will occur
Apache Pony Mail (Incubating) is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.