Export Email from Thunderbird to Microsoft Outlook

This About.com How-To article gives step by step instructions on exporting mail to another application. You need an application called mbx2eml however this is an extremely painful and manual process.

I am not sure if there is any add-ons available that can do this.


Note: This approach definitely is not for the weak-hearted, though it is not as hard as it may seem at first. It does require some (guided) command line inputs and a basic understanding of troubleshooting, as there are some (minor) parameters that could go wrong and that then would need either common sense or a quick online search.

As far as I can see, there is nothing in this answer that could prove harmful to your e-mails: If, at some point, you decide that it is too hard for you, take a deep breath, read through the whole answer twice, and see if you can do it, then. If you still think it is too hard, then you can abort the process at any given point and/or uninstall any suggested programs - and not a single one of your mails will be missing.


I want to share my solution with the latest version of Thunderbird (52.9.1) and Microsoft Office Outlook 2016 to get local mails (received via POP3 by Thunderbird) into a .PST-file (so POP3 on Outlook, too).

Basically, it uses an IMAP-server of your choice as an intermediate storage for your e-mails. I tried to automate the process as much as possible, while making it as reliable as possible. It still is a semi-manual process that takes some time (around 1 hour for 20 folders and 15 000 mails / 2.5 GiB), but in my experience, it works very reliably, it does not harm your existing e-mails, and it is still using free, mostly open-source tools.


Requirements:

  • A working Python (v2) environment. I chose to use Windows Subsystem for Linux (requires Win10) and Debian 9.4, but Python for Windows might work just as well.
  • ImportExportTools from Mozilla's add-on site. In Thunderbird, go to Add-Ons, press the cogwheel-button and select Install xpi. Select the .xpi-file, restart Thunderbird.
  • Some version of imap-upload. (I chose the linked fork because it works the best in my experience.)
  • A working IMAP server. Gmail works fine, but to speed things up, I chose to use a local IMAP server (no up- and download via the ISP, no file size limit, no security settings to change,...), which in my case was hMailServer.

Step-by-step guide:

  1. Maybe set ImportExportTools' settings, such as the maximum length of headers. Then, export each folder with ImportExportTools -> Export Folder. You can select multiple folders at once. Note: I did choose to export in a non-recursive fashion because recursive files gave me problems later on with their encoding.
  2. (Optional) set up hMailServer. I used Peter Kellner's guide "How To Setup Your Own Pop3/IMAP Email Server for Local Development Testing". Basically, you need to setup a domain (e.g. mail.local) that also neds to be set in your hosts-file. Then, add an account to the domain, set your domain as default, maybe increase the size limit, and disable auto-ban.
  3. Upload the exported files with imap-upload: python .\imap-upload.py .\INBOX --gmail for Gmail or --host=mail.local [email protected] --password=YOUR_PASSWORD for your local IMAP server. You can also play around with --box and add folders for each folder-file. Please note that if you want to keep your folder structure, you either have to use the --box parameter or you will have to upload one file at a time, then go to the next step, then go back to this step, repeat.
  4. In Outlook, set up a .PST-file (if you do not have one already) and set up and link your mail.local-account to it. If you used --box, use IMAP, else use POP3. Both the POP3 and the SMTP address are mail.local. Set it up to delete the e-mails from the server after downloading them.
    • For POP3: Press Send/Receive and wait until all e-mails are downloaded. Then, move them to a new folder (if necessary).
    • For IMAP: Press Send/Receive and wait. Then, you can drag'n'drop the folders to your local mailbox.
  5. Check if all went well by looking at imap-upload's output and by comparing the number of mails between Thunderbird and Outlook. imap-upload usually Tells you if something went wrong, but I usually take some random samples of attachments and mails to see if all went well.