Requirements: A server with IMAPSync installed. Pre-compiled packages are available for most platforms.
One of the most popular open source email migration tools is imapsync. While it might not be as easy to use as many of the other options, it is still a very powerful tool.
To use imapync to migrate the emails from one IMAP compatible server onto a Cyrus server, we can use the following command:
imapsync –host1 source.server.tld –user1 source.user –password1 source.password -ssl1 –host2 destination.server.tld –user2 destination.user –password2 destination.password