Convert Maibox from Mail.app to Microsoft Outlook 2011 in Lion

In Mac OS 10.7 (Lion) and 10.8 (Mountain Lion), it’s not currently possible to export mailboxes from Mail.app to something that Microsoft Outlook 2011 can import directly. After a bit of research, and plenty of forum messages seeing the frustration of folks, including Microsoft’s reluctance to fix Outlook 2011 for Mac (instead they decided to just disable the feature, see in the release note “Import from Apple Mail is disabled in Outlook on Mac OS X 10.7 Lion”), I found the issue was due to the FSTypeCode not being set by Mail.app, which is actually really easy to fix.

First, in Mail.app, I export my mailbox. In my case, after I select my Archive mailbox, I get:

$ ls -1
Inbox2007.mbox

From Lion onwards, the Apple mbox format is actually a folder that contains a few files inside:

$ ls -1 Inbox2007.mbox
Info.plist
mbox
table_of_contents

Where mbox is the real mbox file we need to import into Outlook, but if we try now (Import -> Contacts or messages from a text file -> Import messages from an MBOX-format text file) we’ll see the mbox file in the Finder is greyed out. This is because the FSTypeCode is not set:

$ mdls Inbox2007.mbox/mbox | grep 'FSTypeCode'
kMDItemFSTypeCode = ""

What we need to do is to change the code to 'TEXT'. We can do this with a simple command (I used find since I exported several mboxes at once):

$ find . -name '*.mbox' -exec SetFile -t 'TEXT' {}/mbox \; -print
./Inbox2007.mbox

If we now test for the FSTypeCode, we verify it’s correctly set as 'TEXT'.

$ mdls Inbox2007.mbox/mbox | grep 'FSTypeCode'
kMDItemFSTypeCode              = "TEXT"

We can now finally go back to Outlook and import the mbox file: Import -> Contacts or messages from a text file -> Import messages from an MBOX-format text file.

4 Comments

  • November 9, 2012 - 7:47 am | Permalink

    Found an easy way to convert from Mail.app to Outlook 2011 in Lion and Mountain Lion, a feature disabled by Microsoft. http://t.co/duOVXBe7

  • Steve
    January 30, 2013 - 8:19 pm | Permalink

    I cant seem to make that command work could you please help.

  • mechin
    February 14, 2013 - 1:37 pm | Permalink

    I hade to do the same thing and i found a difrent way. at first i used beterFinderRename to rename all mbox file on parent-folder-name.mbox after that i used “FileType” to change the type and creator. Prety simple.

  • James
    March 8, 2013 - 7:54 am | Permalink

    Perfect! Thank you very much.

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>