How to Export Mails from Thunderbird to Outlook

When my corporate Outlook mail client kept crashing, I migrated all my mails to Thunderbird. There were no more crashes, but my e-mail productivity took a dive. I could not respond to mails sent using Outlook’s voting buttons as Thunderbird has no such feature. Mail replies from Thunderbird looked different than if you were to send replies in Outlook. I was spending more time tweaking Thunderbird than clearing my mails. With efficiency going down, I decided to revert back to Outlook after struggling with Thunderbird for about 6 months.

Thunderbird is able to import mails from Outlook PST data files but the reverse is not possible – Outlook does not allow you to import MBOX mail files from Thunderbird. It seemed like a one-way ticket and I was stuck as there’s no way to migrate my mails from Thunderbird to Outlook. I googled for answers and realised that using GMail was an option – export mails from Thunderbird to GMail and import the mails back from GMail to Outlook. But my folder structure is quite complicated and some of the mails are kept in folders that are more than 5 levels deep. I was not willing to mess up my folder structure.

My intermediate option was to start using Outlook again but to keep the old mails in Thunderbird. The crashes on the Outlook client stopped after the Exchange servers and clients got upgraded. On the new Outlook 2010 client, it had support for IMAP servers. That’s when I realised that I just needed an IMAP server to transfer mails between Thunderbird and Outlook and bingo! All my mails can be transferred over from Thunderbird to Outlook via an IMAP server. So, let’s begin the Thunderbird to Outlook migration process.

Install hMailServer – A Free IMAP Server

After searching for a free IMAP servers on Windows, I settled for hMailServer. You can download the Windows binaries here.

Download the latest stable version and install the software. Choose the “built-in database engine” option when prompted, unless you are sure of what you are doing.

hmailserver install internal database engine

Also enter a password when the hMailServer Install Wizard prompts for a password during installation..

Configure hMailServer

Once the installation is completed, launch the hMailServer Administrator and login using the password that you entered earlier.

hmailserver administrator

Once logged in, create a domain called “mx.local” and click on the Save button.

hmailserver create domain

Several new folders will be added under the new domain. Navigate to the Accounts folder and create a new user account.

hmailserver create user

Next, navigate to Settings -> Protocols -> IMAP and change the Hierarchy delimiter to “/“.

hmailserver imap hierarchy delimter

We are done with hMailServer configuration.

Configure Thunderbird and Export Mail

From Thunderbird, goto Account Settings to create a new account. Enter the account details, click “Continue” and then click ‘Manual Config’. Change the hostname for both IMAP and SMTP servers to “127.0.0.1. Also set the port numbers to 143 and 25 and disable SSL.

thunderbird new account

I created a folder called import in the IMAP server. Then started copying the mails from Thunderbird to the IMAP server by dragging the mails from the “Local Folders” to the import folder in the IMAP server.

thunderbird copy mail

We have now copied the mails from Thunderbird to the IMAP server.

Configure Outlook and Import Mail

Open Outlook, navigate to the Info option found under the File tab and click on the “Add Account” button. Choose the option “Manually configure server settings or additional server types“, followed by the “Internet E-mail” option. Specify the logon details, IMAP/SMTP server IP addresses and verify the config by clicking on the “Test Account Settings

outlook new account

Now, you can start moving the e-mails from the IMAP server to any PST mail folder within Outlook.

outlook copy mail

Troubleshooting

If you face any login issues in Thunderbird or Outlook, check if hMailServer has banned the user from Settings -> Advanced -> IP Ranges. If the user is banned, remove the entry for the user and try again.

hmailserver ip user ban

Also try not to move all your mails in one go. I experienced some crashes with hMailServer when the e-mail volume got a bit too high – which is around 0.5 GB of mails. So, export mails from Thunderbird, import into Outlook, remove the mails from hMailServer and start the import process again.

ibrahim = { interested_in(unix, linux, android, open_source, reverse_engineering); coding(c, shell, php, python, java, javascript, nodejs, react); plays_on(xbox, ps4); linux_desktop_user(true); }