I will start by describing the problem..
I had an email account configured in Outlook 2010 connected to an Exchange server. I backed up my emails locally into a PST file. (now I no longer have access to the Exchange account)
Next I wanted to export these archived mails to be used inside Thunderbird 10.x (place them in the Local Folders in TB). The PST file is around 500MB in size.
I tried different methods:
- My first attempt was to use the
Import > Mail > Outlookfeature directly from inside TB as suggested here.
- In another attempt, I "copied" my emails (drag-drop) to a third common IMAP email configured in both Outlook and Thunderbird (which is in fact a locally running mail server on the 127.0.0.1 interface), then I pulled them into my local folder once inside TB.
- I even tried to use Outlook Express as an intermediary step (Outlook -> Outlook Express -> Thunderbird).
All the above fails, as the emails are not preserved when exported. I have encountered a number of problems, to name a few:
- if we have
Content-Type: multipart/alternative;emails with both html/text formats, then only the html one is exported.
- different encodings are sometimes used than the original ones (base64, quoted-printable, etc..)
- the history of routes (
Received:headers) is completely gone
- the addresses are sometimes lost and simply the display name is kept. ex:
To: "First Last" <email@example.com>gets transformed into:
To: "First Last"
- sometimes the whole sender/receiver address is lost, and simply duplicated from the opposite field
- the date field timezone gets changed to the current machine's timezone (not a biggie)
- all sorts of other headers are added/removed/rewritten differently...
So my question is how can I export emails from my PST file into Thunderbird's EML/MBOX textual format, in a clean way the preserves all the original headers?
I understand that the specification of PST files is now publicly available (right?), so I'm hoping someone developed a decent tool for this task.. The way I see it, if we somehow had access to the raw emails in Outlook (like view-source in TB), it shouldn't be hard to simply write them to text files!!
BTW: In Outlook Express we could directly choose
File > Save As and export in .eml format, but Outlook 2010 only have the (proprietary?) binary .msg format option (or am I missing something)...
Here's a sample to show how the emails get mangled -- names and other stuff have been changed to protect the innocent :)
Original email in Outlook (open email in new window, go to
File > Properties and inspect the 'Internet headers' text field, although sometimes its just blank!)
Received: from mail.server (192.168.2.1) by s2.server (192.168.5.1) with Microsoft SMTP Server id 14.0.702.0; Thu, 3 Feb 2011 12:51:26 -0500 Received: from mail.server (mail.server [192.168.6.1]) by mail.server (8.14.5.Beta0/8.14.5.Beta0) with ESMTP id p00000000000002; Thu, 3 Feb 2011 12:51:26 -0500 Received: from smtp.server (smtp.server [192.168.4.1]) by mail.server (8.14.5.Beta0/8.14.5.Beta0) with ESMTP id p00000000000001 for <list@server>; Thu, 3 Feb 2011 12:51:16 -0500 Received: from s3.server (s4.server [192.168.3.1]) by smtp.server (8.14.4/8.14.4) with ESMTP id p0000000000000 for <list@server>; Thu, 3 Feb 2011 12:51:16 -0500 (envelope-from sender@server) Received: from s1.server ([ffff::0000:000:0000:0000]) by s3.server ([ffff::1111:000:0000:0000%12]) with mapi; Thu, 3 Feb 2011 12:51:15 -0500 From: sender@server Subject: test Thread-Topic: test Thread-Index: A0000000011112222333344445555g== Date: Thu, 3 Feb 2011 12:51:15 -0500 Message-ID: <99887766554433221100FFEEDDCCBBAA99887766@s1.server> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 To: undisclosed-recipients:; Return-Path: list-request@server X-MS-Exchange-Organization-AuthSource: s2.server X-MS-Exchange-Organization-AuthAs: Anonymous X-MS-Exchange-Organization-AVStamp-Mailbox: MSFTFF;1;0;0 0 0 X-MS-Exchange-Organization-SCL: -1
Imported email into Thunderbird (simply Ctrl+U to view source)
From: sender@server Subject: test Thread-Index: A9999888877776666555544443333g== Date: Thu, 3 Feb 2011 12:51:15 -0500 Message-ID: <99887766554433221100FFEEDDCCBBAA99887766@s1.server> acceptlanguage: en-US Content-Language: en-us Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 To: sender@server X-Mailer: Microsoft Outlook 14.0 x-ms-exchange-organization-authsource: s2.server x-ms-exchange-organization-authas: Anonymous X-OlkEid: 00112233445566778899AABBCCDDEEFF00112233