muttrc is the primary configuration file for mutt. This is an example of a .mutt/muttrc file that has been tested on SLUUG systems.
#*******************************************************************************
# *
# muttrc is the primary configuration file for mutt. *
# *
# *******************************************************************************
#*******************************************************************************
# If the system has bad defaults, get rid of them.
#*******************************************************************************
#reset all # reset all variables to compiled defaults.
#unhook * # remove all hooks
#*******************************************************************************
# Locations
#*******************************************************************************
source ~/.mutt/mail_aliases
set alias_file=~/.mutt/mail_aliases
set certificate_file=~/.mutt/mutt_certificates
set mailcap_path=~/.mutt/mailcap
set folder=~/mail
#set header_cache=~/.mutt/header_cache # Directory of database for each folder
set mbox=+mbox
set postponed=+postponed
set record=+sentmail.log
mailboxes +high_spam +caught_spam
#*******************************************************************************
# Identity
#*******************************************************************************
#set alternates="^$USER@([[:alpha:]]+\.)?sluug.org$" # Before 1.5.6
alternates "^$USER@([[:alpha:]]+\.)?sluug.org$" # 1.5.6 and after
set use_from=yes # Generate From: header when sending messages.
set from=$USER@mail.sluug.org
set hostname=mail.sluug.org
#*******************************************************************************
# Reading
#*******************************************************************************
set keep_flagged=yes
set move=no # Don't move read messages to $mbox mailbox
#set delete=yes
set index_format ="%2C %Z %[%m/%d %H%M] %-20.20a%5c %s"
set folder_format="%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %f"
set sort=mailbox-order # Sort messages in the index by: unsorted
set wrap_search=no
set pager_stop=yes # Don't jump to next message from bottom of current
set menu_scroll=yes # Scroll menus one line when you hit screen boundary
set auto_tag=yes # Apply functions to all tagged messages in the index
set reverse_alias=yes # In index, display name from aliases if available
set confirmappend=no # Don't prompt when appending to an existing mailbox
#*******************************************************************************
# Headers when reading a message
#*******************************************************************************
ignore * # Don't display any header unless unignored.
#unignore from date subject to cc X-SLUUG-MailScanner-SpamCheck
unignore "From " X-SLUUG-MailScanner-SpamCheck: Date: Sender: Reply-To: From: To: Cc: Subject:
hdr_order "From " X-SLUUG-MailScanner-SpamCheck: Date: Sender: Reply-To: From: To: Cc: Subject:
#*******************************************************************************
# Sending
#*******************************************************************************
set envelope_from=yes
set reverse_name=yes # From: on reply matches machine it was received on
set sort_alias=unsorted # In the order received
my_hdr Bcc: $USER # Add blind CC to self by default
set attribution="On %[%b %d, %Y at %H:%M:%S], %n wrote:\n" # Default: "On %d, %n wrote:"
set forward_format="FW: %s"
# Can't change the "Forwarded message from" heading, it is hardcoded in send.c.
set indent_string=">" # Default: "> "
set include=yes # Always quote original message when replying
#*******************************************************************************
# Hooks
#*******************************************************************************
# For saving mail
save-hook '~e ^sysadmin-bounces@' +bbs # Mailing list to special mailbox
save-hook '~e ^steercom-bounces@' +sluug # Mailing list to special mailbox
# For sorting based on inbox
folder-hook . set sort=mailbox-order # Unsorted
folder-hook Maildir set sort=date-received # Random order otherwise
#*******************************************************************************
# MIME
#*******************************************************************************
#alternative_order text/html text/plain text
#*******************************************************************************
# Misc
#*******************************************************************************
set history=50 # For command recall
set quit=ask-yes # Only during testing?
#set wait_key=no # Don't ask to press a key after external commands
#*******************************************************************************
# Color of all screens
#*******************************************************************************
# Usage: color object foreground background [ regexp ]
# Usage: color index foreground background pattern
# Usage: uncolor index pattern [ pattern ... ]
# Foreground and background can be one of the following:
# white black green magenta blue cyan yellow red default colorx
# Foreground can be prefixed with "bright" to make the color boldfaced.
color header cyan black .
color header green black ^X-SLUUG-MailScanner-SpamCheck:
color header brightgreen black ^From
color header brightred black ^Subject:
color header yellow black ^Date:
color hdrdefault black magenta
color body black white .
color body blue white "((ftp|http|https)://|(file|news):|www\\.)[-a-z0-9_.:]*[a-z0-9](/[^][{} \t\n\r\"<>()]*[^][{} \t\n\r\"<>().,:!])?/?"
color search black yellow
color error white red
color status white blue
color message yellow blue
uncolor index * # Clear all color index entries
color index blue white .* # Color unless overridden
color index magenta white ~D # Color for deleted messages
color index red yellow ~N # Color for new messages
color index magenta yellow ~O # Color for unopened messages
color index brightwhite blue ~T # Color for tagged messages
color indicator brightdefault green # Selected item in a menu
# The default indicator is reverse video, but since it is set in the
# Debian /etc/Muttrc, there is no way to unset it back to reverse video.
# So either use -n to skip /etc/Muttrc or change to something better looking.
mono error standout
mono status reverse
mono message none
mono hdrdefault bold
#*******************************************************************************
# Usage: bind map key function
# key is the key (or key sequence) you wish to bind. To specify a control
# character, use the sequence \Cx, where x is the letter of the control
# character (for example, to specify control-A use ``\Ca''). Note that the
# case of x as well as \C is ignored, so that \CA, \Ca, \cA and \ca are all
# equivalent. An alternative form is to specify the key as a three digit
# octal number prefixed with a ``\'' (for example \177 is equivalent to \c?).
# Can bind multiple keys to a function by using multiple bind commands.
#*******************************************************************************
## ========================
## Generic bindings for most menus if not overridden
## ========================
bind generic \Cu half-up
bind generic \Cd half-down
bind generic b previous-page
bind generic \Cb previous-page
bind generic <F7> previous-page # Like ISPF
bind generic \Cf next-page
bind generic <F8> next-page # Like ISPF
bind generic 1G first-entry
bind generic 1g first-entry
bind generic <Home> first-entry
bind generic \Ca first-entry
bind generic G last-entry
bind generic <End> last-entry
bind generic \Ce last-entry
## ========================
## Bindings for attach menu
## ========================
bind attach ' ' select-entry
bind attach \Cg exit
## ========================
## Bindings for editor
## ========================
# Make some the same as lynx
bind editor \Cb kill-word # delete the word in front of the cursor
bind editor \Cf kill-eow # delete the cursor to the end of the word
bind editor \Cp backward-word # move the cursor to the beginning of the word
bind editor \Cn forward-word # move the cursor to the end of the word
bind editor \Cx delete-char # delete the char under the cursor
bind editor <delete> delete-char # delete the char under the cursor
#bind editor \C? backspace
## ======================
## Bindings for index
## ======================
# index bindings - vi (editor) style
bind index G last-entry
bind index \Ce last-entry
bind index j next-entry
bind index k previous-entry
bind index \Cd half-down
bind index \Cn half-down
bind index ) half-down
bind index \Cu half-up
bind index \Cp half-up
bind index ( half-up
bind index \Cf next-page # \Cf was 'f'orget-passphrase
bind index pagedown next-page
bind index pageup previous-page
bind index \Cb previous-page
bind index b previous-page
bind index <Right> display-message
#bind index <Left> buffy-list # list mailboxes with new mail
bind index <Left> parent-message # jump to parent message in thread
bind index L current-bottom # overrides 'L'ist-reply
bind index \eD delete-thread # ^U and ^D were changed, so redefine
bind index \eU undelete-thread # ^U and ^D were changed, so redefine
## ===========================
## Bindings for pager
## ===========================
# pager bindings - vi style bindings plus lynx
bind pager \Cm next-line
bind pager \Ce next-line
bind pager + next-line
bind pager j next-line
bind pager 8 next-line
bind pager <Down> next-line
bind pager \Cy previous-line
bind pager k previous-line
bind pager 2 previous-line
bind pager - previous-line
bind pager backspace previous-line
bind pager <Up> previous-line
bind pager \Cd half-down
bind pager \Cn half-down
bind pager ) half-down
bind pager \Cu half-up
bind pager \Cp half-up
bind pager ( half-up
bind pager ' ' next-page
bind pager \Cf next-page
bind pager \Cn next-page
bind pager f next-page
bind pager 3 next-page
bind pager <F8> next-page # Like ISPF
bind pager - previous-page
bind pager \Cb previous-page # was "browse-url"
bind pager b previous-page
bind pager 9 previous-page
bind pager <F7> previous-page # Like ISPF
bind pager \Ca top
bind pager <Home> top
bind pager 1G top
bind pager 1g top
bind pager t top
bind pager 7 top
bind pager \Ce bottom
bind pager <End> bottom
bind pager G bottom
#bind pager 1 bottom # Can't use if also using "1G"
bind pager <Insert> previous-undeleted
bind pager <Delete> next-undeleted
bind pager \eD delete-thread # ^U and ^D were changed, so redefine
bind pager \eU undelete-thread # ^U and ^D were changed, so redefine
bind pager / search # search for a regular expression
bind pager N search-opposite # search for next match in opposite direction
bind pager L list-reply
bind pager B bounce-message
bind pager q exit
bind pager 4 noop # To prevent typo from invoking jump prompt
bind pager 5 noop # To prevent typo from invoking jump prompt
bind pager 6 noop # To prevent typo from invoking jump prompt
bind pager 0 noop # To prevent typo from invoking jump prompt
## ===========================
## Misc
## ===========================
# Show documentation when pressing F1
# Might be needed because of location changes, or using HTML instead of text.
#macro generic,pager <f1> "!lynx file:///usr/share/doc/mutt-1.4i/html/manual.html\n" "Show Mutt documentation"
bind generic,pager <f13> help
bind generic <F3> exit # Like ISPF
bind index <F3> quit # Like ISPF
bind pager <F3> exit # Like ISPF
# Mimic a trash can
macro index d "s=deleted<enter>"
macro pager d "s=deleted<enter>"