Using imapsync
to migrate mail from one IMAP server to another, I hit a problem. Google led me to the following description of the same issue:
Not mail.app's problem!
The solution is to use imapsync
with the flag --syncinternaldates
I am now using
/usr/bin/imapsync --syncinternaldates \ --host1 mail.inf.ed.ac.uk --user1 mfourman --ssl1 \ --host2 imap.staffmail.ed.ac.uk --user2 mfourman -ssl2 \ --noauthmd5to finish the transfer of about 4GB of mail history.
To start, try it out on a small folder --folder Test
First test with --dry
:
/usr/bin/imapsync --syncinternaldates --folder Test \ --host1 mail.inf.ed.ac.uk --user1 mfourman --ssl1 \ --host2 imap.staffmail.ed.ac.uk --user2 mfourman -ssl2 \ --noauthmd5 --delete --dryIf everything looks OK then run
/usr/bin/imapsync --syncinternaldates --folder Test \ --host1 mail.inf.ed.ac.uk --user1 mfourman --ssl1 \ --host2 imap.staffmail.ed.ac.uk --user2 mfourman -ssl2 \ --noauthmd5 --deleteExpunge from the source by hand (in Mail.app Mailbox > Erase Deleted Messages).
Using the --expunge
flag upsets other users of the IMAP server:
That's the short story. The actual story was more involved and also included using my gmail IMAP account as a temporary buffer to recover from some false starts. (Free 6.5GB quota - thank you Google!)