How should one open .eml files in linux ? I'm not sure if mutt can handle it ?


I worked it out partially , by creating a new mailbox:

mkdir -p a/{cur,tmp,new}

And place the eml file in a/cur , I could read it with:

mutt -f

But that's not exactly what I want yet

  • If your editor is set to vim in mutt, don't they get opened as plain text? You could also set an entry in mailcap to open them with your text editor if they are attachments.
    – jasonwryan
    May 15, 2012 at 2:49
  • 2
    @warl0ck Are you tested what mentioned in answers before editing the question?
    – Sam
    May 15, 2012 at 13:20

2 Answers 2


mutt doesn't seem able to open individual messages. What you can do is convert the .eml file into an mbox folder containing a single message. This basically involves adding a From line at the top, which can be done using formail -b:

formail -b < themessage.eml > themessage.mbox

This can then be opened within mutt using change-folder (default key c).

  • 7
    Nice answer. I would also add that the message could be opened directly on the command line: mutt -f themessage.mbox Also, the formail command is part of the procmail package, if you don't have it already installed on your system (debian-based systems, at least). Jan 30, 2013 at 10:56
  • formail is found in the procmail package
    – Jasen
    Feb 1 at 21:17

I had the same problem. Thanks for the "formail -b" suggestion.

The following mailcap entry seems to eliminate the necessity of manual saving, running "formail -b", and changing to the mailbox. These three steps are reduced to pushing <enter> on the message/rfc822 attachment in the attach view:

message/rfc822; formail -b < %s > %s.mbox && mutt -f '%s.mbox'; needsterminal

Additional advantage is that the .mbox file is created in /tmp directory and does not require clean-up afterwards.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .