NeoMutt
[NeoMutt] is a terminal based email client from the 1990’s. It’s forked from an even older 90’s client called Mutt. They, like many ancient TUIs from the 90’s, have a pretty rough looking config language and documentation website, but it’s a really really solid client, and they recently (in 2017) added support for lua scripting, so it ain’t all bad.
A lot of people use neomutt with notmuch.
Colorschemes and Themes
It’s 256-xterm colors again. TUIs can just be like that sometimes :/ Check out an example colorscheme here: neonwolf And then checkout the one I hacked together here: spacechalk powerline It was hacked together in part from this: neomutt powerline nerdfonts
Here’s another pretty example neomutt example.
Configuring NeoMutt with Protonmail
You’ll need protonmail-bridge (which you can brew install
).
Steps:
- Launch protonmail-bridge
- login with your protonmail account
- copy the password it spits out
This will be your password that you can source in your neomuttrc
which should be located in ~/.config/neomutt/neomuttrc
.
You can check out an example neomuttrc file if you’d like.
Nesting virtual folders
github: Nested virtual folders #1594
neomuttrc syntax examples from neomutt.org
neomutt.org has examples for most things and a lot of documentation generally, but much of it isn’t syntax highlighted, so I’m just posting this here for people who may need to quickly check something, but with syntax highlighting.
Example neomuttrc configuration with syntax highlighting
# Example NeoMutt config file for the status-color feature.
# The 'status-color' feature allows you to theme different parts of
# the status bar (also when it's used by the index).
# For the examples below, set some defaults
set use_threads=yes
set sort=last-date-received
set sort_aux=date
# 'status color' can take up to 2 extra parameters
# color status foreground background [ regex [ num ]]
# 0 extra parameters
# Set the default color for the entire status line
color status blue white
# 1 extra parameter
# Set the color for a matching pattern
# color status foreground background regex
# Highlight New, Deleted, or Flagged emails
color status brightred white '(New|Del|Flag):[0-9]+'
# Highlight mailbox ordering if it's different from the default
# First, highlight anything (*/*)
color status brightred default '\([^)]+/[^)]+\)'
# Then override the color for one specific case
color status default default '\(threads/last-date-received\)'
# 2 extra parameters
# Set the color for the nth submatch of a pattern
# color status foreground background regex num
# Highlight the contents of the []s but not the [] themselves
color status red default '\[([^]]+)\]' 1
# The '1' refers to the first regex submatch, which is the inner
# part in ()s
# Highlight the mailbox
color status brightwhite default 'NeoMutt: ([^ ]+)' 1
# Search for 'NeoMutt: ' but only highlight what comes after it
# vim: syntax=neomuttrc
Neomutt also has a vim syntax repo that you could could use locally when editing neomuttrc files.
Helpful links
- Stephane: NeoMutt Cheatsheet
- reddit neomutt megathread
- Gideon Wolfe: Very good intro to Neomutt
- aliquote: Tips and tricks for Neomutt
- Macro for opening text/html attachment
- notmuch docs on mutt
- Gideon Wolfe: nextcloud and mutt (goes over [khard] as well)
- Brian Thompson: Setting up mutt client with protonmail (goes over notably mbox and Maildir)