I had to move my mails from one account to another when my employer switched from self hosted mailing to an external service provider. In this process no mail adresses have changed. The only difference was the mailing server.
- mbsync/isync
- Set up and sync both accounts
- Configure one or more temporary channels for migration
- Sync temporary channels
mbsync migrate-inbox
- Delete temporary channels from configuration
# OLD ACCOUNT
IMAPAccount old
Host mail.old.com
User stefan
Channel old-inbox
Master :old-remote:inbox
Slave :old-local:inbox
# NEW ACCOUNT
IMAPAccount new
Host mail.new.com
User stefan
Channel new-inbox
Master :new-remote:inbox
Slave :new-local:inbox
# SYNC CHANNELS
Channel migrate-inbox
Master :old-local:inbox
Slave :new-local:inbox
Create Slave
Sync Pull
CopyArrivalDate yes
SyncState ~/.mail/imap-migration