next up previous contents
Next: Setting Up Your Mail Up: Configuring Mutt Previous: Configuring Mutt   Contents

Basic Configuration

Mutt is a mail user agent (MUA), and makes no effort to provide native ability to download, upload, or compose messages, relinquishing responsibility for those tasks to programs better suited to the job. Neither does it deal with HTML mail, attachments, or help you click on a URL in the text to be taken to the relevant web page. Rather, mutt interfaces with lots of other programs that already perform these tasks admirably. This means to use mutt you have to configure several different programs, including sendmail or equivalent for uploading (sending), fetchmail for downloading (assuming you have a POP3 account rather than IMAP), the lynx text browser for viewing HTML messages, and urlview for dealing with URLs in mail. In general, you will need the following configuration files on your system:

.muttrc
Defines all settings for Mutt itself
.mailcap
Tells mutt which software to associate with different attachments
.fetchmailrc
For downloading mail from a POP3 server, if that's how you are connecting
a mail spool file
probably /var/mail/spool/$USERNAME
an alias file
of your choosing, such as .mutt-alias. This is your address book

The spool file is where mutt expects to find mail that's been downloaded from your ISP (i.e. your inbox). You'll also want to choose and configure your favorite text editor. Unix and Linux systems come with several text editors already installed, so it's just a matter of your choosing which one you like. Mutt also requires an address book called an alias file, and will help you develop one as you go through your mail, if you like. More on each of these things below.

Your .muttrc file is a configuration file that should be stored in your home directory. If you don't have one in your home directory mutt will utilize the system-wide configuration file at /etc/Muttrc (note the capital M). You can copy that file to your home directory, calling it .muttrc (note the period; it's a dot-file). This is the file you will modify to set up mutt to your liking. Alternatively, you can start a new .muttrc file using the text editor of your choice using the code in this document as a base.

The .muttrc file contains code that determines mutt's keybindings (which keys perform which function), code that determines what mutt looks like, including colors, and code that determines how mutt behaves. First of all, the hash mark (#) is interpreted as a comment sign, so any text after a hash mark is ignored when mutt processes its files. If you want to try a test .muttrc you can name it something different and start mutt from the command line with mutt -F TESTFILE to use it in place of your .muttrc. However, you can also test out commands one by one once mutt is running, by pressing the colon sign and entering the command. You wouldn't want to do that for large sets of commands, obviously, but if you simply want to try something both ways, you can do so in this way. Still another way is to get mutt started, then make edits to your .muttrc file, and have mutt reload the configuration file by entering :source .muttrc. This is my favorite way of testing configurations as I go.


next up previous contents
Next: Setting Up Your Mail Up: Configuring Mutt Previous: Configuring Mutt   Contents
Randall Wood 2009-12-02