Reading .EML mail files using Mutt on Mac OSX

Tired of the privacy invasion of the Chrome webbrowser? Worried about the risk of seeing ads everywhere? Give the Brave Browser a try. It supports all the same Chrome extensions, with none of the telemetry. It auto-blocks ads and helps support content creators like me.

Give the Brave browser a try »

Profile image of Mattias Geniar

Mattias Geniar, June 26, 2020

Follow me on Twitter as @mattiasgeniar

As part of the cron.weekly newsletter, I want to test the plain-text version of the mail as much as possible.

This has actually become surprisingly hard. Gmail no longer has the option to show the plain-text version of an email (just the raw source, in which the plain-text version is embedded). Apple’s Mail lost the ability as well.

So I’ll fall back to trusty Mutt as the e-mail client.

Install mutt via homebrew

The installation is easy enough with Homebrew.

$ brew install mutt

Now you have the mutt binary available.

Converting the .EML to MBOX format

Mutt doesn’t directly read .EML files, the format you’d get when you download an email from Gmail or export it from Outlook or Apple Mail.

$ mutt -f mail.eml
mail.eml is not a mailbox.

So first, we’ll convert this to the MBOX format. For this, we need formail, part of the procmail package.

$ brew install procmail
$ formail -b < mail.eml > mail.mbox

Now we have a valid mail.mbox file, which we can read.

$ mutt -f mail.mbox

Evaluating the layout

Looks good enough to me!

Plain text version of cron.weekly

Spot any improvements to the text-version I should make?



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.