6

Reading .EML mail files using Mutt on Mac OSX

 2 years ago
source link: https://ma.ttias.be/read-eml-mail-mutt-mac-osx/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK