Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm in the process of moving my email to Gmail. I used to use Outlook and I have a massive amount of email stored in various PST files (about 7GB worth). Ultimately I'd like to store this all in Gmail so I have my entire email archive available.

I imported my first PST file using Outlook's IMAP feature - dragging the folders in one by one. This worked, but was quite slow and laborious (since I had to check on it every few minutes and set the next folder going).

Is there any way I can do the import - either without using Outlook, or by somehow just setting it to go and leaving it overnight without any intervention?

I did look at using Google Sync for Outlook, but it looks like this will also pull down all of the email I've already uploaded, which ideally I'd like to avoid (although if this is the only option I'll do that!)

share|improve this question

I have recently run into the same problem, and needed to export close to 10GB of pst files to gmail. I also tried to use Outlook, but gave up as the process was unreliable. Here's a brief rundown of what I did, in the hope that other people will find it useful:

1) First, if you have a google apps account, just use the official "Google Apps Migration tool". If you're like me and are stuck with a normal account, read on.

2) You need to convert your PST files to the much more simple MBOX format. This can be done with Thunderbird and its import wizards which communicate directly with outlook, but I used the open source program readpst (part of the libpst project). I use Linux and simply got it from my package manager, a google search revealed a windows version here. Once finished you will have multiple mbox files, one for each mail folder (Inbox, Sent items, etc..)

3) Once you have your mbox files, use the excellent python script IMAP Upload. The scripts takes your gmail credentials, a single mbox name as input and an output folder (label) on the Gmail server.

This is what allows this difficult process to complete successfully. The script will automatically retry each mail upload on failure, and works on a single mbox file. I used a bash loop to process all my different (50+) mail folders automatically, and just let it upload for two days.

Note: This script has a problem with non-english folder names. Since most of my folder names were hebrew, I had to apply a small fix to the python file. I'll try to send it to the author. Also, gmail doesn't allow labels with multiple spaces between words, so if one of your mbox filesnames is like that be sure to fix it.

Other useful things: MBOX is a very simple format. It's really just a long text file containing all of your emails. I had multiple pst files which represented yearly archives. This means that I had the same folders in multiple pst files. Because MBOX is so simple, you can merge mailboxes by simply appending one file to the other. This allowed me to write a simple script that merged MBOX files with the same name, and very simply flatten out all of my pst files to a set of unique folders, containing all of my mail.

That's it, hopefully everything will work for you as expected :)

share|improve this answer
though i guess an mbox file's no use if the pst file has emails with attachments you want – barlop Sep 6 '13 at 0:50
@barlop Just noticed this comment after a year.. MBOX supports attachments perfectly, and every single one in my PSTs reached gmail. – Or Zarchi Jun 21 '14 at 18:12

You might want to consider Google App Sync for Outlook which allows you to import directly from a PST.

share|improve this answer
maybe that was free then, but now not so for those that didn't sign up early. Apparently not possible with the trial version of google apps, so one has to pay "You cannot migrate a PST file if you are in the "trial" period of Google Apps Premier. It must be paid before the API option in "advanced tools" is available. "!topic/apps/NDZ54gh3fbI – barlop Sep 11 '13 at 1:10

The most recommend suggestion would be to use the migration tool from Google and set it to run overnight so that its complete by the next morning. Make sure that you select the import new data option so that previously migrated data is not duplicated.

Also a good practice would be to ensure that you dont use emails while the migration is in process but if you need to, you still can access them.

share|improve this answer

I have tried the Google migration tool, Thunderbird import, translation to MBOX, and a few other semi-automated tools but encountered the "unknown sender" issue. The strongest solution seems to be with an Exchange server in what is essentially a two-step process.

  1. Copy emails from PST to Exchange mailbox (will mirror in IMAP4 mailbox)
  2. Copy emails from IMAP4 mailbox to Gmail mailbox

I was able to follow those guidelines using the pre-configured VHD of Exchange Server 2007 SP1 (evaluation version) and Virtual PC 2007 (free).

MS Virtual PC 2007 SP1

MS Exchange Server 2007 SP1 VHD

Besides using Microsoft Outlook 2007 to move emails from PST to an Exchange mailbox (will mirror in IMAP4 mailbox), I also found it helpful to use Thunderbird to move emails from the IMAP4 mailbox to Gmail. It worked fine when I tested with Outlook but I prefer the Thunderbird interface and it also helped keep things straight.

Below is the short-hand detail, with many thanks to the posts and references that others provided along the way:

Host PC Desktop -> Start -> Control Panel -> Network Connections -> Properties -> Install -> Virtual Machine Network Services Virtual PC -> Edit -> Settings -> Networking Settings -> Adapter 1 -> Select the desktop network connection that you just updated Virtual PC -> Edit -> Settings -> Shared Folders -> to copy any data or installation files on your host desktop Virtual PC Desktop -> Start -> Control Panel -> Network Connections -> Properties -> TCP/IP -> Obtain IP + Obtain DNS

Exchange Management Console -> Organization Configuration -> Hub Transport -> New Accepted Domain Exchange Management Console -> Organization Configuration -> Hub Transport -> E-mail Address Policies -> Edit -> Add -> Select accepted domain + Set as Reply Exchange Management Console -> Organization Configuration -> Hub Transport -> Accepted Domains -> + Set as default

Exchange Management Console -> Server Configuration > Client Access > POP3 and IMAP4 -> Authentication -> Plain text logon (optional if you are running into issues logging in later)

Administrative Tools -> Domain Controller Security Policy -> Account Policies -> Password Policy -> Set preferred requirements (Ex. Disable complexity) Administrative Tools -> Domain Security Policy -> Account Policies -> Password Policy -> Set preferred requirements (Ex. Disable complexity) Administrative Tools -> Services -> Microsoft Exchange IMAP4 -> Start + Automatic

Exchange Management Console -> Recipient Configuration -> Mailbox -> New Mailbox -> User Mailbox -> Create mailbox for new user + Select mailbox database

Exchange Management Console -> Organization Configuration -> Add Exchange Administrator -> Select user + Exchange Organization Administrator role

Install Outlook on virtual hard drive (not recommended in general but works for transfer to Gmail) Copy PST file to virtual hard drive

Add Exchange account (uncheck cached Exchange mode) Add PST file

Add IMAP4 account to connect to your Exchange mailbox through IMAP (see account details below) Add Gmail account

user@LITWAREINC.COM LITWAREINC/user IMAP: EX07SP1.LITWAREINC.COM:993 (SSL) SMTP: EX07SP1.LITWAREINC.COM:587 (STARTTLS) Test Account Settings -> Should log onto incoming mail server but may not successfully send test e-mail message (not necessary for transfer)

Copy from PST to Exchange mailbox (will mirror in IMAP4 mailbox) Copy from IMAP4 mailbox to Gmail mailbox (I tested this successfully with Outlook but used Thunderbird for the mass transfer)

Note: My trial version expired (incorrectly) and would sometimes restart. Occassionally, I had to restart Microsoft Exchange services. Administrative Tools -> Services -> Microsoft Exchange Active Directory Topology Service -> Restart Administrative Tools -> Services -> Microsoft Exchange Information Store -> Restart

share|improve this answer

Email Archiving and Backup with MailStore Home

share|improve this answer
I took a look at this, but it doesn't seem to be useful for what I've described above (importing email from a PST file into Gmail) - it's for arching mail from PSTs and from Gmail into another file. – John Jan 1 '11 at 4:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .