I promised an Amazon EC2 AMI with imapsync and a few Gmail migration scripts. See the Gmail to Google Apps Email Migration post for background information. I’ll jump right in with a procedure to get you started with your own migration:
- Run the instance: ami-01789d68
- Use your key to authenticate through SSH using the username “gimapsync”. See Running an Instance in the Amazon EC2 Getting Started Guide for more information.
- Edit the ‘run-imapsync-justfoldersizes’ script:
- Change email@example.com to your ‘from’ email address
- Change firstname.lastname@example.org to your ‘to’ email address
- Edit the ‘run-imapsync-all’ script the same way
- Edit the ‘run-imapsync-folder’ script the same way
- Create passfile1, which should contain the password for your ‘from’ email account
- Create passfile2, which should contain the password for your ‘to’ email account
- Test it out with
- It should connect to both accounts and list each imap folder and its size
- If you are feeling lucky, just run
- Otherwise, go one folder at a time with commands like:
Feel free to edit the run-imapsync* scripts to fit your needs. There are many command-line features of imapsync that I have not made use of here. You may be interested in the ‘
--maxage N’ parameter, for example. It only transfers email that are newer than N days old.
Let me know how it goes!