Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Import mailboxes from Thunderbird into Mail.app Apps
No formal tool exists for this that I'm aware of, but users who use Thunderbird may have a need to do this for one reason or another (as I did). I accomplished this task manually by doing the following:
  • Navigate to ~/Library: Thunderbird: Profiles: your_profile: Mail: Local Folders. Identify the mailboxes you seek to use in Mail.app.
  • Each mailbox has three pieces to it - i.e. inbox.sbd, inbox.msf and inbox with no extension.
  • Take the file with no extension, hold down the Option key (so it also stays in the folder) and drag it to the desktop.
  • Rename this copy with .mbox as the file extension. For example, inbox becomes inbox.mbox.
  • Open Mail.app and select File: Import, choose Other, and navigate to the desktop and click Choose. Choose the file you just renamed. Your mailbox(es) should appear in the import window and will import into Mail.app.
[robg adds: This earlier hint provided a script to clean up Mozilla Mail's files for import to Mail. This is apparently due to a problem with Mail's handling of whitespace (according to the posted comments). Since Thunderbird is evolved from Mozilla Mail, there may be a similar issue with importing some mboxes. If you have issues, you might want to try the script from the previous hint...]
    •    
  • Currently 3.20 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (10 votes cast)
 
[188,941 views]  

Import mailboxes from Thunderbird into Mail.app | 28 comments | Create New Account
Click here to return to the 'Import mailboxes from Thunderbird into Mail.app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Import mailboxes from Thunderbird into Mail.app
Authored by: jmontana on Apr 05, '05 10:48:44AM
I used the cleanmbox python script with great success: http://www.marklyon.org/gmail/cleanmbox.py

[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: loungeboykip on Apr 06, '05 06:01:09PM

How do you run this script in OS X?



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: MonkeyMini on Apr 05, '05 11:25:17AM

Excellent, I look forward to trying this out.
With Mail's new integration with iPhoto, I was hoping to find a simple solution by the time Tiger comes out! Thanks.

---
www.monkeymini.co.uk
osxhints@monkeymini.co.uk



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: vocaro on Apr 05, '05 12:26:35PM

Not sure why all these steps are necessary. If you just choose the Netscape/Mozilla option in Mail.app's Import command, it should find all the mbox files for Thunderbird, assuming you point to the ~/Library/Thunderbird/... directory, as specified in the hint.



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: jmontana on Apr 05, '05 01:02:01PM

Except that it usually doesn't. And if it does find them, you will note that a significant percentage of your email did not get imported. The times I tried to do this, there were hundreds of emails that didn't get imported.

That's why I had to use the cleanmbox script mentioned earlier. After cleaning them, you end up with a bunch of ".cleaned" mailboxes which *do* import properly.



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: vocaro on Apr 05, '05 04:59:40PM

Yes, I'm aware of the cleanmbox script. I'm the author. :)

My comment was regarding this particular hint, however, which suggests renaming mbox files and selecting "Other" as the import option. I am questioning whether these steps are truly necessary. Applying my script and choosing "Netscape/Mozilla" as the import option should be all that is needed.



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: sunbane on Apr 05, '05 06:10:22PM

I had nothing but problems using mail.app's import command. Mainly doing w/ larger folders that had been put into archive mode. I ended up setting up an imap server on a linux box... dragged my folders to my imap account in thunderbird, and then hooked into imap w/ mail.app, and dragged all the folders local. That was the result of MUCH searching on this subject on the web (switching from windows to os x).



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: MonkeyMini on Apr 06, '05 02:52:31PM

Could anyone point me in the right direction on how to run a python script?
I've just bought into the whole Mac thing, and I really want to convert my Thunderbird mail to Mail.app but I've no idea where to start with the python script.

I downloaded Platypus in the hope I could make an application for it but I've not got anywhere? How do I pass the .mbox to the script?

Thank you :)

---
[url]www.monkeymini.co.uk[/url]
[email]osxhints@monkeymini.co.uk[/email]



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: drolander on Apr 14, '05 09:46:17AM

To use a Python script, open a terminal window, and type:

python somescript.py optional_parameters.

This is the same way you would run a python script from Windows using a console (DOS) window.

I used the cleanmbox.py script and it worked fine.



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: loungeboykip on Apr 06, '05 06:02:55PM

I tried following these instructions but when I try to import the mboxes they're greyed out and mail.app won't like me choose them.



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: MonkeyMini on Apr 07, '05 03:49:30AM

