Previous Next Table of Contents

2. Getting Started

This section is intended as a brief overview of how to use Mutt. There are many other features which are described elsewhere in the manual. There is even more information available in the Mutt FAQ and various web pages. See the Mutt Page for more details.

The keybindings described in this section are the defaults as distributed. Your local system administrator may have altered the defaults for your site. You can always type ``?'' in any menu to display the current bindings.

The first thing you need to do is invoke mutt, simply by typing mutt at the command line. There are various command-line options, see either the mutt man page or the reference.

2.1 Moving Around in Menus

Information is presented in menus, very similar to ELM. Here is a table showing the common keys used to navigate menus in Mutt.

j or Down       next-entry      move to the next entry
k or Up         previous-entry  move to the previous entry
z or PageDn     page-down       go to the next page
Z or PageUp     page-up         go to the previous page
= or Home       first-entry     jump to the first entry
* or End        last-entry      jump to the last entry
q               quit            exit the current menu
?               help            list all keybindings for the current menu

2.2 Editing Input Fields

Mutt has a builtin line editor which is used as the primary way to input textual data such as email addresses or filenames. The keys used to move around while editing are very similar to those of Emacs.

^A or <Home>    bol             move to the start of the line
^B or <Left>    backward-char   move back one char
^D or <Delete>  delete-char     delete the char under the cursor
^E or <End>     eol             move to the end of the line
^F or <Right>   forward-char    move forward one char
^K              kill-eol        delete to the end of the line
^U              kill-line       delete entire line
^W              kill-word       kill the word in front of the cursor
<Up>            history-up      recall previous string from history
<Down>          history-down    recall next string from history
<BackSpace>     backspace       kill the char in front of the cursor
^G              n/a             abort
<Tab>           n/a             complete filename (only when prompting for a file)
<Return>        n/a             finish editing

You can remap the editor functions using the bind command. For example, to make the Delete key delete the character in front of the cursor rather than under, you could use

bind editor delete backspace

2.3 Reading Mail - The Index and Pager

Similar to many other mail clients, there are two modes in which mail is read in Mutt. The first is the index of messages in the mailbox, which is called the ``index'' in Mutt. The second mode is the display of the message contents. This is called the ``pager.''

The next few sections describe the functions provided in each of these modes.

The Message Index

c               change to a different mailbox
ESC c           change to a folder in read-only mode
C               copy the current message to another mailbox
ESC C           decode a message and copy it to a folder
ESC s           decode a message and save it to a folder
D               delete messages matching a pattern
d               delete the current message
F               mark as important
l               show messages matching a pattern
N               mark message as new
o               change the current sort method
O               reverse sort the mailbox
q               save changes and exit
s               save-message
t               toggle the tag on a message
ESC t           toggle tag on entire message thread
u               undelete-message
v               view-attachments
x               abort changes and exit
<Return>        display-message
<Tab>           jump to the next new message
@               show the author's full e-mail address
$               save changes to mailbox
/               search
ESC /           search-reverse
^L              clear and redraw the screen
^T              tag messages matching a pattern
^U              undelete messages matching a pattern

Status Flags

In addition to who sent the message and the subject, a short summary of the disposition of each message is printed beside the message number. Zero or more of the following ``flags'' may appear, which mean:

D       message is deleted
K       contains a PGP public key
M       requires mailcap to view
N       message is new
O       message is old
P       message is PGP encrypted
r       message has been replied to
S       message is PGP signed
!       message is flagged
*       message is tagged

Some of the status flags can be turned on or off using

Furthermore, the following flags reflect who the message is addressed to. They can be customized with the $to_chars variable.

+       message is to you and you only
T       message is to you, but also to or cc'ed to others
C       message is cc'ed to you
F       message is from you

The Pager

By default, Mutt uses its builtin pager to display the body of messages. The pager is very similar to the Unix program less though not nearly as featureful.

<Return>        go down one line
<Space>         display the next page (or next message if at the end of a message)
-               go back to the previous page
n               display the next message
?               show keybindings
/               search for a regular expression (pattern)
\               toggle search pattern coloring

In addition, many of the functions from the index are available in the pager, such as delete-message or copy-message (this is one advantage over using an external pager to view messages).

Also, the internal pager supports a couple other advanced features. For one, it will accept and translate the ``standard'' nroff sequences for bold and underline. These sequences are a series of either the letter, backspace (ˆH), the letter again for bold or the letter, backspace, ``_'' for denoting underline. Mutt will attempt to display these in bold and underline respectively if your terminal supports them. If not, you can use the bold and underline color objects to specify a color or mono attribute for them.

Additionally, the internal pager supports the ANSI escape sequences for character attributes. Mutt translates them into the correct color and character settings. The sequences Mutt supports are:

