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
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
I cant seem to make that command work could you please help.
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.
Perfect! Thank you very much.