Imapsync migrating to a new server
From Zarafa wiki
To migrate mail from an IMAP server to a Zarafa server you can use the opensource tool imapsync. This tool synchronize all folders and items from the existing IMAP server to the Zarafa IMAP gateway.
Unfortunately it is not completely free anymore to download.
The syntax to use imapsync is:
imapsync --noauthmd5 --host1 mail.old --user1 userold --password1 passw1 -sep2 / --prefix2 "" --host2 zarafa.new --user2 usernew --password2 passw2
Description of the extra options:
The option --noauthmd5 forces authentication with plain password, which the Zarafa gateway only supports The option --sep2 / is to define the used separator for Zarafa The option --prefix2 "" is to define the basic starting folder The option --allowsizemismatch is necessary when migrating from google/gmail accounts
Hint: If you don't know all user password in Zarafa, you can change in the gateway.cfg the server_socket to file:///var/run/zarafa. This change allows users to login without a password. Make sure to switch this option back to http://localhost:236/zarafa after the migration!
Note: The password is plain text and is readable, to change this, it is possible to use ssl, when you put in extra options (Read: man imapsync)
If you find imapsync confusing and cumbersome to use, you may want to look into YippieMove Batch Email Migration. It's much like imapsync, but with a web-based interface. They also offer support for the migration.
In some special cases it may be advisable to rather use imapcopy  It's included in most major Linux distributions. Especially when moving from vpopmail Server to Zarafa, there are occasions, where imapsync does not copy all mails available from a mailbox! Please always do a dry run first with a) a normal/small mailbox and b) with at least one large mailbox and compare your 'element count'.