Just click continue and Mail will read all valid files in that directory. How did you run the script?

---
[url]www.monkeymini.co.uk[/url]
[email]osxhints@monkeymini.co.uk[/email]



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: caj on Jul 04, '05 11:21:01AM

I have had this same problem. After running the script, I have opened Mail.app, selected File/Import, have navigated to the directory where my newly cleaned files are only to find that Mail.app shows them as greyed out and unselectable.

Anyone have a solution or at least an explanation to this?

---
- caj



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: phenomenologist on Aug 03, '05 03:35:27PM

Like the previous user said, all you have to do is select File -> Import, then go into the directory that your *.mbox files are located. They will all be greyed out, but just click on the 'Continue' button anyway. This will show all the *.mbox files and you can check off which ones you want to import.



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: DocMan on Oct 31, '06 12:49:24PM

Throw the mbox files in a folder (with the other associated files) and select the folder in the Mail Other import dialog.

Doc



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: etcetera on Apr 18, '05 12:00:33PM

I've just tried this using the Python script and have found that many of the imported mailboxes contain just one or two messages, where there should be hundreds. (The text is all there, it is just in the one or two messages instead of divided up correctly). I suspect that this is because the Thunderbird files I am using were copied directly from a Windows XP machine. Is there any chance the script author could modify the script to handle the mbox format Thunderbird uses on XP? (I know that's a stretch).

I've tried transferring the messages via a local IMAP server, but the problem there is that the messages end up with the current receive date -- I'd like to preserve all the original receive dates (if anyone knows a workaround for this, in turn, that would be very handy).

Brad.



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: Stephen-I-am on May 19, '05 11:50:07AM

Kind of a cludge, but you could make multiple boxes for different date periods, like "Inbox 2004", "Inbox 2005", and then put them on your IMAP server.

Stephen



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: PeaceFreak on Jun 18, '05 05:25:50PM

This might be of relevance to Thunderbird: I copied it from a thread in the Apple Users Forums:

Hi all,

With the help of somebody having these problems (since I have not used Mozilla, I didn't have a testbed myself), I took a look at the problem and came up with a solution.

1. The problem:
Mozilla does not seem to use mbox files according to the relevant RFCs - some older versions of Mozilla seemed to have used Mac end-of-line (EOL) characters instead of the *nix ones (i.e., char(13) instead of char(10)) - some mailbox files might even have a mixture of the two
Mozilla stores the message status flags as well as the information whether a message has been deleted in two additional headers (X-Mozilla-Status and X-Mozilla-Status2) - Mail's import ignores those headers and all messages therefore import as unread. Additionally, Mail might also import messages which had been deleted in Mozilla before

2. The solution:
First, you will have to change all EOLs in all mailboxes to *nix style - I created an AppleScript which takes care of that (in order not to hit the maximum post length here, I will post the script in a separate message).
Second, you use Apple's import function to import the mailboxes (you can use "Other" or "Mozilla" for the import)
Third, you run another AppleScript (an improved version of the one I posted above) which adjusts all the message flags and deletes messages in Mail which should not have been imported
Fourth, you let Apple know that they should fix this problem (and, by linking here, tell them how to fix it) :-) http://www.apple.com/macosx/feedback/

Andreas

Here is the script to change all EOL characters to *nix style.

NOTE: the script changes the files you drop onto it - if you plan on using the mailboxes in Mozilla again, you might want to work on a copy of the files instead of the originals.

