Gmail – Import mBox file from Horde to Gmail

gmail

I just transfered my domain from a third party which hosted Horde as my mail client to Google Apps. I need to import all of my mail from the mbox files I exported from Horde into Gmail now.

I tried GML but it chokes on the mbox file saying that it is not well formatted. I have tried exporting multiple times from Horde and from multiple accounts. I get the same error on all of the mbox files.

Any ideas?

Best Answer

You can directly push them up via IMAP, in a completely scripted fashion.

  1. Enable IMAP for your Google Apps mailbox (see docs here and here).
  2. Then, loop over all of your mbox files with the Ruby script described at http://blog.tquadrado.com/?page_id=181. This script correctly avoids a date problem that some IMAP clients have, where all your e-mails that get imported look like they are dated from the time of import instead of the time of date.

I imported a 2GB mbox file into GMail recently with no problems.

The OS X and Linux command-line make it easy to run Ruby scripts (and use bash to loop over all your mbox files); you may have to do a bit more work if you are using Windows.