| <!DOCTYPE html><html><head><meta charset="utf-8"><title>Apache Pony Mail (Incubating)</title> |
| <link rel="stylesheet" type="text/css" href="/css/default.css"/> |
| <link rel="stylesheet" type="text/css" href="/css/fa/fa.css"/> |
| <link rel="apple-touch-icon" sizes="57x57" href="/icons/apple-icon-57x57.png"> |
| <link rel="apple-touch-icon" sizes="60x60" href="/icons/apple-icon-60x60.png"> |
| <link rel="apple-touch-icon" sizes="72x72" href="/icons/apple-icon-72x72.png"> |
| <link rel="apple-touch-icon" sizes="76x76" href="/icons/apple-icon-76x76.png"> |
| <link rel="apple-touch-icon" sizes="114x114" href="/icons/apple-icon-114x114.png"> |
| <link rel="apple-touch-icon" sizes="120x120" href="/icons/apple-icon-120x120.png"> |
| <link rel="apple-touch-icon" sizes="144x144" href="/icons/apple-icon-144x144.png"> |
| <link rel="apple-touch-icon" sizes="152x152" href="/icons/apple-icon-152x152.png"> |
| <link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-icon-180x180.png"> |
| <link rel="icon" type="image/png" sizes="192x192" href="/android-icon-192x192.png"> |
| <link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png"> |
| <link rel="icon" type="image/png" sizes="96x96" href="/icons/favicon-96x96.png"> |
| <link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png"> |
| <link rel="manifest" href="/icons/manifest.json"> |
| <meta name="msapplication-TileColor" content="#ffffff"> |
| <meta name="msapplication-TileImage" content="/icons/ms-icon-144x144.png"> |
| <meta name="theme-color" content="#ffffff"> |
| </head><body> |
| <div style="margin: -10px; background: #7e614a; color: #EEE; margin-bottom: 20px; text-align: center;"> |
| <a href="/contribute.html"><img align='left' style="width: 150px; height: 150px; position: relative; left: -4px; border: 0;" src="/images/devme.png" alt="Fork/Download Pony Mail"></a> |
| <h1><a id="title" href="/" style="color: #FFF;">Apache Pony Mail (Incubating)</a></h1> |
| <div id="menubar" style="font-size: 20pt; background: #5e514a; padding-top: 5px;"> |
| <ul> |
| <li><a href="/docs.html"><i class="fa fa-book"></i><span>Documentation</span></a></li> |
| <li><a href="/source.html"><i class="fa fa-git-square"></i><span>Source</span></a></li> |
| <li><a href="/downloads.html"><i class="fa fa-cloud-download"></i><span>Download</span></a></li> |
| <li><a href="/support.html"><i class="fa fa-question-circle"></i><span>Get support</span></a></li> |
| <li><a href="/contribute.html"><i class="fa fa-share-alt"></i><span>Contribute</span></a></li> |
| <li><a href="/about.html"><i class="fa fa-users"></i><span>About</span></a></li> |
| </ul> |
| </div> |
| </div> |
| <h1>Importing Data to Pony Mail</h1> |
| <p>Pony Mail supports many ways of importing your old mail archives via the |
| <code>import-mbox.py</code> script. For command line argument tips, run <code>python3 |
| import-mbox.py --help</code>.</p> |
| <p>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.</p> |
| <h2>Importing attachments</h2> |
| <p>If you wish to import attached files, add the <code>--attachments</code> flag to your import command, otherwise, attachments will be stripped.</p> |
| <h2>Importing from mod_mbox</h2> |
| <h3>Importing a single domain</h3> |
| <p>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:</p> |
| <p><code>python3 import-mbox.py --source https://your.tld/mod_mbox/ --mod-mbox --project yourdomain</code></p> |
| <p>For a quick update, which only imports the last 2 months of mail, append then <code>--quick</code> flag.</p> |
| <p>You can also import just a single list by specifying that list ID:</p> |
| <p><code>python3 import-mbox.py --source https://your.tld/mod_mbox/ --mod-mbox --project listname-yourdomain</code></p> |
| <h3>Importing an entire archive (multiple domains)</h3> |
| <p>To import an entire site, use the same command as above, but omit the <code>--project</code> flag</p> |
| <p><code>python3 import-mbox.py --source https://your.tld/mod_mbox/ --mod-mbox</code></p> |
| <h3>Setting the domain or list id properly in case of variance</h3> |
| <p>If your old archive varies in terms of list IDs across time, you can force harmonization by using the <code>--lid</code> or <code>--domain</code> flags:</p> |
| <p><code>python3 import-mbox.py --source https://your.tld/mod_mbox/ --mod-mbox --project listid-yourdomain --lid "<listid.youdomain.tld>"</code></p> |
| <p>This should only be done one list at a time.</p> |
| <h2>Importing from Pipermail</h2> |
| <p>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 <code>--pipermail</code> instead of <code>--mod-mbox</code>:</p> |
| <p><code>python3 import-mbox.py --source https://your.tld/pipermail/foolist/ --pipermail</code></p> |
| <h3>Pipermail and html-only emails</h3> |
| <p>While you can convert HTML-only emails to text using <code>--html2text</code>, 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 <code>--ignorebody "foo"</code> arg to ignore all text/plain bodies containing <code>foo</code>.</p> |
| <p>While the <code>project</code> flag is not needed here, you may wish to specify the list ID for the import.</p> |
| <h2>Importing from locally stored mbox files</h2> |
| <p>To import from one or more local mbox files, specify a filesystem path as the source:</p> |
| <p><code>python3 import-mbox.py --source /tmp/mylists/ --attachments</code></p> |
| <p>If you have a mix of mbox and non-mbox files in the specific dir, you may wish to let Pony Mail know which files to scan:</p> |
| <p><code>python3 import-mbox.py --source /tmp/mylists/ --ext .mbox --attachments</code></p> |
| <h2>Test archives</h2> |
| <p>We have a few test archives for those that wish to test large imports. |
| They can be found in gzip format at <a href="http://ponymail.info/mboxes/">http://ponymail.info/mboxes/</a></p> |
| <h4><a id="disclaimer"></a>Disclaimer</h4> |
| <p style="font-size: 8pt; line-height: 12pt;"> |
| <a href="https://incubator.apache.org"><img src="/images/podling.svg" align="right" width="220px"/></a> |
| Apache Pony Mail (Incubating) is an effort undergoing incubation at |
| The Apache Software Foundation (ASF), sponsored by the <a href="https://incubator.apache.org"> |
| Apache Incubator</a>. 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. |
| </p> |
| <p style="font-size: 8pt; line-height: 12pt;"> |
| Copyright 2016, the Apache Software Foundation.<br/> |
| Apache Pony Mail is a trademark of the Apache Software Foundation. |
| Apache and the Apache feather are registered trademarks of the |
| Apache Software Foundation. |
| </p> |
| </body></html> |