This the configuration I use for Mutt (1.2).


# Tim Waugh's .muttrc

# I used to use pine, and these are for comfort value
set folder=~/mail
set record=+sent-mail; set copy=yes
save-hook . +saved-messages
bind index '-' previous-page
bind index ' ' next-page
bind pager '[' half-up
bind pager ']' half-down
set edit_headers
set forward_format="%s (fwd)"
set forward_decode
unset mime_forward
unset confirmappend
set attribution="On %d, %n wrote:\n"
set include
set delete=yes
set move=no
set help
unset mark_old
macro index \cb |urlview\n
macro pager \cb |urlview\n
macro index \ef "!fetchmail -a\n"

# Header weeding and ordering
ignore *
unignore from: date subject to cc
unignore reply-to mail-followup-to
hdr_order date from to cc subject

# GnuPG stuff

# from /usr/doc/mutt*/gpg.rc -->
# %p    The empty string when no passphrase is needed,
#       the string "PGPPASSFD=0" if one is needed.
#       This is mostly used in conditional % sequences.
# %f    Most PGP commands operate on a single file or a file
#       containing a message.  %f expands to this file's name.
# %s    When verifying signatures, there is another temporary file
#       containing the detached signature.  %s expands to this
#       file's name.
# %a    In "signing" contexts, this expands to the value of the
#       configuration variable $pgp_sign_as.  You probably need to
#       use this within a conditional % sequence.
# %r    In many contexts, mutt passes key IDs to pgp.  %r expands to
#       a list of key IDs.

# decode application/pgp
set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch -o - %f"

# verify a pgp/mime signature
set pgp_verify_command="gpg --no-verbose --batch -o - --verify %s %f"

# decrypt a pgp/mime attachment
set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch -o - %f"

# create a pgp/mime signed attachment
set pgp_sign_command="gpg-timestamp-maybe --no-verbose --batch -o - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"

# create a application/pgp signed (old-style) message
set pgp_clearsign_command="gpg --no-verbose --batch -o - --passphrase-fd 0 --armor --textmode --clearsign --not-dash-escaped %?a?-u %a? %f"

# create a pgp/mime encrypted attachment
set pgp_encrypt_only_command="pgpewrap gpg -v --batch -o - --encrypt --textmode --armor --always-trust -- -r %r -- %f"

# create a pgp/mime encrypted and signed attachment
set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 -v --batch -o - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"

# import a key into the public key ring
set pgp_import_command="gpg --no-verbose --import -v %f"

# export a key from the public key ring
set pgp_export_command="gpg --no-verbose --export --armor %r"

# verify a key
set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"

# read in the public key ring
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" 

# read in the secret key ring
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r" 

# receive key from keyserver:
set pgp_getkeys_command=""

# gpg.rc <--

# I want to sign all of my messages by default (except to certain
# recipients), and I want to encrypt only to certain recipients.
# I also want to reply to encrypted messages encrypted.

set pgp_replyencrypt
set pgp_verify_sig=ask-yes
set pgp_timeout=1200 # I don't want to have to type my passphrase too often
# By default:
# Don't encrypt
send-hook . unset pgp_autoencrypt
# Sign
send-hook . set pgp_autosign
send-hook . unset pgp_create_traditional
# Abort if no subject.
send-hook . set abort_nosubject=ask-yes
# Now the exceptions:
# Don't sign stuff to Linus or Alan
send-hook torvalds@transmeta\.com unset pgp_autosign
send-hook alan@lxorguk\.ukuu\.org\.uk unset pgp_autosign
# Majordomo doesn't care about signatures or subject lines
send-hook Majordomo@ unset pgp_autosign
send-hook Majordomo@ set abort_nosubject=no
# Send encrypted to these people
send-hook tim@cyberelk\.demon\.co\.uk set pgp_autoencrypt
send-hook set pgp_autoencrypt
send-hook bandregg@redhat\.com set pgp_autoencrypt
send-hook sue@cyberelk\.demon\.co\.uk set pgp_autoencrypt
send-hook sue@cyberelk\.net set pgp_autoencrypt
# Use clearsigning for these people
send-hook sue@cyberelk\.demon\.co\.uk set pgp_create_traditional
send-hook sue@cyberelk\.net set pgp_create_traditional
send-hook dsainty@redhat\.com set pgp_create_traditional
send-hook vnc-list@uk\.research\.att\.com set pgp_create_traditional
send-hook '~s ^\\[patch\\]' set pgp_create_traditional
# Use the '' key for this address
pgp-hook tim@cyberelk\.demon\.co\.uk B678C952

