imapsync is a popular tool for migrating from one IMAP server to another, including GMail and Google for Business. You can no longer download the source code directly from the author for free, however the unique ‘no limit’ license allows an unofficial fork to be available on GitHub. As of this writing the fork lags the original slightly, but it should not be an issue for most people.
Here is how to install it on Ubuntu.
sudo apt-get install makepasswd rcs perl-doc libmail-imapclient-perl
Clone the Git Repository
git clone git://github.com/imapsync/imapsync.git
Don’t forget to cd into the ‘imapsync’ directory once it is finished being cloned.
Create a Dist Directory
You need to make a `dist` directory. I suspect this is because Git does not track directories, only files:
Build and Install
sudo make install
Once this is done, you can run a script like the one below, which was inspired (and borrowed) from this blog post
- This post is where I found the original version of the script above.
- You might also find this page about migrating your email to Google Apps useful.