Skip to content
larsp.de
Go back

IMAP migration and backup

Tools for working with IMAP accounts.

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 yyy

Flags I actually use:

--dry                     # test run
--exclude "Spam|Trash"    # skip junk
--folder "INBOX"          # single folder only
--regextrans2 s/Sent Items/Sent/  # rename folders

imapsync.lamiral.info

imap-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 it

github.com/joeyates/imap-backup

Gotchas


Share this post on:

Previous Post
AI/LLM Resources
Next Post
Open Source Software