Wednesday, December 8, 2010

Backup mails in Thunderbird from Outlook

It has been a hard time working with Outlook and I was worried that it could crash at any time. I thought of backing up all the mails to thunderbird in another linux box. Reading the documentation I couldn't figure out any method using which we can import the .pst files to the thunderbird client.

Here is what I did to do the migration. Initially I took the backup from the outlook

Outlook -> File -> Import or Export -> Export to a file -> Personal Folder File (.pst )

Now it might take some time to take a complete backup. At the end we will get a big backup.pst file.

Transfer the file over to the Linux Desktop.

Since there is no way to import the .pst file directly to thunderbird. We might have to convert to mbox format to get this done. There are many tools to do that. In my case I used readpst.

1. Install Readpst

Readpst is with the package libpst.

yum -y install libpst

2. Convert the .pst file to mbox based format.

mkdir mail

readpst -o mail backup.pst

Now that we have mbox format of all the folders.

3. Install MboxImport utility in thunderbird.

Download the xpi from

Thunderbird-> Tools -> Addons-> extensions -> Install
Select the xpi file that you downloaded earlier and install it. Restart tomcat for the new extensions to take effect.

4. Import the Mbox mails to thunderbird.

Now that we have the mbox based mails in mails directory we can import the mails and account to thunderbird.

Thunderbird -> Tools -> ImportExportTools -> Import Mbox File -> Import entire directory (including sub directory)

Now you can select the "mails" directory in which we saved the mbox format files.

It might take some time for the import to happen. Now that you have a backup..Don't worry about old mails..