Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've successfully import mail files to KMail, but since there was only one message in each file, it was inconvenient to read it since each message was stored in a separate folder.
(I used the Import Evolution 2.x Local Mails and Folder Structure option to import those files)
How can I import the mail files without having KMail dedicating a separate folder for each message?

Check here for an example of a mail file.

share|improve this question
up vote 3 down vote accepted

rfc822 is also known as .EML file format, you can see all info about importing into Thunderbird HERE.

Interesting text from the link:

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.

In short you must convert EML to mbox format.

There is also info for KMail and links HERE.

Also you can use eml2mbox ruby script to convert your emails to mbox, which can be imported into Evolution. I was able to convert the sample you provided and import it. The script with all info needed can be found HERE.


share|improve this answer
i'm thinking this one most adequately addresses the question, but i haven't tried it – RobotHumans Nov 22 '10 at 1:52
I tried to use the ImportExportTools tool to import my files, but it says fileName seems not to be a mbox file or is a corrupted mbox file. That happened when I treated the files as mbox files, because that only then ImportExportTools recognized that there're files in that directory. When trying to import those files as EML, ImportExportTools doesn't recognize any files so I can't import them. – Dor Nov 22 '10 at 19:07
Hmm, well can you provide a sample with some random body text? – danizmax Nov 24 '10 at 15:21
Yep. I've edit my post and added a link. – Dor Nov 24 '10 at 19:22
I added the eml2mbox tool you need to my post. – danizmax Nov 25 '10 at 14:39

I think I've tried to do the same once some time ago, though I also wanted to import them to gmail.

The way I ended up doing it, was installing a mail server (Dovecot I think) on my computer, put the mbox files in a newly created mailbox, and the point the gmail pop service to my local mailserver. This of course required port forwarding, but if you just want it to be imported to your local machine, it won't be needed.

I know this is a terribly complicated approach, but it did work, and it were kind of fun to see it work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.