Importing and exporting your mail

From MozillaZine Knowledge Base
Jump to navigationJump to search
This article was written for Thunderbird but also applies to Mozilla Suite / SeaMonkey (though some menu sequences may differ).

Introduction

If your old email client is still installed, the easiest solution is to import the e-mail, address books and settings using Tools -> Import. If it is not installed or Thunderbird doesn't know how to import data from it, typically you need to find some way to export or convert your old email client's mail files to either .EML or mbox files, and some way to export or convert the address books to .CSV or .LDIF files. And if you just need to transfer email between email clients, another option is doing so indirectly via a mail server.

Thunderbird, Netscape, Mozilla Suite and SeaMonkey use mbox files to store the messages for a folder. The ImportExportTools extension can import and export mbox and .EML files. Many email clients use mbox files (regardless of whether they use no file extension, .mbx or .mbox as the file extension) to store messages or provide a way to export folders as mbox or .EML files due to the popularity of Eudora and Outlook Express. Sometimes email clients use "Unix format" to refer to a mbox file since the format was originally developed for Unix systems.

If you have problems importing .EML files using the ImportExportTools extension try using eml2mbx to convert the .EML files to a mbox file and then import the mbox file using the ImportExportTools extension. A Google search will find several eml to mbox conversion programs. Whats unusual about this one is that provides a lot of control over how it converts the .EML files using a "eml2mbx.ini" file.

If your old email client supports exporting the address book as either a .CSV or .LDIF file you can import it using Tools -> Import -> Address books -> Text Files.

No matter how you import or export your e-mail its a good idea to back up your e-mail first in case something unexpected happens.

If you're moving from a old PC to a new one its typically easiest (and safest) to install Thunderbird on the old PC, import your e-mail, settings and address books and then move the Thunderbird profile to the new PC.

Specific programs

America Online (AOL)

  • Import to Thunderbird:

Apple OS X Mail.app

Apple iPod (contacts and calendar only)

Barca and/or PocoMail

  • Use File -> Export -> Mailbox to export the mail folders in "Netscape" format. That should create mbox files. Rename them to have no file extension and import them using the ImportExportTools extension. Use File -> Export -> Address Book to export the address book as a .csv or .ldif file and then import it in Thunderbird using Tools -> Import -> Address Books -> Text File. See here for more information.

Becky!

Calypso

  • It uses its own storage format to store folders in a .box file but provides an archive option to export folders as mbox files, which is what Thunderbird uses. You could use the ImportExportTools extension to import the folders. Another possibility would be to upgrade to Courier email client (its follow-on), let it import your data, and then migrate from Courier to Thunderbird using Courex.

Courier (Rose City)

  • You can export both the folders and address books using Courex.

Eudora

Eudora is no longer being sold by Qualcomm. They have created a open source version based on Thunderbird. See this article for more information.

Entourage

Open Entourage and drag and drop the folders to the desktop. That will create mbox files with an .mbox file extension. Either drag and drop them to the appropriate directory in your Thunderbird profile or import them using the ImportExportTools extension.

Evolution

How To Migrate From Evolution To Thunderbird In Ubuntu Intrepid describes how to migrate the mail, calender, tasks and address book. It was written when Evolution defaulted to using mbox files, just like Thunderbird does. Evolution 3.2.0 and later uses maildir files. If you created your Evolution profile using a version that defaulted to maildir you will need to use a tool to convert maildir files into mbox files for multiple folders, such as maildirarc or maildir2mbox. Then you can import the mbox files using the ImportExportTools add-on, and resume using the article for how to import your other data.

Groupwise

Groupwise supports SOAP, POP and IMAP accounts. The easiest way to migrate mail would be to drag and drop folders from a Groupwise IMAP account in Thunderbird to another IMAP account (such as Gmail) in Thunderbird. If thats not possible GWSave does a bulk export of messages to .eml files. You could use the ImportExportTools add-on to import them into Thunderbird.

Thunderbird supports using LDAP servers as address books so if your Groupwise server is configured to provide that, you can keep using it. Some other solutions:

  • Novell Cool Solutions has a tool to export address book group members to a .csv file. You can use Tools -> Import -> Address books -> Text files to import that .csv file in Thunderbird. They also have a GroupWise Address Book Wizard that can export an address book as .csv files.
  • GWIMPEXP exports the address book in a format that Thunderbird understands.

Some other Groupwise related tools are here. Groupwise won't run unless its the default email client. If you try to have both Groupwise and Thunderbird co-exist, you'll need to uncheck Tools -> Options -> Advanced -> General -> "Always check to see if Thunderbrid is the default email client on startup" within Thunderbird.

Google Gmail

Incredimail

Juno (the email client, not the ISP)

  • UseJuno5bdb to convert the folders to mbox files. Then import them using the ImportExportTools extension. See [1] if you use a version of the Juno client before 5.0.

