The mutt package is in my opinion the best Unix mail utility around. It is text-based, not GUI, but its features are outstanding.

Following is a quick introduction to mutt.


As many other mail utilities, when you first enter mutt you will be at the main message list. Here is a sample screen:

q:Quit  d:Del  u:Undel  s:Save  m:Mail  r:Reply  g:Group  ?:Help
 463     Aug 29 Gene Nelson     ( 489) Suggestions from Richard F. Tax for group
 464     Aug 29 Marjorie Chan   (  73) Reporting back on scripted Cantonese text
 465     Aug 29 Marjorie Chan   (   4) Oops - should be 1986-1988 (not 1996-1998
 466     Aug 30 Linda Kilcrease (  60) article on Calif. high tech firm opening
 467     Sep 01 Norm Matloff    (  86) Re: Cantonese Translations
 468 r   Sep 03 fulton@cs.ucdav (  23) Jason Jue -- ECS154 in FQ
 469     Sep 08 hays@cs.ucdavis (  17) PCR
 470   F Sep 09 To matloff      ( 142) Fwd: 
 471 r   Sep 09 Vandiver, Sue   (  58) Re: e-mail list
 472     Sep 09 root            ( 113)
 473     Sep 09 root            ( 110)
 474     Sep 12 Tianwei Xie     (  25) Re: new address for KX Web site
 475 r   Sep 12 Tianwei Xie     (  23) Re: new address for KX Web site
 476     Sep 12 valdez@cs.ucdav (   7) adv hrs
 477 O   Sep 13 root            (  68)
 478     Sep 14 Robert Rivers   (  58) Fwd: HELP Wanted: Desparately Speaking
 479     Sep 14 Richard F Tax   (  18) Re: Fwd: HELP Wanted: Desperately Speakin
 480     Sep 15 Gene Nelson     (  47) An employer - created glut to insure age
 481     Sep 15 Gene Nelson     ( 212) Response to "Myth" from UCEA
 482 r   Sep 15 Joel Chen       (   5) Re:  no "endian" problem
 483 r   Sep 15 Robert Rivers   (  14) Re: Computerworld 
---Mutt: /var/mail/matloff [570 msgs, 3 new, 2M]---(mailbox-order)--------------
Note the access-history information shown to the right of the message numbers, such as the r in
 482 r   Sep 15 Joel Chen       (   5) Re:  no "endian" problem
That means that we have already replied to this message---a real help if we forget whether we have done so or not! The letter N means a new message, O one which is not new but which we have not read yet, D means the message is deleted, d means the attachment is deleted but not the message itself, * means the message is tagged (see below), and so on.

If you save a message, mutt will prompt you for the name of the file you wish to save or append to. It does allow you to use file-completion (use the TAB key), a la emacs and tcsh, so you can save typing. Note: If we save a message, it is automatically marked as deleted, though you can use the u key to undelete.

Here are some of the keystrokes which can be used in a headlines screen:

   down arrow or j              move down within the (undeleted) headlines list
                                (use J if you want to get to a deleted message)
   up arrow or k                move up within the (undeleted) headlines list
                                (use K if you want to get to a deleted message)
                        move to message  
   ?                            help
   space bar                    read the message currently pointed
                                to by the cursor
   d                            delete the message currently pointed
                                to by the cursor
   u                            undelete the message currently pointed
                                to by the cursor
   s                            save the message currently pointed
                                to by the cursor
   r                            reply to the message currently pointed
                                to by the cursor (reply to sender only)
   g                            reply to the message currently pointed
                                to by the cursor (reply to entire group)
   f                            forward the message currently pointed
                                to by the cursor to someone else
   t                            tag the message currently pointed
                                to by the cursor 
   m                            compose a message to mail (either a new
                                or a previously-unfinished one)
   z                            next page of message headlines
   Z                            previous page of message headlines
   /                            search for regexp (see below)
   x                            exit mutt without deleting "deleted" messages
   q                            exit mutt and delete "deleted" messages
   *                            move to last message of the entire list


In the search command, you have various choices concerning WHAT is to be searched. For example

/ xyz

will search for "xyz" in the message headlines, while

/ ~b xyz
will search for that string in the message bodies, and
/ ~h xyz 
will search in the headers. You can also do AND, OR and NOT searches. AND is done via juxtaposition, so that for example
/ ~b xyz ~b uvw
will search for a message which has both xyz and uvw in its body. The `|' character is used for OR, `!' is used for NOT, and parenthesized grouping is allowed. See the manual for details and options.


When you select a message to read, you view the message one screen at a time, using mutt's pager (like the Unix "more" command). Here are some commands available;

   space bar                    go to the next page of this message
   -                            go to the previous page of this message
   q                            quit this message and go back to the
                                headlines list
   d                            delete the message currently pointed
                                to by the cursor
   s                            save the message currently pointed
                                to by the cursor
   r                            reply to the message currently pointed
                                to by the cursor (reply to sender only)
   g                            reply to the message currently pointed
                                to by the cursor (reply to entire group)
   f                            forward the message currently pointed
                                to by the cursor to someone else
Note that many of the same commands for the headlines page apply here too.


Assuming that you have a line

   set autoedit
in your ~/.muttrc file (see below), mutt will automatically put you in the text editor when you wish to send a message or reply to one. In the latter case, the original message will be placed in your editing buffer with `>' marks at the start of each line, making it convenient to show which of the sender's original statements you are replying to.

You can specify the editor you wish to use with a line in your ~/.muttrc file, such as

   set editor="/usr/home/matloff/Machines/Editors/VIM/VIM"
If you do not set this, mutt will take the system vi as the default editor. (If try to send or reply but mutt enters the editor but immediately exits, that means mutt can't find the editor. Check ~/.muttrc and the VISUAL environment variable.)

When you finish editing and are ready to send, simply leave your editor as usual, e.g. for vi by typing `ZZ'. You then will be in the mutt send-message screen, e.g.

 Subject: Re: schedule

===== Attachments =====
- 1  /tmp/mutt-heather-7245-1 [text/plain, 7bit, 1K] 

-- Mutt: Compose                                                       -- 1/1 --

This is the last step before sending off the message. Do you wish to go ahead now? You have several keystroke choices:
   y                            yes, go ahead and sent it
   q                            no, don't send it; you will then be
                                asked whether you wish to postpone
                                for later
   E                            do some more editing of the message
                                (including the header)
   t                            add to or change the "To:" list
   c                            add to or change the "Cc:" list (copies
                                to third parties)
   b                            add to or change the "Bcc:" list (secret
                                copies to third parties)
   s                            add to or change the "Subject:" list
The E feature is especially valuable. It gives you one more chance to make sure you are sending to everyone you want (and not sending to those you don't want), and to refine the message if needed.

The postponement feature is even more valuable. Say for example that you are composing a message but are only halfway done when you run out of time. The postponement feature allows you to very conveniently save what you have written before, and then resume writing it later. Or, maybe while composing one message you suddenly realize you need some information in another message which you have already received; the postponement feature allows you to leave your unfinished work, go look at the other message, and then return to writing the unfinished message.

To resume writing a postponed message, hit the m key while in the headlines list. You will then be presented with a list of unfinished messages, which you can traverse just like the headlines list. By the way, the unfinished messages are stored in ~/postponed.


This is another nice feature of mutt.

For example, suppose you are involved in a long e-mail discussion with several people, and currently have seven or eight messages from that discussion, all of which you wish to reply to. Instead of replying individually to each message, you can tag them all and then reply to all of them at once.

To perform an action on all of your tagged messages, type

For instance, if you want to do a group reply (i.e. send to all people on the list) to all of the seven or eight messages in the example above), type
To save all of your tagged messages to a certain file, type
To delete all of your tagged messages, type
Tagged messages are marked with `*' in the headlines list. If you accidentally tag a message by hitting the t key, just hit the t key again to untag it.

When you are in the headlines list, hitting the l key will result in mutt asking you to supply a pattern. Mutt will then list only those messages matching the pattern. If for example you input "John", it will only list messages with "John" in their headers (From: and Subject:). The other messages are still there, but this command allows you to concentrate on these.

Also, if you are in the main menu, listing your messages, hitting the e key allows you to edit that message. Your text editor will be invoked, and then you make the changes you want. After doing a save operation in the editor, the edited version of the message will appear in your messages list, with the same timestamp, right after the old one (assuming you have mutt display messages in chronological order). You can then delete the old one.


MIME messages are non-text, such as graphical files, HTML and so on, which are included as attachments to the given e-mail message.

You can add an attachment to a message you send out with mutt by simply using the `a' command; you will be prompted for a file name. The attachment will be sent in 8-bit form, so you don't have to worry about non-text files being corrupted.

If you receive a MIME message, mutt allows you to specify a program to read it. If for instance I receive a message which is an HTML file, I have a line in my ~/.mailcap file,

text/html; lynx -force_html %s; needsterminal;

You can view attachments using the `v' command, which will display a menu of the attachments for that message. Move the cursor to the item you want (using the arrow keys or j/k), and then hit return. At that point the program you have specified to view the attachment will be invoked, such as lynx above.

If you use `s' to save an attached file, the e-mail header will not be included in the save file; only the attachment itself will be saved, an exact copy of the original file from which the attachment was made.

If after using `v' to view the attachment list for a message you type `d' to delete an attachment, the rest of the message will still be intact.

Mutt automatically decodes base64 messages; note, though, that the decoded message may still be unreadable, if for example it turns out to be a Microsoft Word file. You may wish to download the free wv Word conversion package, and have mutt automatically invoke wv on Word files.


You should create a file named .muttrc in your home directory, and have at least the following lines in it:

   set sort=mailbox-order
   set delete
I also recommend that you have a line like
   source ~/.mail_aliases
with the latter file containing mail aliases for people you frequently send e-mail to. If for example you wish to save typing when sending to me, you could have a line
   alias nm
and from then on simply send your mail to "nm".

If you wish to not have your read messages moved from your original mail file to your home mbox file, then include this:

set move=no

If you are having trouble with the From: line that mutt produces in your outgoing messages (I originally was getting two "at" signs, making it difficult for my recipients to reply to me), you can customize it in your startup file, e.g.

my_hdr From: Norm Matloff <>

Mutt can be configured so that different features are in different colors. See the documentation for details.


See the Mutt home page.