Opening .eml files with mutt

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


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.

Tags:

Email

Mutt