Mutt, an MUA that “sucks less”

Mutt is a simple text based email client that keeps it simple while still providing all the features of a full modern mail user agent. Mutt fits nicely into a minimal environment, like the one my tutorials have been building on. If you haven’t tried it out, I highly suggest it, as it will certainly increase your productivity, and has a tiny footprint, unlike other e-mail clients.

Get the package!

$ sudo pacman -S mutt

And build out the directory tree.

$ mkdir ~/.mutt
$ cd .mutt
$ mkdir address
$ mkdir cache
$ mkdir themes
$ mkdir cache/bodies

Touch the configuration file that we will edit in just a moment.

$ touch ~/.muttrc

Copy a theme such as this one, and place it in themes. Comidia is a wonderful dark theme that I enjoy using.

$ touch ~/.mutt/themes/comidia
$ cd ~/.mutt/themes/

Paste the theme you want to use.

$ vim comidia

#
# This theme is from H. D. Lee
#
# This colors file was originally taken from Rosenfeld's
# Modified slightly.
# Running aterm with:
# aterm +sb -geometry 80x60 -bg papayawhip -fg darkgreen -e mutt
#
# color terminals:
# (default, white, black, green, magenta, blue, cyan, yellow, red)
# (bright...)
# (color1,color2,...,colorN-1)
#
# object foreground background
#
color normal default default # normal text
color indicator brightcyan black # actual message
color tree brightmagenta default # thread arrows
color status cyan black # status line
color error brightcyan default # errors
color message cyan default # info messages
color signature red default # signature
color attachment green default # MIME attachments
color search brightyellow red # search matches
color tilde brightmagenta default # ~ at bottom of msg
color markers red default # + at beginning of wrapped lines
color hdrdefault blue default # default header lines
color bold red default # hiliting bold patterns in body
color underline green default # hiliting underlined patterns in body
color quoted cyan default # quoted text
color quoted1 green default
color quoted2 red default
color quoted3 magenta default
color quoted4 blue default
color quoted5 blue default
#
# object foreground backg. RegExp
#
color header red default "^(from|subject):"
color body yellow default "((ftp|http|https)://|(file|news):|www\\.)[-a-z0-9_.:]*[a-z0-9](/[^][{} \t\n\r\"<>()]*[^][{} \t\n\r\"<>().,:!])?/?"
color body cyan default "[-a-z_0-9.+]+@[-a-z_0-9.]+"
color body red default "(^| )\\*[-a-z0-9*]+\\*[,.?]?[ \n]"
color body green default "(^| )_[-a-z0-9_]+_[,.?]?[ \n]"

uncolor index * # unset all color index entries
color index green default ~F # Flagged
color index red default ~N # New
color index magenta default ~T # Tagged
color index yellow default ~D # Deleted
color index blue default '\[(CHRPM|Contrib-Rpm)\]'
color index brightblack default "~h ^X.Mailer..Microsoft.Outlook"
# color index brightblack default "~n 10-20"

Fill in your email providers settings in .muttrc to get a working mutt configuration. Most email services such as GMail provide you with all the information to complete this correctly. Log into your email account and check out the settings page if you don’t know them. I have my configuration customized to use vim for editing ¬†and set to thread emails into a tree. This makes it really easy to sort through mailing lists. The last line tells mutt to use the comidia theme.

$ cd ~/
$ vim ~/.muttrc

#
# System configuration file for Mutt
#

set from = "user@domain.com"
set realname = "Firstname Lastname"
set imap_user = "user.name@domain.com"
set folder = "imaps://inbox.domain.com"
set imap_keepalive = 900
set mail_check = 300
set ssl_force_tls = yes

set smtp_url = "smtps://user.name@mail.domain.com:port/"
set spoolfile ="+INBOX"
mailboxes = "+Inbox"

#Point Mutt to the appropriate files
set header_cache = ~/.mutt/cache/headers
set message_cachedir = ~/.mutt/cache/bodies
set certificate_file = ~/.mutt/certificates
set edit_headers = yes
set move = no

# Header stuff
ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
hdr_order Date From To Cc

# For better looks
# don't put '+' at the beginning of wrapped lines
set markers=no
# how large is the index window?
set pager_index_lines= 5
set sort = 'threads'
set sort_aux = 'last-date-received'

# My Editor
set editor='vim + -c "set textwidth=90" -c "set wrap" -c "set nocp"'

#Your beautiful theme
source ~/.mutt/themes/comidia

$ mutt

When you launch mutt you will see all your email, as you probably expected.
MuttHitting enter will open the email.
muttHitting ‘m’ from the main window will allow you to send an email.
Mutt Sending EmailSave the email and send!
muttHope you enjoy using Mutt as much as I have,

About

Tony is a system administrator from Seattle, WA. He specializes in secure, minimal, Linux installations.

Posted in Linux Tagged with: , , ,
2 comments on “Mutt, an MUA that “sucks less”
  1. Chuck says:

    I agree that Mutt sucks less. But I wanted just a bit more.

    Years ago, I used Pine. Today I discovered Alpine (also by Univ of Wash). Alpine looks much the same as Pine and the text interface is easier (for me) to interpret than Mutt’s.

    • Tony says:

      I have also used Pine with much joy. I prefer Mutt because I can run in from term, e.g. without a Window manager if necessary. Mutt can also be extended as far as needed with extensions, etc.

What did you think?

Subscribe

Enjoy what we do? Want to stay updated? Enter a valid E-mail address, and never miss a thing.

%d bloggers like this: