Posts tagged: google

Step-by-Step from Gmail to Google Apps mail with IMAPSync

As mentioned in my last post, it is not too easy to migrate from a normal Gmail account to a Google Apps account. Lots of tools do not bring satisfying results. The only tool that brought the best results was imapsync. Being a command-line tool, it is not easy to use for most. Hence, I want to ease the usage by providing this step by step tutorial. It is tailored for Mac OS X users. However, there is a very straightforward guide for Windows as well. In fact, my short tutorial is based on that one :)

Step 1: Download & Installation

  1. Imapsync used to be for free. Unfortunately, the programmer recently decided to charge $45. A little heafty for a (hopefully) one time usage. Luckily, the older versions work just fine and can still be downloaded without charge
  2. Download the following modules:
    Mail::IMAPClient
    Digest::MD5
    Term::ReadKey
    IO::Socket::SSL
    Date::Manip
    File::Spec
    Digest::HMAC_MD5
    PAR::Packer
  3. Unpack the modules to /Library/Perl/Updates/5.10.0/. If you don’t know how to get to that folder, press ⇧  + G while being in the Finder and paste the path in the box. Please note, that the packages Mail::IMAPClient and Date::Manip need some more love. You have to move the Mail folder from inside the lib Folder of the unpacked package to /Library/Perl/Updates/5.10.0/.
  4. Open Terminal. If the following statement does not produce an error message you have installed the modules successful:
    perl -mMail::IMAPClient -mDigest::MD5 -mTerm::ReadKey -mIO::Socket::SSL -mDate::Manip -mFile::Spec -mDigest::HMAC_MD5 -e ''
  5. Download Imapsync; the old version for free or buy the most recent version.
  6. Extract the tar.gz file. You might need to install the Unarchiver to be able to unpack the file.

Step 2: Sync your Email

  1. Open Terminal.
  2. Change your directory to your imapsync folder. Probably you achieve it by typing cd ~/Downloads/imapsync-1.350/ into the command line.
  3. Use the following command to sync (in our case rather, copy) the mail from your Gmail account to your new Google Apps mail account. Of course, adjust the account details to your accounts.
    ./imapsync ^
    --host1 imap.gmail.com --port1 993 --ssl1 --authmech1 LOGIN ^
    --user1 user@gmail.com --password1 password4gmail ^
    --host2 imap.gmail.com --port1 993 --ssl2 --authmech2 LOGIN ^
    --user2 user@yourdomain.com --password2 password4user2 ^
    --split1 100 --split2 100 ^
    --reconnectretry1 30 --reconnectretry2 30 ^
    --noauthmd5 --noreleasecheck ^
    --timeout 1200  --allowsizemismatch
  4. The process will probably take quite a while now. Took hours for me.
  5. Set up a forward rule in your Gmail account to your new account. So that all mail gets automatically send to the right place :)

I hope this helps. And I hope that Google will provide a much easier and acceptable solution in the future.

Tools Roundup for Migrating to Google Apps mail

After being unhappy with Gmail’s handling of my custom email address (email@mydomain.tld) for quite some time, I came across my colleague’s newly written blog article about transitioning from a normal Google account (@gmail.com) to a Google Apps account (@mydomain.tld). A few conversations later I was confident and excited enough to migrate my mails from Gmail to Google Apps. However, it was unfortunately much more cumbersome than I expected. But I succeeded at the end.

The main issue was to get all my emails into the new account. The loss of mails was unacceptable for me but all the most obvious methods lost some mails during the process or were otherwise unsuitable:

  • ☹ Apple Mail
    My original idea was to just copy folder by folder my mails to my new account. Unfortunately, it didn’t work well with nested folders. Some weren’t copied. Or even more annoying: only half copied. It just stopped with the message that it stopped but not displaying the reason. In other cases, the Mail app blow up some attachments that much that the server refused to take them (There is a 25MB limit per mail, if I am not mistaken). At the end, the two accounts had very different mail counts and size counts.
  • ☹ Google Email Uploader
    The Google Apps migration guide offers this application to upload your mails from your hard-drive to your account. It seemed very promising in the beginning because it managed to upload folders (mailboxes) where Apple Mail failed. However, when performing a complete upload the Email Uploader started to skip hundreds of mails.
  • ☹ Gmail’s Mail Fetcher
    This build-in Gmail function fetches mails from any other email account that supports POP access. As Gmail itself provides POP access, I tried to copy my emails with that to my new account. It stopped it almost immediately because the associated information about folders, or respectively labels, was lost during the process.
  • ☹ Google Apps Migration for Microsoft Exchange
    This is only for business customers. Even though, I could opt for the 30 day trial and then get access to this feature, I didn’t use it because it wouldn’t be a long-term solution for the problem. Google could stop the promotion any time.
  • ☹ Thunderbird
    Basically, I tried the same as with Apple Mail. Even though, it seemed to have uploaded more mails some of mails were suddenly badly formatted. No mail application was able to display the text of the subject, the recipient and the sender of those mails. In conclusion, Thunderbird was also useless :(
  • ☺ Mail Carbon
    A first ray of hope. Unfortunately, not 100% perfect but almost. As it is much easier to use than IMAPSync I recommend to give Mail Carbon a try first. In case, it missed to copy some emails, IMAPSync can do the job.
  • ☺ IMAPSync
    A command line tool that I hoped to have discovered much earlier. It copied the few mails Mail Carbon missed. The installation and use of the tool is not designed for the average computer user. However, there is a very straightforward step-by-step guide for Windows users. It is written for migrating from Google Apps mail back to Gmail. Hence, just exchange the login details in step 4. I’ll write an adoption for Mac OS X soon as the installation is quite different.

I hope this gives a good overview on the tools available to transition your emails from one IMAP account to another.

Happy migrating!