The KMail Handbook
Prev |  | Next

# Chapter 5. Using other Mailbox Files with KMail

This section is for all of the users who need to move email messages from their previous email client over to KMail. KMail stores its mail using the `mbox` format, one of the most widely used mailbox formats on UNIX® systems. Mbox mailboxes store messages in one file, identifying where messages start and end with a `From` line (do not mix it up with the `From:` header that contains the message's sender). For many UNIX® mailers, all you must do is move your mailboxes to `~/Mail` (or make `Mail` a symbolic link to the folder containing your mailboxes), make sure they are writeable by your user, and launch KMail. The mailboxes should now show up correctly in KMail.

If your old mailboxes are not in mbox format, see below for instructions on importing some other common formats. Take a look at the Download section of KMail's homepage if your mailbox format is not listed here.

| Do not use a second mail client that accesses the files in `~/Mail` while KMail is running or you might lose messages. This section only explains how to import mailboxes to KMail once, it's not useful to you if you're planning to use several mail clients for your mailboxes in the future.

Eudora Lite/Eudora Pro

  Eudora uses the mbox format in its mail files. To use them with KMail, make sure that your Eudora mailboxes have been compacted, then copy the `.mbx` files (Windows® Eudora) or Eudora mailbox files (Mac® Eudora) to your `~/Mail` directory. You don't need to copy the `index` files. Once you start KMail, the mailboxes should appear in the Folders pane and the messages should be accessible in the Headers pane.

  If messages do not appear in the Headers pane, your mailbox files may still contain Windows® or Mac® line feed characters. Use your favorite text editor, the recode command or a scripting language to change the Windows® or Mac® line feeds to UNIX® line feeds.

MMDF

  This format is close enough to the mailbox format that KMail should be able to use these mailboxes if you just copy them to your `~/Mail` directory. However, MMDF mailboxes have not been tested with KMail, so your results may vary. If you can get this format to work with KMail, please let us know so we can include more specific directions in the next documentation release.

MH mailboxes

  MH mailboxes are directories containing files that correspond to each message in that mailbox. A shell script to convert MH mailboxes to mbox mailboxes, mh2kmail, is included at least in the source releases of KMail, but maybe not in the packaged releases. Running this script on a MH folder will convert it to an mbox file. We strongly suggest that you back up your MH mail folders before you use this script.

Forte Agent

  In Agent:

  1. Select the messages to export

  2. Select FILE->SAVE MESSAGES AS

  3. Mark the UNIX FORMAT and SAVE RAW boxes

  4. Give File a `.txt` extension and save.

  In KDE:

  1. Move previously saves file to correct `~/Mail` folder

  2. Rename file without `.txt` extension

  When you open KMail the new folder with appropriate messages will be there.

Netscape® Mail

  Copy your Netscape® mail files from `~/nsmail/` to `~/Mail` and make sure they are writeable (only by your user, of course). The mailboxes will show up in KMail the next time you start it.

Pegasus Mail

  Pegasus for win32 uses single files for Mail folders similar to KMail. Pegasus mail folder files have the extension `.pmm` but they are the same format as mbox except the messages do not start with the `From` header, but with a control character. To work around this, replace each instance of the control character with `From aaa@aaa Mon Jan 01 00:00:00 1997`. This `From` line should be the first line of every message, before the `Received:` and other headers. Make sure to use a text editor that lets you save the files in UNIX® format or create new folders in Pegasus that are in UNIX® format and copy your mails there.

Maildir / Outlook Express / xfmail

  Tools to convert these formats are available at the Download section of KMail's homepage.

Lotus Notes, BeOS Mail files, cc: Mail, etc....

  First you should have a look at Download section of KMail's homepage if there are tools to convert mails.

  Mail programs not listed here or on the homepage probably do not work with KMail as they use proprietary mail formats that KMail cannot understand. However, there is no harm in trying! If the mailbox file looks similar to the mbox format, try copying the mailbox file (remember, the index file is not needed) to your `~/Mail` directory and see what happens if you start KMail. If you get mailboxes from your favorite mail client to work in KMail, please tell us how you did it so that we can include directions in a future revision of this documentation.

Prev | Home | Next
Miscellaneous Tab |  | Menus and Keyboard Shortcuts