In this post, I'll share my Mutt configuration. I'm not using Mutt directly, but
mutt-kz which is a fork with good notmuch integration. For this post, it won't
change anything.

Configuration

The complete configuration is made in the .muttrc file. Mutt configuration
supports the source command so that you can put some of your settings in another
files and source them from the .muttrc file. You'll see that the configuration
can soon grow large and therefore, splitting it in several files will save you a
lot of maintenance issues ;)

The spoolfile and postponed are specifying the inbox and draft mailboxes. The
.mutt/mailboxes file is generated by offlineimap.

By default, Mutt will ask you to move read messages from INBOX to another
mailbox (set by mbox). I personally let my read messages in my inbox and move
them myself in a folder. For that, you have to disable the move:

set move = no

If you move a mail from a mailbox to another, Mutt will ask for confirmation,
you can disable this confirmation:

set confirmappend = no

If you use Mutt, you want to read plaintext messages rather than monstruous
HTML. You can tell Mutt to always open text plain if any:

alternative_order text/plain text/html

If the mail has no text/plain part, you can manage to read HTML in Mutt in an
almost sane format. First, you need to tell Mutt to open html messages:

auto_view text/html

And then, you need to tell it how to open it. Mutt reads a mailcap file to know
how to open content. You can tell Mutt where it is:

set mailcap_path = ~/.mailcap

And then, you have to edit the .mailcap file:

text/html; w3m -I %{charset} -T text/html; copiousoutput;

That will use w3m to output the message inside Mutt. It works quite well. You
can also use linx if you prefer.

This is a classical example that display the sender, the flags, the date, the
subject, the size of the mail and so on. You will need to look at the Reference to have more information on
what you can do with the format variables. There are plenty of information that
can be shown.

The example here displays the current folder, the number of mails in it with
some details on deleted and unread mails and finally the number of postponed
mail. Again, if you want more information, you can read the reference.

You can configure Mutt so that the index view is always visible when you read
mails. For instance, to always show 8 mails in the index:

set pager_index_lines=8

Another important thing you can configure is the colors of Mutt. I'm not gonna
cover everything, since Mutt is very powerful on this part. For instance, here
are some examples from my configuration:

Unless you are really wanting to spend time on this part, I recommend to pick an
existing theme. I took a Solarized theme here. It looks quite good
and works well. There other themes available, you'll surely find the one that
looks best for you.

Bindings

Bindings are always very important. If like me, you're a vim aficionado, you'll
want your Mutt bindings to be as close as possible to vim. The default settings
are quite good, but not always close to vim.

Something that is important to know when you configure Mutt bindings is that
they are relative to the current view open (index, pager,browser,attach, ...).
You can bind a keystroke to a different action in each view. You can also select
several views in which the keystroke is valid.

If you are using the sidebar patch (and again, you should ;) ), you'll want to
configure fast bindings for it. Here are mine: