Step 1 – Get your email out of the .pst files.
Install the readpst package.
Код: |
sudo apt-get install readpst |
Now create the directory where you will want the extract email files to be placed.
Next execute the readpst command against a .pst file.
Код: |
readpst -D -M -b -o pst-export archive.pst |
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 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.