Uploading old email to new IMAP account…the fast way!

I nearly titled this “Uploading old email to new IMAP account…the easy way!”, but I’m afraid it might not be “easy” to those of you who haven’t had much experience using command line based programs.  I certainly prefer the GUI, but after hours of trying to get Thunderbird to upload the email, I gave up.  The task before me was to upload about 19,000 emails from my boss’s old computer to our new email server hosted with RackSpace Apps.  Most of the commands here can be used to import email into RackSpace Apps with very little change, but can also be adapted to import email into gmail as well.

Step 1 – Download this email upload python script from sourgeforce and download ActivePython.  ActivePython is a bit easier to install than the default Python because it automatically configures the command line stuff, which is why I recommend it in this tutorial.

Step 2- Extract the .zip file.  Make sure to copy the file path as seen in the screen shot, this will make the next command line steps easier.

Step 3- Open a command prompt.  Go to Start->run and type “cmd” then click OK.

Step 5 – Navigate to the folder the python script is in.  You can do this by typing “cd ” (include a space) and then right clicking and pasting the file path you copied back in step 2.

Step 6 – Locate your MBOX file and copy it into the python script directory.  You can leave it where it’s at (obviously), but I’m writing this to be as easy as possible.  Click here for directions finding your Thunderbird mbox file.

Step 7 – Run the following Python command, replacing “example.com” with the address of your IMAP server and then enter your username and password when it asks.   It took 5 or 10 minutes to get past the “Counting the mailbox” screen for me.  Takes a while longer to finish the upload, especially if you’re like me and have almost 2GB of email you have to upload.

  • python imap_upload.py –host secure.emailsrvr.com –port 993 –ssl –box imported inbox.mbox