Skip to content


The Web Mail Migration Project – Procedure

By: Ray Acayan


I. Overview

This project presents a procedure for migrating my email from a local Microsoft Outlook PST/POP3 configuration to a web-based IMAP solution using Mozilla Thunderbird and Enigmail for PGP encryption. Although this is my personal project, it can be extended to companies interested in reducing their IT costs by outsourcing their enterprise email administration and spam / malware protection to a cloud-based provider like Google Gmail.
I hope that you will benefit from this resource in your own projects.

< Click here to return to my original blog post >


II. Consulting

I do my best to explain the concepts and techniques behind my projects. If you like my work and can use my expertise in your projects, I am available for consulting at a competitive rate.


III. Procedure

First, this procedure involves migrating all email messages, calendars, and contacts from Microsoft Outlook to Gmail. Then, Mozilla Thunderbird and Lightning will be installed in order to access Gmail via IMAP. Finally, GPG/PGP encryption will be implemented to encrypt the stored email messages.

1. Migrate all PST data from Outlook to Gmail.

1-1. Configure Gmail for IMAP access.

i. ) Log into http://www.gmail.com
ii.) Click on “Settings” at the top-right of the page.
iii.) Click on the “Fowarding and POP/IMAP” tab.
iv.) Select “Enable IMAP”to grant IMAP access to your mailbox.
v.) Select “Disable POP” to prevent new emails from using POP3.

1-2. Set up IMAP access in Microsoft Outlook.

This is a temporary step which allows you to move your email messages and folders from your PST file to Gmail.

The instructions on the following site are sufficient for configuring Outlook for IMAP access to your Gmail mailbox:
http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=75726

1-3. Move email messages and folders from PST file to Gmail.

The “Inbox” in your PST file corresponds to the top-level “Inbox” in IMAP/Thunderbird. You can safely ignore the [Gmail] set of folders to avoid seemingly duplicate emails. You can move your PST folders directly as child folders of the “Inbox” folder in your IMAP mailbox. Note that Gmail uses tags instead of folders, and that the maximum tag length is only 40 characters.

i.) Backup your PST file.

ii.) Start Microsoft Outlook.

iii.) Right-click on the messages and folders, select “Move”, then select the Inbox destination on your IMAP mailbox to upload your messages to the Gmail server using SSL. Do the same for messages in your Sent Items. This operation can be time-consuming depending on how large your PST file is (my primary file was 3 GB) and may get halted. Moving the messages instead of copying them makes it easier to resume where you left off in case the process gets interrupted.

iv.) Make a note of your Outlook Rules as they cannot be migrated to Thunderbird.

1-4. Migrate Outlook Calendar to Gmail.

Synchronize your Outlook and Gmail calendars using Google Calendar Sync, which can be found here:
http://www.google.com/support/calendar/bin/answer.py?hl=en&answer=89955
Alternatively, you can export the calendar from Outlook and import it directly into Gmail.

1-5. Migrate Outlook Contacts to Gmail.

i.) Open Outlook and select “Contacts”.
ii.) Select “File” then “Import and Export” from the menu.
iii.) Select “Export to a file”, then select “Comma Separated Values (Windows)”.
iv.) Select “Contacts”, then enter a filename.
v.) Log into http://www.gmail.com
vi.) Select “Contacts” from the left menu.
vii.) Select “Import” on the right side of the page.
viii.) Select the .CSV file you created in part iv.) then click on “Import”.


2. Install Thunderbird and add-ons.

Although Microsoft Outlook can also access Gmail via IMAP, I decided to switch to Mozilla Thunderbird because it is F/OSS (free/open source software) and is available on more operating systems than Outlook, which currently runs only on Windows. Furthermore, Thunderbird supports a variety of platform-independent add-ons such as Lightning and Enigmail, which will also be installed below.

2-1. Install Mozilla Thunderbird Client

This is a standard installation of the Thunderbird 2 email client using the setup wizard. Thunderbird can be downloaded and installed from here:
http://www.mozillamessaging.com/en-US/thunderbird/all.html
or by executing “sudo apt-get install thunderbird” in Ubuntu Linux.

2-2. Set up IMAP access in Thunderbird.