MH, mh-e, nmh, xmh, exmh

  • The MH e-mail client and is descendants store each message in a seperate file using the MH (Message Handler) format. The e-mail client is made up of several programs. Use packf to convert all of the messages in each directory into a mbox file, and copy it to the local folders directory in your Thunderbird profile. For example, if you have a folder called SAVED the following command will create a mbox file called "SAVED_mbox." that contains all the emails from your SAVED directory.
% packf +SAVED -mbox -file SAVED_mbox

Mozilla Suite and Netscape 7

Outlook and Outlook Express

  • Import to Thunderbird
  • Export from Thunderbird

    See Mail Utilities for some utilities that can be used to import messages if you no longer have the Microsoft email client installed. For example, you can use MailStore Home to export a .pst file as .eml files and then use the ImportExportTools add-on to import them into Thunderbird. There is also a trial version of a mbox to .pst file converter from Kernel Data Recovery that can save the mail in an existing .pst file or create a new one.

Pegasus

PMM 2000

  • This thread has a PHP script and a similar program in Pascal that could be used to convert the messages. The last poster wrote a program in Delphi that you can get for the asking if you contact him. PMM 2000 stores each message in a .msg file (but not in a rfc-conform format). For each folder you could modify each message by switching two lines (look at an existing mbox file first to get an idea of what to do) and then copying it into the appropriate mbox file using a text editor.

Polarbar Mailer / J Street Mailer

  • Both use .pop files that are actually .EML files to store messages. Rename them to use a .EML file extension and import them using the ImportExportTools extension. There is no problem converting messages from J Street Mailer. However, Polarbar Mailer uses a X-DateReceived: header instead of a Date: header in messages in the Sent folder. You need to edit those messages with a text editor and change X-DateReceived: to Date: before importing the messages.

The Bat!

  • Use the Bird Import add-on to import the folders. Unfortunately the add-on uses a function that is no longer available. If you want to use it install Thunderbird 8.0 in a different directory per Go back to an old version of Thunderbird and use it to import the mail. Your other version of Thunderbird will use the same profile.
  • If you don't want to install an older version of Thunderbird you could export the folders using the "Unix Mailbox" format (that's compatible with the mbox format used by Thunderbird) and then use the ImportExportTools extension to import them.

    Its also possible to select multiple messages in a folder using Control-A and then drag and drop them to a folder in Thunderbird. If you have problems doing this try hovering the mouse over Thunderbird in the task bar, letting it change the windows focus, and then selecting the folder you want to move the message to, before releasing the mouse button. [2]

  • The Bat! supports IMAP accounts. See the "Using IMAP remote folders as an intermediary" section for another way to migrate your mail.

Thunderbird

  • Thunderbird doesn't have a built-in capability to export, import or merge profiles. See Importing folders for how to import/export folders using the ImportExportTools add-on, Moving address books between profiles for how to import/export address books, and Transfer data to a new profile for a detailed description of how to migrate every file in the profile. If you're merging profiles its easiest to just pick the profile with the most accounts, re-create the missing accounts, and then import the mail folders and address books from the other profiles.

    See Moving your profile folder if you want to move a profile from one machine to another, and its not practical to just backup the profile with MozBackup, copy the *.pcv file it creates to the other machine, install Thunderbird, and then restore the profile using Mozbackup.

Webmail (including Google Gmail, MSN Hotmail, Netscape Mail, or Yahoo)

Windows Mail (aka Windows Live Mail)

  • Import to Thunderbird:

    Windows mail stores the messages as .EML files. They are normally stored within the C:\AppData\Local\Microsoft\Windows Mail directory. If you can't find them look in the Tools -> Options -> Advanced -> Maintenance -> Store Folder to find where Windows Mail stored them. The best way to import .EML files is with the ImportExportTools add-on, it lets you import all of the .EML files in a directory in one step using "Tools -> ImportExportTools -> Import all eml files from a directory". However, if you only have a few .EML files you could drag and drop them from Windows Explorer to a folder in Thunderbird instead.

    Export the contacts using the Windows Contacts program as a .csv file. You can import it using Tools -> Import -> Address books -> Text Files. See this article for more information about how to export the contacts.

  • Export from Thunderbird:

    Export the messages as .EML files using the ImportExportTools extension. Then use File -> Import -> Messages in Windows Live Mail to import all of them. If it doesn't like the layout of the directory tree you can always launch Windows Live Mail, open a folder, and drag and drop the .EML files you want to import, to that folder. Outlook Express and Windows Mail support importing messages by dragging and dropping .EML files too.

Migrating messages using a mail server

Using an extension to put your Thunderbird messages back on the POP server

Another way to export your messages would be to follow the instructions in Putting messages back on a POP3 server to upload your messages back to your POP3 server. You could then download them normally with another email client. They will have normal headers, it would not look like you had forwarded the messages to yourself.

Using IMAP remote folders as an intermediary

If you have problems migrating your mail you might consider signing up for a free IMAP account and use it as a intermediary to move your mail. Think of it as a file share that knows about mail folders. You could create a 15GB IMAP account for Gmail using these instructions, a 5GB IMAP account with Outlook using these instructions or a 1TB IMAP account with Yahoo using these instructions . When you're done moving your mail you can delete the IMAP account in both email clients.

