Migrating to Archiveopteryx

Migrating mail folders

Archiveopteryx includes the aoximport program, which can transfer four kinds of mail folders to Archiveopteryx. This is usually the fastest solution, but doesn't work in all circumstances.

Many tools, most notably imapsync, transfer entire folders or folder hierarchies from one IMAP server to another. You can use this to transfer old mail from any IMAP server to Archiveopteryx. Imapsync needs read access to all the folders you want to transfer, which can be difficult if you want to transfer mail from many users.

Imapsync copies ACLs and all custom message flags from the source, so it is makes a more accurate copy than aoximport.

Some mail clients include a function to copy an entire mail folders from one server to another. This can be used to migrate mail to Archiveopteryx if the number of mail folders isn't too large.

We strongly recommend against using e.g. fetchmail or other SMTP-based solutions for migrating old mail. A script calling deliver for each message is also not recommended. Too many people have had problems using these approaches.

Messages with syntax errors

Since Archiveopteryx stores messages in parsed format in a database, it is possible that some messages can't be parsed and stored properly. aoximport includes code to deal with this problem. Other migration tools probably will skip the bad messages.

We're always willing to help with migrating bad messages. You can send bad messages to info@aox.org. The command aox anonymise garbles a message enough that we can't read the content, but we (probably) still can use it to find out what the problem was and add a workaround to the our parser.

In our experience, most bad messages fall into three categories. Spam is most common. Next comes mail from companies who use tricks to avoid replies (From: do not reply). The least common but most important category is mail from legacy systems like MHS and cc:Mail. Quite often mail from such systems has been imperfectly gatewayed into the internet email format.

Migrating users

In order to migrate to Archiveopteryx, you will need to create the right users, passwords and email addresses. Unfortunately, obtaining the necessary data from your old mail system is usually very difficult, so we don't know about or provide any tool to migrate this data automatically.

Once you have the data, it very easy to create a user with the aox command-line program. aox can be run in a loop like this:

for n in `sasldblistusers2 | cut -d@ -f1`; do
    aox add user $n pw $n@example.com

This example lists all the users of a Cyrus mail server and creates accounts for each. If there is a Cyrus user called fred, then there will be an Archiveopteryx user with login fred, password pw and address fred@example.com.

If you can, we recommend specifying addresses of the form Alice Aardvark <alice@example.com> rather than just alice@example.com. This is because Archiveopteryx sometimes uses the email address in outgoing mail, for example in vacation messages.

In case of questions, please write to info@aox.org.

Relevant links

About this page

Last modified: 2010-11-19
Location: aox.org/migration/