Refining My NeoMutt Configuration

Written By: Jake Bauer | Posted: 2020-05-05 | Last Updated: 2020-05-05

Screenshot of NeoMutt on my system.

I use NeoMutt as my email client. It’s fast, treats text/plain email as a first-class citizen, and is terminal based so I can use it with vim keybindings. The configuration, though, is really complex and there’s a lot that can be played with. Over the past few days, I’ve been tinkering and tweaking with it to make my email experience on the command line just a little bit better.

One thing that I found annoying were text/html emails which relied so much on image content they had to be viewed in their HTML form. I used to save the body of these emails and then open them up in Firefox, but just by adding

text/html; $BROWSER %s;

to my mailcap file, I am able to open these bodies in Firefox from within NeoMutt.

Another thing I found cumbersome was the handling of contacts through an aliases file. Instead, I opted to install and use abook which is a contact program, used on the command line, designed for use with mutt. This should make storing and referring to my contacts easier than it used to be. The options that I used in my neomuttrc are:

set query_command="abook --mutt-query '%s'"
macro index,pager a \
    "<pipe-message>abook --add-email-quiet<return>" \
    "Add this sender to abook"
bind editor <Tab> complete-query

Some other minor changes include:

You can view my dotfiles on sourcehut or mirrored on git.paritybit.ca. Don’t hesitate to share suggestions or comments!

This is my eleventh post for the #100DaysToOffload challenge. You can learn more about this challenge over at https://100daystooffload.com.