Notes on moving mail between servers and keeping local backups.
imapsync
The go-to tool. Handles folder mapping, deduplication, resumable.
imapsync \
--host1 old.server.com --user1 me@old.com --password1 xxx \
--host2 new.server.com --user2 me@new.com --password2 yyyFlags I actually use:
--dry # test run
--exclude "Spam|Trash" # skip junk
--folder "INBOX" # single folder only
--regextrans2 s/Sent Items/Sent/ # rename foldersimap-backup
Ruby gem, stores mail as Mbox + JSON index. Good for offline archives.
gem install imap-backup
imap-backup setup # interactive config
imap-backup backup # run itgithub.com/joeyates/imap-backup
Gotchas
- Gmail/iCloud need app passwords
- Check destination quota before migrating
--dryfirst, always