Wednesday, 19 August 2015

How to move Thunderbird mail to the new system?

There are many tutorials on the net which tells how to do it. But most of them suggests moving whole Thunderbird's directory to a new system. I think, this is wrong. Thunderbird is not the most optimized application on the universe, so in this case you will move also a lot of crap. I think, that the best strategy is to move the e-mails only, because, finally, you will get the all new, clean Thunderbird.

First, you should install and configure the Thunderbird on the new system. Add your accounts manually, but do not create any additional folders.

Than, find your e-mails on the old system. They are located in the ~/.thunderbird/profile_name.default/Mail directory, where profile_name is the random string. Now, copy that directory to a pendrive or external HDD.

In the next step, make a backup of the Thunderbird's directory on the new system:

cp -R ~/.thunderbird ~/.thunderbird-old

In the last step, you should turn off Thunderbird and go to the directory descripted above on the new system. First, check in the file popstate.dat which directory corresponds to which mailbox. Next, copy files without extension and those with extension msf (Inbox, Inbox.msf and so on) to the corresponding directory. If you had subfolders on the old system, copy also sbd directories (i.e. Inbox.sbd).

Now, run Thunderbird and check if everything works.