ESC [ Ps;Ps;Ps;...;Ps m
where Ps =
0    All Attributes Off
1    Bold on
4    Underline on
5    Blink on
7    Reverse video on
3x   Foreground color is x
4x   Background color is x

Colors are
0    black
1    red
2    green
3    yellow
4    blue
5    magenta
6    cyan
7    white

Mutt uses these attributes for handling text/enriched messages, and they can also be used by an external autoview script for highlighting purposes. Note: If you change the colors for your display, for example by changing the color associated with color2 for your xterm, then that color will be used instead of green.

Threaded Mode

When the mailbox is sorted by threads, there are a few additional functions available in the index and pager modes.

^D      delete-thread           delete all messages in the current thread
^U      undelete-thread         undelete all messages in the current thread
^N      next-thread             jump to the start of the next thread
^P      previous-thread         jump to the start of the previous thread
^R      read-thread             mark the current thread as read
ESC d   delete-subthread        delete all messages in the current subthread
ESC u   undelete-subthread      undelete all messages in the current subthread
ESC n   next-subthread          jump to the start of the next subthread
ESC p   previous-subthread      jump to the start of the previous subthread
ESC r   read-subthread          mark the current subthread as read
ESC t   tag-thread              toggle the tag on the current thread

See also: $strict_threads.

Miscellaneous Functions

create-alias (default: a)

Creates a new alias based upon the current message (or prompts for a new one). Once editing is complete, an alias command is added to the file specified by the $alias_file variable for future use. Note: Specifying an $alias_file does not add the aliases specified there-in, you must also source the file.

display-headers (default: h)

Toggles the weeding of message header fields specified by ignore commands.

enter-command (default: ``:'')

This command is used to execute any command you would normally put in a configuration file. A common use is to check the settings of variables, or in conjunction with macros to change settings on the fly.

extract-keys (default: ESC k)

This command extracts PGP public keys from the current or tagged message(s) and adds them to your $pgp_v2_pubring or $pgp_v5_pubring depending on $pgp_key_version.

forget-passphrase (default: ˆF)

This command wipes the PGP passphrase from memory. It is useful, if you misspelled the passphrase.

list-reply (default: L)

Reply to the current or tagged message(s) by extracting any addresses which match the addresses given by the lists command. Using this when replying to messages posted to mailing lists help avoid duplicate copies being sent to the author of the message you are replying to.

pipe-message (default: |)

Asks for an external Unix command and pipes the current or tagged message(s) to it. The variables $pipe_decode, $pipe_split, $pipe_sep and $wait_key control the exact behaviour of this function.

shell-escape (default: !)

Asks for an external Unix command and executes it. The $wait_key can be used to control whether Mutt will wait for a key to be pressed when the command returns (presumably to let the user read the output of the command), based on the return status of the named command.

toggle-quoted (default: T)

The pager uses the $quote_regexp variable to detect quoted text when displaying the body of the message. This function toggles the display of the quoted material in the message. It is particularly useful when are interested in just the response and there is a large amount of quoted text in the way.

skip-quoted (default: S)

This function will go to the next line of non-quoted text which come after a line of quoted text in the internal pager.

2.4 Sending Mail

The following bindings are available in the index for sending messages.

m       compose         compose a new message
r       reply           reply to sender
g       group-reply     reply to all recipients
L       list-reply      reply to mailing list address
f       forward         forward message
b       bounce          bounce (remail) message
ESC k   mail-key        mail a PGP public key to someone

Bouncing a message sends the message as is to the recipient you specify. Forwarding a message allows you to add comments or modify the message you are forwarding. Bouncing a message uses the sendmail command to send a copy of a message to recipients as if they were original recipients of the message. See also $mime_forward.

Mutt will then enter the compose menu and prompt you for the recipients to place on the ``To:'' header field. Next, it will ask you for the ``Subject:'' field for the message, providing a default if you are replying to or forwarding a message. See also $askcc, $askbcc, $autoedit, and $fast_reply for changing how Mutt asks these questions.

Mutt will then automatically start your $editor on the message body. If the $edit_headers variable is set, the headers will be at the top of the message in your editor. Any messages you are replying to will be added in sort order to the message, with appropriate $attribution, $indent_string and $post_indent_string. When forwarding a message, if the $mime_forward variable is unset, a copy of the forwarded message will be included. If you have specified a $signature, it will be appended to the message.

Once you have finished editing the body of your mail message, you are returned to the compose menu. The following options are available:

a       attach-file             attach a file
ESC k   attach-key              attach a PGP public key
d       edit-description        edit description on attachment
D       detach-file             detach a file
T       edit-to                 edit the To field
c       edit-cc                 edit the Cc field
b       edit-bcc                edit the Bcc field
y       send-message            send the message
s       edit-subject            edit the Subject
f       edit-fcc                specify an ``Fcc'' mailbox
p       pgp-menu                select PGP options (``i'' version only)
P       postpone-message        postpone this message until later
q       quit                    quit (abort) sending the message
i       ispell                  check spelling (if available on your system)
^F      forget-passphrase       whipe PGP passphrase from memory

Editing the message header

When editing the header of your outgoing message, there are a couple of special features available.

If you specify
Fcc: filename
Mutt will pick up filename just as if you had used the edit-fcc function in the compose menu.

You can also attach files to your message by specifying
Attach: filename [ description ]
where filename is the file to attach and description is an optional string to use as the description of the attached file.

When replying to messages, if you remove the In-Reply-To: field from the header field, Mutt will not generate a References: field, which allows you to create a new message thread.

If you want to use PGP, you can specify

Pgp: [ E | S | S<id> ]

``E'' encrypts, ``S'' signs and ``S<id>'' signs with the given key, setting $pgp_sign_as permanently.

Also see edit_headers.

2.5 Postponing Mail

At times it is desirable to delay sending a message that you have already begun to compose. When the postpone-message function is used in the compose menu, the body of your message and attachments are stored in the mailbox specified by the $postponed variable. This means that you can recall the message even if you exit Mutt and then restart it at a later time.

Once a message is postponed, there are several ways to resume it. From the command line you can use the ``-p'' option, or if you compose a new message from the index or pager you will be prompted if postponed messages exist. If multiple messages are currently postponed, the postponed menu will pop up and you can select which message you would like to resume.

Note: If you postpone a reply to a message, the reply setting of the message is only updated when you actually finish the message and send it. Also, you must be in the same folder with the message you replied to for the status of the message to be updated.

See also the $postpone quad-option.

Previous Next Table of Contents