Select all the text inside the gray box and create a new AppleScript from it (use the "Services ? Apple Script ? Make New AppleScript" menu entry in the application menu (which currently most probably says "Safari"):

on run
set theFolder to choose folder with prompt "Please choose the folder containing your mailbox files"
processObject(theFolder)
display dialog "Conversion finished" buttons {"OK"} default button 1
end run

on open theObjects
repeat with theObject in theObjects
processObject(theObject)
end repeat
display dialog "Conversion finished" buttons {"OK"} default button 1
end open

on processObject(theObject)
set theInfo to info for theObject
if theInfo is folder then
set theContents to list folder theObject
repeat with theItem in theContents
set thePath to ((theObject as string) & theItem)
processObject(thePath as alias)
end repeat
else
set thePath to POSIX path of theObject
do shell script "perl -pi -e 's/\\r\\n/\\n/g' " & quoted form of thePath
do shell script "perl -pi -e 's/\\r/\\n/g' " & quoted form of thePath
end if
end processObject


Save the script as an application (using the drop-down item in the save dialog)

You can now drop files and/or folders onto the scripts icon (or run the script by double-clicking and select a folder to convert all files therein) - the script will change the EOL character for all files inside this folder (recursively).

Here is the script which adjust all message status flags and deletes messages in Mail which had been deleted in Mozilla.

Select all the text inside the gray box and create a new AppleScript from it (use the "Services ? Apple Script ? Make New AppleScript" menu entry in the application menu (which currently most probably says "Safari"):

tell application "Mail"
set theMsgs to (get selection)
repeat with eachMsg in theMsgs
try
set MozHeader to content of header "X-Mozilla-Status" of eachMsg
if (character 4 of MozHeader) is in {"8", "9", "A", "B", "C", "D", "E", "F"} then
set deleted status of eachMsg to true -- 0x0008
else
if (character 4 of MozHeader) is in {"1", "3", "5", "7"} then
set read status of eachMsg to true -- 0x0001
else
set read status of eachMsg to false
end if
if (character 4 of MozHeader) is in {"2", "3", "6", "7"} then
set was replied to of eachMsg to true -- 0x0002
else
set was replied to of eachMsg to false
end if
if (character 1 of MozHeader) is in {"1", "3", "5", "7", "9", "B", "D", "F"} then set was forwarded of eachMsg to true -- 0x1000
end if
end try
end repeat
end tell



You can run this script either directly from the Script Editor (make sure not to show the "Event Log" in the bottom pane since this will significantly slow down its operation) or save it as an application and run it by double-clicking.

Select all the messages in your imported mailboxes (you can select multiple mailboxes in the mailbox list and all messages from all those mailboxes will be shown in the message list - click into the message list and chose "Select All") and run the script - when it is finished, all your messages should have the proper message status and you shouldn't see any messages you deleted in Mozilla.

Andreas
A possilbe future version of my freeware Eudora Mailbox Cleaner should be able to handle this importing problem. Check it out... <http://homepage.mac.com/aamann/Eudora_Mailbox_Cleaner.html>



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: duhamel on Sep 07, '05 10:34:17PM

Andreas,

This worked GREAT!!

Here's what I had to do.

I HAD Outlook Express on winxp (It is not being used much anymore).

1. I downloaded Thunderbird for windows and installed it. Thunderbird automatically imported my OE e-mail over.

2. I downloaded Thunderbird for Mac and installed it. Then, I copied my "profile" folder over to my Mac. Thunderbird then opened with all my mail.

3. I ran the script to change all EOL characters to *nix style (Thanks to Andreas!) against my Thunderbird mail folder.

4. I opened the Mail.app and imported all my e-mail - it worked GREAT!


Address Book:

1. Open Thunderbird and export your address book to "Ldif" format
2. Open the "Address Book" app and import. Address Book will ask what format you want to import from. Choose "Ldif" and tell it where your file is that was created in step #1.

3. Sit back, have a drink and be happy you're off of outlook express... a.k.a. "outbreak".

Cheers.



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: bestcea on Aug 08, '05 09:28:32AM

An alternate way to do this instead of running clean-up scripts, if you have access to Entourage, can be found on a posting from petterpp on Jun 23 2005, 18:42 at: http://www.neowin.net/forum/lofiversion/index.php/t317094.html.

Here is what you need to make it work - it did for me, at least. (I actually created a blank mailbox folder in Entourage to drop the Thuderbird files in).

"I have had the same problem as you until today! I found a way that works good.

1. Install Entourage
2. Find your mailfolders (found in Library/thunderbird/profiles/your account/mail/local folders)
3. There are three versions of your folders (Inbox.msf, Inbox.sbd, inbox)
4. Copy the one without extention to the desktop (or wherever you want)
5. Add the extention .mbox to your folders
6. Open Entourage and drag the folders to the main folder (Folders on my computer)
7. Open Mail and go: File/Import and select Entourage.
8. Done!

Hope this will help all frustrated minds out there.

/Petter"



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: aboutimage on Aug 12, '05 02:19:12AM
I read thru the steps required to import mail, and none of them worked for me. Perhaps this is because I was porting from Thunderbird (on a PC) to Mail.app? Dunno. In any case, I found that the solution is fairly easy, I was just overthinking it:

1. Find the Thunderbird mail source folders (on the PC, they should be in Documents and Settings / Username / Application Settings / Thunderbird / Mail (or something close to that - I'm typing this from memory).

2. In Mail.app, click Import, select Other, then select one of the mail folders that contain the Inbox.mbox files (and many others).

3. Click Choose. You're choosing the folder, not any of the files contained within it. Folder should be called Local Folders for the main inbox. If you used multiple mailboxes, the rest will be named by host (i.e. mail.yourhost.com).

That's it. I imported approximately 10,000 messages from my PC across a wireless network without a hitch. And without the Python script.

[ Reply to This | # ]

Import mailboxes from Thunderbird into Mail.app
Authored by: shwetank on Jan 16, '06 02:04:22PM

does anyone know how to import mbx files (exported from mail) into thunderbird?

when using import under thunderbird, the only 2 options are eudora and netscape.

i have tried copying the mbox file into the thunderbird profile folder as recommended by another article but that didnt work either..

any help is appreciated.



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: pburkholder on Oct 09, '06 04:19:41PM

With Mac OS X Tiger (10.4.8, to be exact), Mail.app 2 (2.1.1) and Thunderbird 1.5 (1.5.0.7) the import into Mail.app is very straightforward for importing the Local Folders and Inbox from a Thunderbird POP account. I did this as two imports, first the Local Folders, then the INBOX

1) in Mail, select File -> Import Mailboxes, then select Other
2) select the folder (HOME)/Library/Thunderbird/Profiles/Default.lay/Mail/Local Folder
3) Mail then finds all the importable mbox files therein, and all the nested folders and files as well. Confirm the import

Then repeat, but using (HOME)/Library/Thunderbird/Profiles/Default.lay/Mail/(account name) as the base for the import

This leaves you with two new top-level folders in Mail.app: Import and Import-2. You can then rename and re-arrange as needed for your purposes



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: pburkholder on Oct 09, '06 04:58:31PM

EXTREMELY IMPORTANT: be sure to "Compact Folders" in Thunderbird before attempting an Import.



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: taganov on Dec 14, '06 08:53:05PM

I tried this, importing from Thunderbird 1.5.0.8 under 10.4.8 to Mail 2.1. I compacted in Thunderbird first. Then I experimented with a few mailboxes. Without exception, the import lost about 2-5% of the messages. The messages simply don't show up in the imported boxes.

On a separate Mac I imported ~20,000 messages. So how many did I lose? Too many to just live with it!

This just doesn't make sense. It should be easy!

...R



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: taganov on Dec 15, '06 12:45:27PM
OK I tried Eudora Mailbox Cleaner

http://homepage.mac.com/aamann/Eudora_Mailbox_Cleaner.html

Man, what a fine piece of free software! It worked perfectly. It even properly imported mail that I couldn't move through an IMAP server.

Nice.

...Robert

[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: iluvnoise on Apr 22, '10 08:16:56AM

I recently made the (joyful!) switch from PC to Mac, and had a bunch of emails on the PC I needed to transfer to the Mac. Unfortunately, none of the documented tips seemed to work in my case. Maybe because I was using Thunderbird 3/Windows 7 and most of the tips were written for older versions of software and OS.

So I found this very dirty and manual workaround which I didn't see anywhere online and thought I would post it. If you select all the emails you want to transfer in Thunderbird, you can then right click and choose to "Forward As Attachment." This will do just what it sounds like: attach all the emails to a single new email which you can then send to yourself. Once you get the email in Mail with all the attachments, you have to take the (admittedly tedious) step of opening each attached email and then using the "Move To" option under the Message menu dropdown. This will let you send the attached email to yourself as its own standalone email that you can then flag, to-do, or archive as you need.



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: RobK on Dec 31, '10 11:19:35AM

You should try Eudora Mailbox Cleaner

http://homepage.mac.com/aamann/Eudora_Mailbox_Cleaner.html

The Eudora Mailbox Cleaner ALSO cleans up Thunderbird mailboxes and imports them into Apple Mail.



[ Reply to This | # ]
Import mailboxes from Thunderbird into Mail.app
Authored by: EBurden on Aug 23, '12 09:02:36AM

I used your hint renaming the "inbox" with the new ending to import from Eudora OSE, which is based on Thunderbird, to mail.app. Worked perfectly.
I had tried simply importing by selecting Thunderbird in the Mail.app import menu but it did not work.
Great hint. thanks.



[ Reply to This | # ]