Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 am using ubuntu 9.10, and I would like to associate thunderbird to all the files with the extension .eml. The problem is that is seems that ubuntu is attributing the mime type text/plain to these files, based on their content, which meens that if I set thunderbird as the default application for .eml files, all the other text files (.txt for instance) will be opened with thunderbird. Is it possible to add a rule to impose a mime type based on the file extension, regardless of its content?

share|improve this question
up vote 3 down vote accepted

You can associate the files mime-type to an application by right clicking and choosing "Open With". You already know that, so what you need to do is have eml files in their own mime type so you can associate Thunderbird with .eml files - right?

Open /etc/mime.types as root and for eml file you should have an entry like this:

message/rfc822                                  eml

If eml appears in another mime type, such as you say text/plain, then remove it from that mime-type.

Once you have done that you can then associate message/rfc822 with Thunderbird.

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.