# I don't have a signature, so I don't use sigdashes
unset sig_dashes

# I use emacs for writing mail.
# In my .emacs I put:
# ;;; Don't add newlines when at the bottom of a document
# (setq next-line-add-newlines nil)
# ;;; Turn on paragraph filling when going into text mode
# (add-hook 'text-mode-hook 'turn-on-auto-fill)
# ;;; to tell emacs to use text mode when editing mail messages
# (setq auto-mode-alist (cons '("^/tmp/mutt-" . text-mode) auto-mode-alist))
set abort_unmodified=ask-yes
set editor="emacs -nw"

# I like seeing threading mail by default
set sort=threads

# I like to see where I am in a thread while I'm reading it
set pager_index_lines=4
# But not all the time
macro pager z ":set pager_index_lines=0\n"
macro pager Z ":set pager_index_lines=4\n"

# Why do I need to do this?  It stops the folder internal messages
# from showing up in my index, but I'm not sure where they come from
# in the first place..
folder-hook . "push \"l!(~s 'FOLDER INTERNAL DATA')\n*\""

# Colours

color quoted green default
color signature red default
color indicator brightyellow red
color error brightred default
color status yellow blue
color tree magenta default      # the thread tree in the index menu
color tilde magenta default
color message brightcyan default
color markers brightcyan default
color attachment brightmagenta default
color search default green      # how to hilite search patterns in the pager
color body magenta default "(ftp|http)://[^ )>]+" # point out URLs
color body magenta default [-a-z_0-9.]+@[-a-z_0-9.]+    # e-mail addresses
color underline brightgreen default

# Mail from people in my company (but not listed in the scores file)
# should appear with a red background. ;-)
color index default red '(~f @redhat\.com) | (~f @redhat\.de) | (~f @cygnus\.com)'

# Put high-scoring messages in bold
color index brightwhite default '~n 4-'

# Someone's talking about Red Hat!  Awooga!
color index brightred default '(!~f @redhat) ((~b "red ?hat") | (~b "rh ?[789]"))'

# I'm interested in messages containing the word 'parport' in the body,
# especially if they don't come from the linux-parport list (those are
# the hard ones to spot).  So colour them green.  I love mutt. ;-)
color index brightgreen default '!(~B owner-linux-parport) (~b parport) (~b ppdev)'

# Hmm, pine can do this better..
# I want different people's text to appear in different colours.  So
# the colour depends on the number of times it's been quoted..
color body blue default "^ *> *> *>.*" # quoted quoted quoted
color body red default "^ *> *>.*" # quoted quoted

# I put my scoring regexps in another file -- so people can't read them..
# That file just contains stuff like this:
# score '~p' 9 # messages to me rather than a list are important to me
# score '~f mypal@bestfriend\.net' 8
# score '~f' 6
# etc.
source $HOME/.mutt-scores

# How I like the index to look
set hdr_format="%4C %Z %{%d/%m} %-15.15F (%4c) %s"

# procmail spools mail into files in ~/in/.  I could type in all the
# names here, but instead I let mutt figure out what's in there.
mailboxes `ls -1 $HOME/in/* | env LC_ALL=C sort | xargs echo`

# I split out account-specific stuff into another file so that I can
# move my mutt preferences around without too much difficulty.
# Here's one of them:
# set hostname=""
# set use_domain
# set pgp_gpg=/usr/local/bin/gpg
# my_hdr From: Tim Waugh <>
source $HOME/.mutt-local

# Mail aliases
source ~/.mutt-aliases
set alias_file=~/.mutt-aliases

Valid HTML 3.2!