Reading .EML mail files using Mutt on Mac OSX

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

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.