The instructions on the following site are sufficient for configuring Thunderbird for IMAP access to your Gmail mailbox:
http://mail.google.com/support/bin/answer.py?answer=77662

Recreate your Outlook Rules (from part 1-3 iv.) in Thunderbird using “Tools”, then “Message Filters”, then enter the sender’s email address and the destination folder.

2-3. Install Lightning add-on for Thunderbird.

Install Mozilla Lightning, which is a calendar extension for Thunderbird. Lightning can be downloaded and installed from here:
http://www.mozilla.org/projects/calendar/lightning/
or by execuring “sudo apt-get install lightning” in Ubuntu Linux.

2-4. Install Google Provider add-on to access Gmail Calendar.

i.) Log into http://www.gmail.com
ii.) Click on “Calendar” at the top left of the page.
iii.) Click on “Settings” at the top right of the page.
iv.) Click on the “Calendars” tab just below the “Calendar Settings” heading near the top of the page.
v.) Click on your email address link.
vi.) In the “Private Address” setting near the bottom, click on the “XML” button.
vii.) Copy the URL from the message box.

viii.) Download and install the Provider for Google Calendar from here:
    https://addons.mozilla.org/en-US/thunderbird/addon/4631.
ix.) Restart Thunderbird and select “Calendar” then “New Calendar” from the menu.
x.) Select “On the Network”.
xi.) Select “Google Calendar”. In the “Location” box, paste the URL from part vii.
If “Google Calendar” does not appear, there may have been a problem installing the provider in part ix.). You may need to install an older version of the Provider when using Ubuntu Linux.

There is also a graphical tutorial available here:
http://bfish.xaedalus.net/?p=239

2-5. Install Google Contacts add-on to access Gmail Contacts.

To synchronize the Gmail and Thunderbird contacts, download and install the “Google Contacts” Thunderbird add-on from here:
https://addons.mozilla.org/en-US/thunderbird/addon/7307


3. Set up PGP Encryption

3-1. Create a GPG/PGP Key using GnuPG.

i.) Download and install GNU Privacy Guard from here:
    http://www.gnupg.org/download/index.en.html
ii.) Run the “GPA” or “GNU Privacy Assistant”.
iii.) Follow the prompts to create your GPG/PGP key, or select “Keys” then “New Key” from the menu, and enter your Gmail address in the “Email” field.
iv.) Once your key has been created, create a backup by selecting “Keys” then “Backup” from the menu. If you lose your private key, you will no longer be able to decrypt your encrypted messages.
v.) Upload your public key to the server by selecting “Server” then “Send Key” from the menu.

3-2. Install Enigmail Add-on for Thunderbird.

i.) Download and install the Enigmail security extension for Thunderbird from here:
    http://enigmail.mozdev.org/home/index.php
ii.) Restart Thunderbird then select “OpenPGP” then “Key Management” from the menu.
iii.) Select “File” then “Import Keys from File” from the menu.
iv.) Select the key backup file you created in part iv. of the previous step 3-1.

You can also use Key Management to search for the public keys of your recipients so that you can encrypt your emails to each other from now on.

3-3. Distribute your public key.

At this point, all your email is now stored on the web and accessible from multiple computers and devices simultaneously. However, only the emails between you and your PGP-enabled recipients will be encrypted going forward. Encourage others to create their own GPG/PGP keys in part 8 and begin encrypting their public communications.

3-4. Auto-encryption via intermediate email forwarder account

It is possible to set up an intermediate email forwarder account which automatically encrypts all incoming messages and forwards them to your primary email account. However, you need to remember to convert encrypted messages back to plaintext before replying to non-PGP users, or they won’t be able to read your replies. Consequently, the outgoing messages sent to these non-PGP recipients will remain un-encrypted in your Sent Items folder.


4. Other

4-1. Blackberry IMAP

Although IMAP is not officially supported for Blackberry devices at this time, there is a way to configure BIS to get Push IMAP Gmail on your Blackberry:
http://beyondthebleedingedge.blogspot.com/2008/09/blackberry-how-to-get-push-imap-gmail.html

4-2. Gmail Backup

A free Gmail Backup utility is available for Windows and Linux (command-line) from the following site:
http://www.gmail-backup.com/


< Click here to return to my original blog post >


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.