Import pst files to Thunderbird

Vytlačiť

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

Install the readpst package.

sudo apt-get install pst-utils

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

mkdir pst-export

Next execute the readpst command against a .pst file.

readpst -D -M -b -o pst -export archive.pst

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.

find . -type f ! -iname '*.eml' -exec rename 's/([0-9]+)$/$1.eml/' {} \;

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 that you'll import in Thunderbird and choose the following menu path

import/export –> import all messages from a directory –> just from the directory pick-just-from-the-directory

Then choose the folder you exported all the .pst emails tools (pst-export). thunderbird-import-folder Now click open and 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.