The purpose of imapsync is to migrate IMAP accounts or to backup IMAP accounts. IMAP is one of the three current standard protocols to access mailboxes, the two other are POP3 and HTTP with webmails (often tied to an IMAP server).
Install dependencies
Install modules from CPAN
Clone git repository
Build and install
When everything above went ok, you should see something like this when imapsync -v
Start syncing
An example syntax on how to sync from server1 on to server2, both using ssl.