Using imapsync to replicate email
1. Download and install the latest version of imapsync at http://www.linux-france.org/prj/imapsync/dist/. As of today, the latest version is 1.255.
2. imapsync requires Mail-IMAPClient 2.2.9. Most recent Linux distribution comes with version > 3.x, so you will need to manually download it at http://search.cpan.org/~djkernen/Mail-IMAPClient-2.2.9/.
3. Extract it, and install Mail-IMAPClient 2.2.9
wget http://search.cpan.org/CPAN/authors/id/D/DJ/DJKERNEN/Mail-IMAPClient-2.2... tar xzf Mail-IMAPClient-2.2.9.tar.gz cd Mail-IMAPClient-2.2.9 perl Makefile.PL make install
4. You are set to go. The typical command to synchronize from imap mail to a courier imap mail server will be similar to this:
imapsync --host1 imap.source-mail.com --user1 me@source-mail.com --password1 mypassword \ --host2 imap.dest-mail.com --user2 me@dest-mail.com --password2 mypassowrd \ --syncinternaldates --prefix2 INBOX. --split1 100 --split2 100 \ --exclude Trash|Junk