IMAP supports remote folders (on the mail server) that you can access just like they're local folders. You can copy/move messages/folders to/from them, even drag and drop a entire folder hierarchy. This would let you preserve most of the message status information (what messages have been replied to etc.) and the folder hierarchy. It should cause the least problems since you're using a Internet standard that both email clients support, rather than trying to convert between two partially documented file formats etc.

Create an IMAP account in both email clients. Copy your messages/folders to a remote inbox folder using one email client and then copy them from the remote inbox folder to a local folder using the other email client. If you have more messages than can fit in the mailbox do it in several steps, deleting the messages/folders in the remote inbox and compacting it as needed to free up more space. There are a few email clients whose IMAP support is crippled, and don't support uploading messages. But most popular email clients (Eudora, Outlook, Outlook Express, Pegasus, Thunderbird etc. ) do.

If the performance delay due to sending a lot of messages over the network is a issue you could temporarily install a local IMAP server and use it to provide the remote folders. hMailServer is an open source IMAP server for Windows thats easy to install.

Use a Gmail specific loader

You could sign up for a free Gmail account, upload the messages using a utility such as Gmail Loader (GML), configure Thunderbird to use Gmail, and then download your messages as new mail.

The Gmail Loader reads messages from your existing mail files and forwards them to either the Inbox or Sent Mail folder in a Gmail account. It supports Mbox (what Mozilla uses), MailDir (Qmail, others), MMDF (Mutt), MH (NMH), and Babyl (Emacs RMAIL) formats. It hides the fact that the message is forwarded and eliminates the grunt work of individually forwarding all of your messages. GML has versions for Windows (all files needed are included) and Linux / OS X (requires you to install Python).

Google webMail Filer for Thunderbird is a utility to upload messages from Thunderbird's mail folders to your Gmail account. It deals with issues such as not uploading duplicates, Unicode, Gmail nested labels and the Google mail quota that its not clear that GML knows about. Its only available for Windows (its a .NET program that won't run under Wine or using Mono). Its a better way to upload mail to Gmail but since it is Thunderbird specific program that only knows about mbox files its not useful if you are trying to migrate messages from another email client. Version 2.9.0.0 (released 2013-01-29) is the last version available. The author appears to have stopped all work on the software. Ghacks has an article about the utility here.

Google Apps Migration for Microsoft Outlook can be used to migrate messages, contacts and calendars from Outlook to a free Google Apps account. It replaces the Google Email Uploader program. You can create a POP or IMAP account for Google Apps in Thunderbird.

GMVault backs up your Gmail mail as a set of directories of .EML files. It can also be used to upload those files. Its not clear how easy it would be to export your mail into the format it expects.

Miscellaneous

Mbox files

There are four main versions of the mbox format. Thunderbird, Mozilla Suite, Netscape, Portable Thunderbird, Postbox, Spicebird, SeaMonkey and the open source version of Eudora use a slightly modified version of the mboxrd variant of this format. The proprietary version of Eudora uses a slightly modified version of the mboxo variant. Most Windows email clients that use mbox files will use a mboxo or mboxrd version, and you should have little trouble importing them. Under Linux you're more likely to run into an mboxcl or mboxcl2 version, which is incompatible. Both Kmail and Evolution use a compatible version. You might try migrating your messages to Kmail as an intermediate step since it supports importing numerous formats.

See the following links for more technical information about this format:

Manually importing and exporting

Unless you are an advanced user its generally preferable to use an application to import or export a folder since that typically sanitizes the file to minimize any incompatibilities. If you use IMAP's optional offline mode to create a local copy of remote folders, think ahead about how you will deal with any potential synchronization issues. To manually import/export mbox formatted files:

  1. Identify the e-mail account you want to use for the imported mail. You can use the Local Folders account, or some other account, or you can create a new account specially.
  2. In Account Settings, go to the Local Folders account's main page to find its Local directory path. Or, to import the folder into some other account, go to the account's Server Settings page to find its Local directory path. Make a note of the path.
  3. Exit Thunderbird or Mozilla Suite.
  4. Back up your profile or Mail directory, especially if you plan to overwrite existing mbox files.
  5. Copy the mbox files you are importing to the local directory that you identified in step 2. For example, copy "Inbox" (not Inbox.msf) to the account's local directory.
    Note: If you want to keep the existing mbox file of the same name in the new location, rename the file you wish to import before copying it over. For example, rename "Inbox" to "InboxOld" and "Sent" to "SentOld".
  6. Open Thunderbird or Mozilla Suite. As it starts up, the application automatically discovers new mbox files and makes them into folders. A folder for each file you copied should be displayed.
  7. Open each folder and verify that it contains the correct number of e-mails, that they are readable, and that you can open attachments. Sometimes, differences between mbox formats cause multiple emails to be combined into one larger e-mail or can make some e-mails unreadable.

Troubleshooting is beyond the scope of this article, but if you examine the mbox technical links and the links to importing specific programs, you may find helpful information.

See also