How can I import a PST file to Gmail?

64

Solution 1

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 :)

Solution 2

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

Solution 3

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.

Solution 4

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 http://www.microsoft.com/en-us/download/details.aspx?id=24439

MS Exchange Server 2007 SP1 VHD http://www.microsoft.com/en-us/download/details.aspx?id=14901

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 http://exchangeserverpro.com/change-business-email-domain

Exchange Management Console -> Server Configuration > Client Access > POP3 and IMAP4 -> Authentication -> Plain text logon (optional if you are running into issues logging in later) http://exclusivelyexchange.com/how-to-connect-pop-and-imap-clients-to-exchange/

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 http://technet.microsoft.com/en-us/library/ff406204%28v=exchg.80%29.aspx

Exchange Management Console -> Organization Configuration -> Add Exchange Administrator -> Select user + Exchange Organization Administrator role http://technet.microsoft.com/en-us/library/aa998008%28v=exchg.80%29.aspx

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

[email protected] 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:
64

Related videos on Youtube

Richard Bjelke Kvist
Author by

Richard Bjelke Kvist

Updated on September 17, 2022

Comments

  • Richard Bjelke Kvist
    Richard Bjelke Kvist over 1 year

    I'm having some issues with the pivot control for windows phone 8 and I'd really need an answer to this. I'm starting to wondering if I'm missing something here.

    Let's say I have an structure like this

    <vm:MainViewModel
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         **strong text**xmlns:vm="clr-namespace:PivotApp3.ViewModels"
         Name = "I' just a placeholder collection of ItemViewModels"
         >
    <vm:MainViewModel.Items>
       <vm:ItemViewModel Name="Some Item">
               <vm:ItemViewModel.Details>
                  <vm:DetailViewModel Name="Some Detail"/>              
                </vm:ItemViewModel.Details>
           </vm:ItemViewModel>
     </vm:MainViewModel>
    

    Is it possible to bind lets say the pivot itemSource to the and to let's say a LongListSelector.

    In short I need to bind a collection and for each Item in this collection bind another collection.

    I can't get this working with sample data.

  • barlop
    barlop over 10 years
    though i guess an mbox file's no use if the pst file has emails with attachments you want
  • Richard Bjelke Kvist
    Richard Bjelke Kvist about 10 years
    Thanx! I'll give it a try :-)
  • Or Zarchi
    Or Zarchi almost 10 years
    @barlop Just noticed this comment after a year.. MBOX supports attachments perfectly, and every single one in my PSTs reached gmail.
  • Nicholas Tolley Cottrell
    Nicholas Tolley Cottrell over 7 years
    Looks like the Google Apps Migration tool is Windows only. No Mac version :(