Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

UPDATE

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

share|improve this question
    
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 '12 at 2:49
2  
@warl0ck Are you tested what mentioned in answers before editing the question? –  XinHua May 15 '12 at 13:20
add comment

2 Answers 2

up vote 6 down vote accepted

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).

share|improve this answer
    
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). –  Jeff Bauer Jan 30 '13 at 10:56
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

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.