This is a quick guide on how to import Outlook PST’s into GMail with all information (such as the “To:” field) preserved completely.
Most guides on the internet say you can import emails stored in PST’s into GMail by mounting both the PST and GMail account (via IMAP) in Outlook and copying them over. However, if you have any internal domain emails (between two users within the same domain) you will find that when you check the emails using the GMail web interface, they will simply say “(unknown sender)”. The solution to fix this is normally simply to add both accounts via IMAP and copy the emails that way, as the Outlook IMAP connector will perform the necessary the conversion. However, if you are still reading, you are probably in one of the following situations:
- You no longer have access the Exchange Server.
- The Exchange Server doesn’t have IMAP enabled.
- Setup a Windows Server environment.
- You can use a physical machine or a virtual machine. I used VMware Workstation to create a virtual machine. (Use bridged networking)
- Install a Windows Server OS (That will support your version of Exchange.) I used Windows Server 2003 x86. (Configure it as a domain controller as per normal.)
- Give the machine a static IP address.
- Install Microsoft Exchange (and all its prerequisites – you should add the “Application Server” role with ASP.NET, and install anything else that is missing via Add/Remove Programs –> Windows Components)
- Enable the IMAP4 connector in Outlook. (Go to services.msc and enable/start the “Microsoft Exchange IMAP4” service, then go to Exchange System Manager and ensure the connector is configured correctly under <YourDomain>\Servers\<YourServerName>\Protocols\IMAP4\)
- Unless you want to join the domain you just created, you will want to edit your hosts file (normally located at C:\Windows\System32\drivers\etc\) :
- Get the machine name of your Windows Server. (In this example, it will be “mainserver”)
- Get the FQDN of your domain. (In this example, it will be testdomain.local)
- Combine the above two names so you get something like this: 192.168.1.240 mainserver.testdomain.local. (Where the IP is your server’s address).
- Open up Outlook and do the following:
- Add your newly created Exchange email account to Outlook. (As an Exchange account.)
- Mount your PST under Outlook.
- Copy anything you want to keep from the PST to the Exchange account.
- Remove the Exchange email account from Outlook.
- Now, re-add the Exchange email account using IMAP4. Subscribe to the necessary folders.
- Add your GMail account to Outlook via IMAP.
- Copy your emails across from the IMAP account to GMail.
- Your emails should correctly appear under GMail!