Table of Contents

imapsync

http://imapsync.lamiral.info/

Usage

./imapsync --host1 test1.lamiral.info   --user1 test1   --password1 'secret1' \
           --host2 test2.lamiral.info   --user2 test2   --password2 'secret2' \
           --automap --justfolders --dry "$@"

GMail

Enable access from less secure apps!

./imapsync --host1 imap.gmail.com --ssl1 --user1 account1@gmail.com --password1 gmailsecret1 \
           --host2 imap.gmail.com --ssl2 --user2 account2@gmail.com --password2 gmailsecret2 \
           --maxbytespersecond 250000 --automap --exclude "\[Gmail\]$"

–maxbytespersecond is useful because GMail limits IMAP transfer size to 1GB/h.

CLI Options

–host1 IMAP source server hostname or IP address
–user1 IMAP source user login
-password1 IMAP source user password
–host2 IMAP destination server hostname or IP address
–user2 IMAP destination user login
–password2 IMAP destination user password
–dry makes imapsync doing nothing, just print what would be done without –dry
–justfolders does only things about folders (ignore messages). It is good to verify the folder mapping is good for you.
–automap guesses folders mapping, for folders like Sent, Junk, Drafts, All, Archive, Flagged.