Chapter 8. Reference
Prev |  | Next

## Chapter 8. Reference

## 1. Command line options

Running `mutt` with no arguments will make Mutt attempt to read your spool mailbox. However, it is possible to read other mailboxes and to send messages from the command line as well.

Table 8.1. Command line options

Option | Description
--- | ---
-A | expand an alias
-a | attach a file to a message
-b | specify a blind carbon-copy (BCC) address
-c | specify a carbon-copy (Cc) address
-D | print the value of all mutt variables to stdout
-e | specify a config command to be run after initialization files are read
-f | specify a mailbox to load
-F | specify an alternate file to read initialization commands
-h | print help on command line options
-H | specify a draft file from which to read a header and body
-i | specify a file to include in a message composition
-m | specify a default mailbox type
-n | do not read the system Muttrc
-p | recall a postponed message
-Q | query a configuration variable
-R | open mailbox in read-only mode
-s | specify a subject (enclose in quotes if it contains spaces)
-v | show version number and compile-time definitions
-x | simulate the mailx(1) compose mode
-y | show a menu containing the files specified by the mailboxes command
-z | exit immediately if there are no messages in the mailbox
-Z | open the first folder with new message,exit immediately if none

To read messages in a mailbox

`mutt` [`-nz`] [`-F` `muttrc` ] [`-m` `type` ] [`-f` `mailbox` ]

To compose a new message

`mutt` [`-n`] [`-F` `muttrc` ] [`-a` `file` ] [`-c` `address` ] [`-i` `filename` ] [`-s` `subject` ] [ [ `file` ...] -- ] `address` [ `address` ...]

Mutt also supports a “batch” mode to send prepared messages. Simply redirect input from the file you wish to send. For example,

`mutt -s "data set for run #2" professor@bigschool.edu < ˜/run2.dat`

This command will send a message to “professor@bigschool.edu” with a subject of “data set for run #2”. In the body of the message will be the contents of the file “˜/run2.dat”.

All files passed with -a file will be attached as a MIME part to the message. To attach several files, use “--” to separate files and recipient addresses: `mutt -a *.png -- some@one.org`

## 2. Configuration Commands

The following are the commands understood by mutt.

- `account-hook` `pattern` `command`

- `alias` [ `-group` `name` ...] `key` `address` [ `address` ...]

- `unalias` [ `-group` `name` ...] { `*` | `key` ... }

- `alternates` [ `-group` `name` ...] `regexp` [ `regexp` ...]

- `unalternates` [ `-group` `name` ...] { `*` | `regexp` ... }

- `alternative-order` `mimetype` [ `mimetype` ...]

- `unalternative-order` { `*` | `mimetype` ... }

- `auto-view` `mimetype` [ `mimetype` ...]

- `unauto-view` { `*` | `mimetype` ... }

- `bind` `map` `key` `function`

- `charset-hook` `alias` `charset`

- `iconv-hook` `charset` `local-charset`

- `color` `object` `foreground` `background`

  `color` { `header` | `body` } `foreground` `background` `regexp`

  `color` `index` `foreground` `background` `pattern`

- `uncolor` `index` `pattern` ...

- `exec` `function` [ `function` ...]

- `fcc-hook` `[!]pattern` `mailbox`

- `fcc-save-hook` `[!]pattern` `mailbox`

- `folder-hook` `[!]regexp` `command`

- `group` [ `-group` `name` ...] { `-rx` `expr` ... | `-addr` `expr` ... }

- `ungroup` [ `-group` `name` ...] { `*` | `-rx` `expr` ... | `-addr` `expr` ... }

- `hdr_order` `header` [ `header` ...]

- `unhdr_order` { `*` | `header` ... }

- `ignore` `pattern` [ `pattern` ...]

- `unignore` { `*` | `pattern` ... }

- `lists` [ `-group` `name` ] `regexp` [ `regexp` ...]

- `unlists` [ `-group` `name` ...] { `*` | `regexp` ... }

- `macro` `menu` `key` `sequence` [ `description` ]

- `mailboxes` `mailbox` [ `mailbox` ...]

- `unmailboxes` { `*` | `mailbox` ... }

- `mbox-hook` `[!]pattern` `mailbox`

- `message-hook` `[!]pattern` `command`

- `mime-lookup` `mimetype` [ `mimetype` ...]

- `unmime-lookup` { `*` | `mimetype` ... }

- `mono` `object` `attribute`

  `mono` { `header` | `body` } `attribute` `regexp`

  `mono` `index` `attribute` `pattern`

- `unmono` `index` { `*` | `pattern` ... }

- `my_hdr` `string`

- `unmy_hdr` { `*` | `field` ... }

- `crypt-hook` `pattern` `keyid`

- `push` `string`

- `reset` `variable` [ `variable` ...]

- `save-hook` `[!]pattern` `mailbox`

- `score` `pattern` `value`

- `unscore` { `*` | `pattern` ... }

- `reply-hook` `[!]pattern` `command`

- `send-hook` `[!]pattern` `command`

- `send2-hook` `[!]pattern` `command`

- `set` { [ `no` | `inv` ] `variable` | `variable=value` } [...]

- `unset` `variable` [ `variable` ...]

- `source` `filename`

- `spam` `pattern` `format`

- `nospam` { `*` | `pattern` }

- `subscribe` [ `-group` `name` ...] `regexp` [ `regexp` ...]

- `unsubscribe` [ `-group` `name` ...] { `*` | `regexp` ... }

- `toggle` `variable` [ `variable` ...]

- `unhook` { `*` | `hook-type` }

## 3. Configuration variables

## 4. Functions

The following is the list of available functions listed by the mapping in which they are available. The default key setting is given, and an explanation of what the function does. The key bindings of these functions can be changed with the bind command.

Prev |  | Next
Chapter 7. Performance tuning | Home | Chapter 9. Miscellany