Importing Email From Outlook on Windows to Thunderbird on Ubuntu
Transferring email from Microsoft Outlook to Thunderbird is easy and straightforward once you know how to do it, but as for many of these comparatively simple tasks finding a recipe that works can be an exercise in frustration. Hence these notes, which are based on moving mail archives from Outlook 2007 on Windows Vista to Thunderbird 24.0 on Ubuntu 13.04, but apply generally to any effort to import PST or OST format mail files into Thunderbird on Linux.
Install Required Packages and Add-ons
In Thunderbird open up the Tools -> Add-ons tab, search for the ImportExportTools add-on, and install it. Note that this is a little flaky: it works, but the usage and mail format has to be exact or it will fail to run the import.
Next install the readpst package. This is in the default repositories, and it allows the conversion of PST files into other formats.
apt-get install readpst
Copy Over Outlook PST Files
Outlook will stash your PST or OST files somewhere in the application data space for your Windows user: see the Microsoft Office site for the locations for Outlook 2007, Outlook 2010, and Outlook 2013 for example. You will probably have at least two mail files, both of which will need to be imported into Thunderbird. Whether they are in PST (archive.pst) or OST (archive.ost) format depends on what type of mail server and which version of Outlook you are using.
You can copy over PST files as-is, but if your mail is stored in OST format files you will have to open up Outlook and export your mail to a PST format file. This isn't hard to do, fortunately, and you can find descriptions of the process for Outlook 2007, Office 2010, and Outlook 2013 at the Microsoft Office site.
Copy the resulting PST files to the destination Ubuntu machine using WinSCP or a similar tool. If you have the standard PST files for a single POP account with default settings in Outlook, then you might end up with these:
Convert and Import
To convert the files into a format that Thunderbird can read, run the following commands. You can look over the readpst man page to learn more about the available options:
cd /home/user/Downloads mkdir outlook mkdir archive readpst -o ./outlook -M -u -w -e -b outlook.pst readpst -o ./archive -M -u -w -e -b archive.pst
You will have to rename the Inbox folder in order to avoid a blocking conflict on import. The same goes for any other folder that has the same name as one that already exists in Thunderbird, but only Inbox will be there by default in a new installation. The following is for a vanilla Outlook 2007 mailbox setup, but your folder names might be different. There will still be Inbox folders in there somewhere, however, and they will have to be renamed:
cd /home/user/Downloads/outlook/Personal* mv Inbox OldInbox cd ../../archive/Archive* mv Inbox OldInbox
Next switch to Thunderbird and create a new temporary subdirectory called "tmp" under "Local Folders". Right-click on "tmp" in the left mail folder pane and select this from the right-click menu:
ImportExportTools -> import all messages from a directory -> also from its subdirectories
In the dialog choose "/home/user/Downloads/outlook/Personal Folders". You will be given no confirmation in response, but if you click on the parent folder you will see subfolders start to appear under "tmp". Open any of these and you will see that importing of email is underway.
You will now have to repeat this process for each of the converted Outlook PST and OST files, each with a different temporary folder: "tmp2", "tmp3", and so on. If you use the same subfolder, then the import will fail because of duplicate folder names. As noted above, you will probably only have two files to import.
Uninstall the ImportExportTools add-on. You won't want it hanging around to clutter up your right-click menus. Then move your mails and folders around until everything is where it should be.