Moving Outlook .PST emails to Thunderbird on Ubuntu Linux

Moving Outlook .PST emails to Thunderbird on Ubuntu Linux

How to Convert Outlook PST to Thunderbird

During a recent disagreement between Windows 7 64-bit and my internal hard drive, I made a change. First, Windows 7 lost and the hard drive kept its life.

The change I made was to once again go down the road of running Linux as my primary operating system. This time it was Ubuntu 11.04 64-bit. However this article is not about the operating system, it is about the process I used to get my backed up local .PST files created by Microsoft Outlook to give up those precious emails so I could refer to them in my new email client, Mozilla Thunderbird.

There are plenty of articles you can Google that talk about the best process to make this happen. It tends to be along the lines of installing Thunderbird on a Windows machine that also has Microsoft Outlook installed along with your .pst files. In this setup, you can supposedly use the built-in Thunderbird import feature which makes calls to Outlook to get at your emails. In my case, I didn’t want to have to try and go through that time consuming process.

Instead I ended up using a Linux package to extract the emails, renamed all the files and imported them all using a Thunderbird plugin. So, let’s get to the details.

Step 1 – Get your email out of the .pst files.

Install the readpst package.

Now create the directory where you will want the extract email files to be placed.

Next execute the readpst command against a .pst file.

UPDATE: Ian Major commented on a simpler solution. “Works great, after reviewing the options for readpst I changed the command line to be ‘readpst -M -b -e -o pst-export archive.pst’ which doesn’t import deleted messages, and outputs with the eml extension, which means the rename isn’t required.”

Step 2 – Rename exported files

The readpst command will export all your emails into a folder hierarchy that matches the previous folder hierarchy in Outlook. The only problem is that every email is exported as a numeric filename. The text document are .eml files but don’t have the .eml extension. Therefore, we need to recursively rename all the email files to add the .eml extension. Lots of other articles will have you create bash, python, perl or other scripts to do this. I actually found the easiest to be a single command line.

What we are doing is finding all items that are files and do not already have a .eml extension. When we find these, we rename the file by adding the .eml extension.

NOTE: Depending on how many emails you have to rename, this is not the fastest approach and may run quite a while.

Step 3 – Import .eml files into Thunderbird

It’s now time to import all those email files into Thunderbird to make them useful. I found that what worked best for me was to install the ImportExportTools plugin for Thunderbird and use it to bring everything in.

Once you have installed the plugin it is time to use the tool. Inside Thunderbird, create a temporary local folder that we will use to house this mass of emails that you can later do what you please to get them where you want for their final location in Thunderbird.

Right click the folder in Thunderbird and choose the following menu path

import/export –> import all eml files from a directory –> also from its subdirectories

Then choose the folder you exported all the .pst emails tools (pst-export). Now sit back and wait while all your lovely emails you missed so much are made an active part of your new Thunderbird installation. Go get another cup of coffee and maybe a snack as this too will take a little bit to complete and you’re done.