Switching from Mutt to Neomutt

mutt“All mail clients suck. This one just sucks less,” so says mutt author Michael Elkins.  This is true for me over the last 10years as mutt along with offlineimap and notmuch allowed me battle the unwieldy, barbarous deluge of mailing lists and emails.  Lately I’ve moved over to neomutt.  Based on upstream mutt, neomutt includes additional features, patches and active development.


Why Neomutt?

Put simply, I was tired of having to use patched versions to include things like the sidepane, various speed-up patches and other enhancements.  Neomutt is not a fork of mutt but rather the upstream mutt with extra patches applied, nicely organized into a project and maintained across many distributions.  For a while I was using Karel Zak’s mutt-kz packages and built my own.  I’ve settled on neomutt now for my demanding email and mailing lists needs, and as always trusty vim for my composing.

Installation and Setup
I won’t walk through the very full-featured and extensive muttrc configuration file here, but you can check out my other guide on getting started with mutt, offlineimap and notmuch.  We’ll instead just focus on a simple installation on Fedora 23+.

First you’ll want to remove any mutt varieties (mutt, mutt-kz etc) if it’s installed as neomutt shares the same binary path.

[ -e /usr/bin/mutt ] && sudo dnf erase -y $(rpm -qf /usr/bin/mutt --queryformat '%{NAME}\n')

Next, enable the neomutt COPR build

yes | dnf copr enable flatcap/neomutt

Lastly, remove your existing mutt if it exists and install neomutt.

dnf install neomutt -y

At this point you can simply run neomutt in your favorite terminal as you did before, don’t worry it still uses the mutt binary name so nothing at all changes config wise.

mutt

First Impressions
For the most part everything looks just like mutt but I noticed some performance improvements and snappier speeds dealing with loading large mailing list folders and opening/closing things.  One of the notable changes was the removal of the number of messages read versus the total count showing in my patched sidepane, now it simply shows N for unread messages in the sidepane.

neomutt-view

You can revert this by setting the following option in ~/.muttrc but I ended up leaving it off because it seems faster and cleaner.

set sidebar_format = "%B%?F? [%F]?%* %?N?%N/?%S"
set mail_check_stats = yes

GPG Encrypt to Self
Another useful feature of neomutt is to auto-encrypt any outgoing GPG-encrypted messages with your key id.  Add the following to ~/.muttrc to enable this functionality replacing the key with your own.

set smime_encrypt_self = yes
set smime_default_key = 07BC7E8

Turn off Vim Highlighting in Email
As I use vim for my editor and development I have a slew of plugins and syntax highlighting, it’s irritating to have this when typing an email.  You can use the following line in ~/.vimrc to turn off this functionality within neomutt.

autocmd BufNewFile,BufRead /tmp/neomutt* set noautoindent filetype=mail wm=0 tw=78 nonumber digraph nolist nopaste

Further Documentation
The neomutt project has some extensive documentation and I didn’t have any issues with a rather large, complicated muttrc I’ve cultivated over time simply replacing mutt with neomutt.

There’s also a friendly and active IRC channel you can join as well on #neomutt / irc.freenode.net

About Will Foster

hobo devop/sysadmin/SRE
This entry was posted in open source, sysadmin and tagged , , , , , . Bookmark the permalink.

4 Responses to Switching from Mutt to Neomutt

  1. sunny256 says:

    Didn’t get the Like button to work, so I’ll say it here instead, great article. Glad to see that mutt is gaining traction again in the form of neomutt. Interesting concept, a friendly semifork that’s used for testing out patches. And yay, they’re using Git. I’ll check it out, it’s probably awesome.

    Like

  2. frakman1 says:

    Do you still use ~/.muttrc or is it now ~/.neomuttrc?

    Like

    • Will Foster says:

      Do you still use ~/.muttrc or is it now ~/.neomuttrc?

      I just use an alias for launching neomutt defined in ~/.bashrc and tell it what config file to use via the -F flag.

      alias email="neomutt -F ~/.muttrc-local"

      I believe you should still be able to use ~/.muttrc however, it should look at a few things in order like /etc/muttrc, ~/.muttrc and perhaps now ~/.neomuttrc too?

      Like

Have a Squat, Leave a Reply ..

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.