Backup corporate Email when changing Jobs

on Tuesday, August 7, 2012
Next week I'll be changing jobs inside EA. My time at Playfish will be over and I will be working for another studio in Stockholm. Playfish mail is running on the Google mail infrastructure. I am sure I won't be able to access my corporate mail account after I have left, so I thought it was a good idea to get a backup of all my corporate emails. One promising program is gmvault, which I found after stumbling upon an old Matt Cutts blog post about backing up Gmail on Linux yay. Matt is suggesting getmail to get the job done but the project seems to be dead since 2009.

I am running Ubuntu 10.04 Lucid Lynx. First I installed me a new virtualenv, which you should always do if you are required to install new pip packages (gmvault). Just follow these instructions to get started with virtualenv. Once you have your virtualenv activated run pip freeze, to check what packages are installed. If you created the virtualenv with the –no-site-packages option like me, there should be 2 packages distribute and wsgiref. Make sure the distribute package is at least in version 0.6.24. On my Ubuntu 10.04 I needed to upgrade.

Finally install gmvault in your virtualenv and run it.

First it will print some instructions for you. After pressing Enter a browser window is opened and you have to log into your mail account. You will be told that the program gmvault wants to access your credentials. Click accept. This will store a Gmail XOAuth token to your local disc, i.e. as /home/user/.gmvault/ This token is now used by gmvault to access your email account. Press Enter again and start the download. It took about 3 minutes for 1200 emails to be downloaded via imap. On a side note, if you want to learn more about imap and python, you should read this great book which I just finished.


Post a Comment