Imapsync and Archiveopteryx

Imapsync is a program to synchronise two IMAP mailboxes, mailbox trees or servers. It can be used to migrate mail to/from Archiveopteryx.

In order to copy mail to Archiveopteryx, two imapsync options are necessary and one is recommended:

--skipsize: Imapsync normally compares the messages and considers them different if their size in bytes is different. Because Archiveopteryx stores messages in a database, the byte size tends to be a little different than e.g. for Cyrus. Not much, but even one byte is enough to make imapsync's equality test fail.

--useheader message-id: By default imapsync compares all header fields of each message on the source and destination servers, using the exact RFC822 encoding used by each server. This option instructs imapsync to use only the message-id when comparing messages.

--fast: Disables a workaround for servers which don't reliably store flags using the Append command. Archiveopteryx doesn't need the workaround.

As a bonus, these options also speed up imapsync and make it use less bandwidth.

Note that if imapsync is much slower than aoximport, so if you can carry out a migration with aoximport, that will be faster. However imapsync works in many cases that aoximport does not.

The versions of imapsync we tested are 1.182 and 1.233. We used this command line:

imapsync --skipsize --useheader message-id
    --host1 olderserver --user1 heidi --password1 pils
    --host2 localhost --user2 heidi --password2 pils

In case of questions, please write to

Relevant links

About this page

Last modified: 2010-11-19