Friday, July 26, 2013

imapsync from Godaddy email to gmail (Google Apps for Business)

Yesterday was my last day using the klunky Godaddy webmail client. I spent an average of 30 seconds for each page to load and to read each email, which can cause certain madness. Since Google pretty much knows everything about me anyway, I made the switch to Google Apps for Business since I have my own domain. All good, I gave Google my credit card number, changed my MX records (another easy task made horribly painful with Godaddy's abysmal domain admin webapp) and am now enjoying sub-second response times and all the features of gmail. Except one minor thing, I need all my email from the Godaddy account - time to migrate all those messages. I didn't find much to go on from Google's own support page on the matter but if you have the wherewith-all to run a perl script from the command line, imapsync is a great tool to accomplish just this. Here's the command that worked for me, note the --regexflag argument is important because gmail seems to be true to the IMAP RFC's and doesn't recognize the \Forwarded flag, so any messages you've forwarded will otherwise not be migrated and you'll get errors like this:

Error message:

- msg Folder/1 {1891} couldn't append  (Subject:[Message Subject]) to folder Folder: 44 BAD Invalid Arguments: Unable to parse flag \Forwarded

Command:

$ imapsync --ssl1 --ssl2 --host1 imap.secureserver.net --host2 imap.gmail.com --user1 your@email.address --user2 your@email.address --password1 'your-godaddy-password' --password2 'your-google-password' --regexflag 's/\\Forwarded//g'

2 comments:

  1. Thank you kindly for the help with forwarded email. This game up pretty nicely in a google search. I've used imapsync in the past, but this one-liner really made it a joy for migrating 70+ mailboxes this weekend. Cheers!

    --Chris

    ReplyDelete
  2. Thanks! Was getting strange hangs sync'ing away from GoDaddy to a cyrus-imapd account. This switch cured my sync issues: --regexflag 's/\\Forwarded//g'
    --Jim

    ReplyDelete