<literal>list-name</literal><emphasis>-request</emphasis><literal>@mutt.org</literal>.
</para>
-<para>
-
<itemizedlist>
<listitem>
</itemizedlist>
-</para>
-
<para>
<emphasis role="bold">Note:</emphasis> all messages posted to
<emphasis>mutt-announce</emphasis> are automatically forwarded to
<para>
Examples are presented as:
+</para>
<screen>
mutt -v
</screen>
-</para>
<para>
Within command synopsis, curly brackets (<quote>{}</quote>) denote a set
<xref linkend="tab-keys-nav"/>.
</para>
-<para>
-
<table id="tab-keys-nav">
<title>Most common navigation keys</title>
<tgroup cols="3">
</tgroup>
</table>
-</para>
-
</sect1>
<sect1 id="editing">
short descriptions.
</para>
-<para>
<table id="tab-keys-editor">
<title>Most common line editor keys</title>
<tgroup cols="3">
</tbody>
</tgroup>
</table>
-</para>
<para>
You can remap the <emphasis>editor</emphasis> functions using the
following categories:
</para>
-<para>
<itemizedlist>
<listitem><para>muttrc commands</para></listitem>
<listitem><para>addresses and aliases</para></listitem>
<listitem><para>patterns</para></listitem>
<listitem><para>everything else</para></listitem>
</itemizedlist>
-</para>
<para>
Mutt automatically filters out repeated items from the history. It
<link linkend="index-format">$index_format</link> variable.
</para>
-<para>
<table id="tab-key-index">
<title>Most common message index keys</title>
<tgroup cols="2">
</tgroup>
</table>
-</para>
-
<para>
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.
featureful.
</para>
-<para>
<table id="tab-key-pager">
<title>Most common pager keys</title>
<tgroup cols="2">
</tbody>
</tgroup>
</table>
-</para>
<para>
In addition to key bindings in <xref linkend="tab-key-pager"/>,
character settings. The sequences Mutt supports are:
</para>
-<para>
<screen>
\e[<emphasis>Ps</emphasis>;<emphasis>Ps</emphasis>;..<emphasis>Ps</emphasis>;m
</screen>
-</para>
<para>
where <emphasis>Ps</emphasis> can be one of the codes shown in
as shown in <xref linkend="tab-key-threads"/>.
</para>
-<para>
-
<table id="tab-key-threads">
<title>Most common thread mode keys</title>
<tgroup cols="3">
</tgroup>
</table>
-</para>
-
<para>
<emphasis role="bold">Note:</emphasis> Collapsing a thread displays only the first message
in the thread and hides the others. This is useful when threads
<emphasis>index</emphasis> and <emphasis>pager</emphasis> to start a new message.
</para>
-<para>
-
<table id="tab-key-send">
<title>Most common mail sending keys</title>
<tgroup cols="3">
</tgroup>
</table>
-</para>
-
<para>
<emphasis>Bouncing</emphasis> a message sends the message as-is to the recipient you
specify. <emphasis>Forwarding</emphasis> a message allows you to add comments or
message.
</para>
-<para>
-
<table id="tab-func-compose">
<title>Most common compose menu keys</title>
<tgroup cols="3">
</tgroup>
</table>
-</para>
-
<para>
The compose menu is also used to edit the attachments for a message which can be either files
or other messages. The <literal><attach-message></literal> function to will prompt you for a folder to
<para>
The flags sequence (%f) will expand to one of the flags in
<xref linkend="tab-pgp-menuflags"/>.
+</para>
<table id="tab-pgp-menuflags">
<title>PGP key menu flags</title>
</tgroup>
</table>
-</para>
-
<para>
The capabilities field (%c) expands to a two-character sequence
representing a key's capabilities. The first character gives
<para>
An initialization file consists of a series of <link linkend="commands">commands</link>. Each line of the file may contain one or more commands.
-When multiple commands are used, they must be separated by a semicolon (;).
+When multiple commands are used, they must be separated by a semicolon
+(;).
+</para>
<example id="ex-rc-multiple-cmds">
<title>Multiple configuration commands per line</title>
</screen>
</example>
+<para>
The hash mark, or pound sign
(<quote>#</quote>), is used as a <quote>comment</quote> character. You can use it to
annotate your initialization file. All text after the comment character
to the end of the line is ignored. For example,
</para>
-<para>
-
<example id="ex-ec-comment">
<title>Commenting configuration files</title>
<screen>
</screen>
</example>
-</para>
-
<para>
Single quotes (') and double quotes (") can be used to quote strings
which contain spaces or other special characters. The difference between
For example, if want to put quotes <quote>"</quote> inside of a string, you can use
<quote>\</quote> to force the next character to be a literal instead of interpreted
character.
+</para>
<example id="ex-rc-quote">
<title>Escaping quotes in congfiguration files</title>
</screen>
</example>
-</para>
-
<para>
<quote>\\</quote> means to insert a literal <quote>\</quote> into the line.
<quote>\n</quote> and <quote>\r</quote> have their usual C meanings of linefeed and
It is also possible to substitute the output of a Unix command in an
initialization file. This is accomplished by enclosing the command in
backticks (``). For example,
+</para>
<example id="ex-rc-backtick">
<title>Using external command's output in configuration files</title>
</screen>
</example>
+<para>
The output of the Unix command <quote>uname -a</quote> will be substituted before the
line is parsed. Note that since initialization files are line oriented, only
the first line of output from the Unix command will be substituted.
following implications:
</para>
-<para>
<itemizedlist>
<listitem><para>These variables should be set early in a configuration
question marks into regular expressions).</para></listitem>
</itemizedlist>
-</para>
</sect1>
</group>
</cmdsynopsis>
-<para>
-
<screen>
alias muttdude me@cs.hmc.edu (Michael Elkins)
alias theguys manny, moe, jack
</screen>
-</para>
-
<para>
Unlike other mailers, Mutt doesn't require aliases to be defined
in a special file. The <literal>alias</literal> command can appear anywhere in
For example:
</para>
-<para>
-
<example id="ex-alias-external">
<title>Configuring external alias files</title>
<screen>
</screen>
</example>
-</para>
-
<para>
To use aliases, you merely use the alias at any place in mutt where mutt
prompts for addresses, such as the <emphasis>To:</emphasis> or <emphasis>Cc:</emphasis> prompt. You can
allowed). The currently defined maps are:
</para>
-<para>
<anchor id="maps"/>
<variablelist>
</listitem>
</varlistentry>
</variablelist>
-</para>
<para>
<emphasis>key</emphasis> is the key (or key sequence) you wish to bind. To specify a
be a symbolic name as shown in <xref linkend="tab-key-names"/>.
</para>
-<para>
-
<table id="tab-key-names">
<title>Symbolic key names</title>
<tgroup cols="2">
</tgroup>
</table>
-</para>
-
<para>
<emphasis>key</emphasis> does not need to be enclosed in quotes unless it contains a
-space (<quote> </quote>) or semi-colon (<quote>;</quote>).
+space (<quote> </quote>) or semi-colon (<quote>;</quote>).
</para>
<para>
based upon the mailbox being read:
</para>
-<para>
-
<screen>
folder-hook mutt set sort=threads
</screen>
-</para>
-
<para>
However, the sorting method is not restored to its previous value when
reading a different mailbox. To specify a <emphasis>default</emphasis> command, use the
for all folders containing <quote>mutt</quote> in their name.
</para>
-<para>
<example id="ex-folder-sorting">
<title>Setting sort method based on mailbox name</title>
<screen>
folder-hook mutt set sort=threads
</screen>
</example>
-</para>
</sect1>
<emphasis>object</emphasis> can be one of:
</para>
-<para>
<itemizedlist>
<listitem><para>attachment</para></listitem>
<listitem><para>bold (hiliting bold patterns in the body of messages)</para></listitem>
<listitem><para>tree (thread tree drawn in the message index and attachment menu)</para></listitem>
<listitem><para>underline (hiliting underlined patterns in the body of messages)</para></listitem>
</itemizedlist>
-</para>
<para>
<emphasis>foreground</emphasis> and <emphasis>background</emphasis> can be one of the following:
</para>
-<para>
<itemizedlist>
<listitem><para>white</para></listitem>
<listitem><para>black</para></listitem>
<listitem><para>color<emphasis>x</emphasis></para>
</listitem>
</itemizedlist>
-</para>
<para>
<emphasis>foreground</emphasis> can optionally be prefixed with the keyword <literal>bright</literal> to make
terminal for this to work; for example (for Bourne-like shells):
</para>
-<para>
-
<screen>
set COLORFGBG="green;black"
export COLORFGBG
</screen>
-</para>
-
<para>
<emphasis role="bold">Note:</emphasis> The <emphasis>S-Lang</emphasis> library requires you to use the <emphasis>lightgray</emphasis>
and <emphasis>brown</emphasis> keywords instead of <emphasis>white</emphasis> and <emphasis>yellow</emphasis> when
can be one of the following:
</para>
-<para>
<itemizedlist>
<listitem><para>none</para></listitem>
<listitem><para>bold</para></listitem>
<listitem><para>reverse</para></listitem>
<listitem><para>standout</para></listitem>
</itemizedlist>
-</para>
</sect1>
For example:
</para>
-<para>
<example id="ex-header-weeding">
<title>Header weeding</title>
<screen>
unignore posted-to:
</screen>
</example>
-</para>
<anchor id="hdr-order"/>
<para>Usage:</para>
thus removing the header order effects set by the system-wide startup file.
</para>
-<para>
<example id="ex-hdr-order">
<title>Configuring header display order</title>
<screen>
hdr_order From Date: From: To: Cc: Subject:
</screen>
</example>
-</para>
</sect1>
all of your outgoing messages, you can put the command
</para>
-<para>
<example id="ex-my-hdr">
<title>Defining custom headers</title>
<screen>
my_hdr Organization: A Really Big Company, Anytown, USA
</screen>
</example>
-</para>
<para>
in your <literal>.muttrc</literal>.
<quote>Cc</quote> header fields, you could use:
</para>
-<para>
<screen>
unmy_hdr to cc
</screen>
-</para>
</sect1>
Examples:
</para>
-<para>
<example id="ex-save-hook-exando">
<title>Using %-expandos in <literal>save-hook</literal></title>
<screen>
save-hook aol\\.com$ +spam
</screen>
</example>
-</para>
<para>
Also see the <link linkend="fcc-save-hook">fcc-save-hook</link> command.
<para>
Example:
+</para>
<screen>
message-hook ~A 'set pager=builtin'
message-hook '~f freshmeat-news' 'set pager="less \"+/^ subject: .*\""'
</screen>
-</para>
-
</sect1>
<sect1 id="crypt-hook">
automatically run a sequence of commands at startup, or when entering
certain folders. For example, the following command will automatically
collapse all threads when entering a folder:
+</para>
<example id="ex-folder-hook-push">
<title>Embedding <literal>push</literal> in <literal>folder-hook</literal></title>
folder-hook . 'push <collapse-all>'
</screen>
</example>
-</para>
</sect1>
<para>
For example, suppose I use DCC, SpamAssassin, and PureMessage. I might
define these spam settings:
+</para>
<example id="ex-spam">
<title>Configuring spam detection</title>
</screen>
</example>
-</para>
-
<para>
If I then received a message that DCC registered with <quote>many</quote> hits
under the <quote>Fuz2</quote> checksum, and that PureMessage registered with a
you can use a <literal>spam</literal> command like this:
</para>
-<para>
-
<screen>
spam "^From: .*MAILER-DAEMON" "999"
</screen>
-</para>
-
</sect1>
<sect1 id="set">
mark:
</para>
-<para>
-
<screen>
set ?allow_8bit
</screen>
-</para>
-
<para>
The question mark is actually only required for boolean and quadoption
variables.
to abbreviate the calls of the <link linkend="source">source</link> command:
</para>
-<para>
<example id="ex-myvar1">
<title>Using user-defined variables for config file readability</title>
<screen>
# more source commands...
</screen>
</example>
-</para>
<para>
A custom variable can also be used in macros to backup the current value
linkend="delete">$delete</link> is restored.
</para>
-<para>
<example id="ex-myvar2">
<title>Using user-defined variables for backing up other config option values</title>
<screen>
<enter-command>set delete=$my_delete<enter>'
</screen>
</example>
-</para>
<para>
Since mutt expands such values already when parsing the configuration
dollar sign.
</para>
-<para>
<example id="ex-myvar3">
<title>Deferring user-defined variable expansion to runtime</title>
<screen>
<enter-command> unset my_old_pager_stop<Enter>"
</screen>
</example>
-</para>
<para>
Note that there is a space
<xref linkend="posix-regex-char-classes"/>
</para>
-<para>
<table id="posix-regex-char-classes">
<title>POSIX regular expression character classes</title>
<tgroup cols="2">
</tbody>
</tgroup>
</table>
-</para>
<para>
A character class is only valid in a regular expression inside the
sorting purposes:
</para>
-<para>
<variablelist>
<varlistentry>
</listitem>
</varlistentry>
</variablelist>
-</para>
<para>
A regular expression matching a single character may be followed by one
of several repetition operators described in <xref linkend="regex-repeat"/>.
</para>
-<para>
<table id="regex-repeat">
<title>Regular expression repetition operators</title>
<tgroup cols="2">
</tbody>
</tgroup>
</table>
-</para>
<para>
Two regular expressions may be concatenated; the resulting regular
following operators may also be used in regular expressions as described in <xref linkend="regex-gnu-ext"/>.
</para>
-<para>
<table id="regex-gnu-ext">
<title>GNU regular expression extensions</title>
<tgroup cols="2">
</tbody>
</tgroup>
</table>
-</para>
<para>
Please note however that these operators are not defined by POSIX, so
shows several ways to select messages.
</para>
-<para>
-
<table id="tab-patterns">
<title>Pattern modifiers</title>
<tgroup cols="2">
</tgroup>
</table>
-</para>
-
<para>
Where <emphasis>EXPR</emphasis> is a
<link linkend="regexp">regular expression</link>. Special attention has to be
This example matches all mails which only has recipients from Germany.
</para>
-<para>
-
<screen>
^~C \.de$
</screen>
-</para>
-
</sect2>
<sect2 id="simple-patterns">
example:
</para>
-<para>
-
<screen>
~t mutt ~f elkins
</screen>
-</para>
-
<para>
would select messages which contain the word <quote>mutt</quote> in the list of
recipients <emphasis role="bold">and</emphasis> that have the word <quote>elkins</quote> in the <quote>From</quote> header
patterns:
</para>
-<para>
-
<itemizedlist>
<listitem>
</itemizedlist>
-</para>
-
<para>
Here is an example illustrating a complex search pattern. This pattern will
select all messages which do not contain <quote>mutt</quote> in the <quote>To</quote> or <quote>Cc</quote>
field and which are from <quote>elkins</quote>.
</para>
-<para>
-
<example id="ex-pattern-bool">
<title>Using boolean operators in patterns</title>
<screen>
</screen>
</example>
-</para>
-
<para>
Here is an example using white space in the regular expression (note
the ' and " delimiters). For this to match, the mail's subject must
or <quote>Ed +SomeoneElse</quote>:
</para>
-<para>
-
<screen>
'~s "^Junk +From +Me$" ~f ("Jim +Somebody"|"Ed +SomeoneElse")'
</screen>
-</para>
-
<para>
Note that if a regular expression contains parenthesis, or a vertical bar
("|"), you <emphasis role="bold">must</emphasis> enclose the expression in double or single quotes since
pattern language. For example,
</para>
-<para>
-
<screen>
~f "me@(mutt\.org|cs\.hmc\.edu)"
</screen>
-</para>
-
<para>
Without the quotes, the parenthesis wouldn't end.
This would be separated to two OR'd patterns: <emphasis>˜f me@(mutt\.org</emphasis>
range of dates is:
</para>
-<para>
-
<screen>
Limit to messages matching: ~d 20/1/95-31/10
</screen>
-</para>
-
<para>
If you omit the minimum (first) date, and just specify <quote>-DD/MM/YY</quote>, all
messages <emphasis>before</emphasis> the given date will be selected. If you omit the maximum
<para>
Example: To select any messages two weeks around January 15, 2001,
you'd use the following pattern:
+</para>
<screen>
Limit to messages matching: ~d 15/1/2001*2w
</screen>
-</para>
-
<para>
<emphasis role="bold">Relative</emphasis>. This type of date is relative to the current date, and may
be specified as:
+</para>
<itemizedlist>
<listitem>
</itemizedlist>
-</para>
-
<para>
<emphasis>offset</emphasis> is specified as a positive number with one of the units from <xref linkend="tab-date-units"/>.
</para>
<para>
Example: to select messages less than 1 month old, you would use
+</para>
<screen>
Limit to messages matching: ~d <1m
</screen>
-</para>
-
<para>
<emphasis role="bold">Note:</emphasis> all dates used when searching are relative to the
<emphasis role="bold">local</emphasis> time zone, so unless you change the setting of your <link linkend="index-format">$index_format</link> to include a
my_hdr directive:
</para>
-<para>
-
<example id="ex-send-hook-my-hdr">
<title>Combining <literal>send-hook</literal> and <literal>my_hdr</literal></title>
<screen>
</screen>
</example>
-</para>
-
<sect2 id="pattern-hook" xreflabel="Message Matching in Hooks">
<title>Message Matching in Hooks</title>
<para>
For example, if you wanted to set your return address based upon sending
mail to a specific address, you could do something like:
+</para>
<screen>
send-hook '~t ^me@cs\.hmc\.edu$' 'my_hdr From: Mutt User <user@host>'
</screen>
+<para>
which would execute the given command when sending mail to
<emphasis>me@cs.hmc.edu</emphasis>.
</para>
command to use. For example:
</para>
-<para>
-
<screen>
set query_command = "mutt_ldap_query.pl '%s'"
</screen>
-</para>
-
<para>
The wrapper script should accept the query on the command-line. It
should return a one line message, then each matching response on a
<para>
An example multiple response output:
+</para>
<screen>
Searching database ... 20 entries ... 3 matching:
roessler@does-not-exist.org Thomas Roessler mutt pgp
</screen>
-</para>
-
<para>
There are two mechanisms for accessing the query function of mutt. One
is to do a query from the index menu using the <literal><query></literal> function (default: Q).
messages are stored in a single file. Each message has a line of the form:
</para>
-<para>
-
<screen>
From me@cs.hmc.edu Fri, 11 Apr 1997 11:44:56 PST
</screen>
-</para>
-
<para>
to denote the start of a new message (this is often referred to as the
<quote>From_</quote> line).
path.
</para>
-<para>
-
<itemizedlist>
<listitem>
</itemizedlist>
-</para>
-
</sect1>
<sect1 id="using-lists">
If a message contains URLs, it is efficient to get
a menu with all the URLs and start a WWW browser on one of them. This
functionality is provided by the external urlview program which can be
-retrieved at <ulink
-url="ftp://ftp.mutt.org/mutt/contrib/"
->ftp://ftp.mutt.org/mutt/contrib/</ulink
-> and the configuration commands:
+retrieved at
+<ulink url="ftp://ftp.mutt.org/mutt/contrib/">ftp://ftp.mutt.org/mutt/contrib/</ulink>
+and the configuration commands:
+</para>
<screen>
macro index \cb |urlview\n
macro pager \cb |urlview\n
</screen>
-</para>
-
</sect1>
</chapter>
<para>
Mutt will denote attachments with a couple lines describing them.
These lines are of the form:
+</para>
<screen>
[-- Attachment #1: Description --]
[-- Type: text/plain, Encoding: 7bit, Size: 10000 --]
</screen>
+<para>
Where the <literal>Description</literal> is the description or filename given for the
attachment, and the <literal>Encoding</literal> is one of
<literal>7bit/8bit/quoted-printable/base64/binary</literal>.
<para>
If Mutt cannot deal with a MIME type, it will display a message like:
+</para>
<screen>
[-- image/gif is unsupported (use 'v' to view this part) --]
</screen>
-</para>
-
</sect2>
<sect2 id="attach-menu">
<para>
Attachments appear as follows:
+</para>
<screen>
- 1 [text/plain, 7bit, 1K] /tmp/mutt-euler-8082-0 <no description>
2 [applica/x-gunzip, base64, 422K] ~/src/mutt-0.85.tar.gz <no description>
</screen>
-</para>
-
<para>
The '-' denotes that Mutt will delete the file after sending (or
postponing, or canceling) the message. It can be toggled with the
<para>
The mime.types file consist of lines containing a MIME type and a space
separated list of extensions. For example:
+</para>
<screen>
application/postscript ps eps
audio/x-aiff aif aifc aiff
</screen>
+<para>
A sample <literal>mime.types</literal> file comes with the Mutt distribution, and
should contain most of the MIME types you are likely to use.
</para>
internally, Mutt parses a series of external configuration files to
find an external handler. The default search string for these files
is a colon delimited list containing the following files:
+</para>
<orderedlist>
<listitem><para><literal>$HOME/.mailcap</literal></para></listitem>
<listitem><para><literal>/usr/local/etc/mailcap</literal></para></listitem>
</orderedlist>
+<para>
where <literal>$HOME</literal> is your home directory. The
<literal>$PKGDATADIR</literal> and the
<literal>$SYSCONFDIR</literal> directories depend on where mutt
<para>
So, in the simplest form, you can send a text/plain message to the
external pager more on stdin:
+</para>
<screen>
text/plain; more
</screen>
+<para>
Or, you could send the message as a file:
+</para>
<screen>
text/plain; more %s
</screen>
+<para>
Perhaps you would like to use lynx to interactively view a text/html
message:
+</para>
<screen>
text/html; lynx %s
</screen>
+<para>
In this case, lynx does not support viewing a file from stdin, so you
must use the %s syntax.
<emphasis role="bold">Note:</emphasis> <emphasis>Some older versions of lynx contain a bug where they
On the other hand, maybe you don't want to use lynx interactively, you
just want to have it convert the text/html to text/plain, then you can
use:
+</para>
<screen>
text/html; lynx -dump %s | more
</screen>
-</para>
-
<para>
Perhaps you wish to use lynx to view text/html files, and a pager on
all other text formats, then you would use the following:
+</para>
<screen>
text/html; lynx %s
text/*; more
</screen>
+<para>
This is the simplest form of a mailcap file.
</para>
since it is not itself subject to any further expansion):
</para>
-<para>
-
<screen>
text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \
&& test "`echo $charset | tr '[A-Z]' '[a-z]'`" != iso-8859-1
</screen>
-</para>
-
</sect2>
<sect2 id="advanced-mailcap">
In addition to the required content-type and view command fields, you
can add semi-colon ';' separated fields to set flags and other options.
Mutt recognizes the following optional fields:
+</para>
+
<variablelist>
<varlistentry>
of the view command. Without this flag, Mutt assumes that the command
is interactive. One could use this to replace the pipe to <literal>more</literal>
in the <literal>lynx -dump</literal> example in the Basic section:
+</para>
<screen>
text/html; lynx -dump %s ; copiousoutput
</screen>
+<para>
This will cause lynx to format the text/html output as text/plain
and Mutt will use your standard pager to display the results.
</para>
interpret a file as <literal>text/html</literal> if the file ends in <literal>.html</literal>.
So, you would specify lynx as a <literal>text/html</literal> viewer with a line in
the mailcap file like:
+</para>
<screen>
text/html; lynx %s; nametemplate=%s.html
</screen>
-</para>
</listitem>
</varlistentry>
<varlistentry>
then the test failed, and Mutt continues searching for the right entry.
<emphasis role="bold">Note:</emphasis> <emphasis>the content-type must match before Mutt performs the test.</emphasis>
For example:
+</para>
<screen>
text/html; netscape -remote 'openURL(%s)' ; test=RunningX
text/html; lynx %s
</screen>
+<para>
In this example, Mutt will run the program RunningX which will return 0
if the X Window manager is running, and non-zero if it isn't. If
RunningX returns 0, then Mutt will call netscape to display the
</listitem>
</varlistentry>
</variablelist>
-</para>
</sect3>
attempting to print an <literal>image/gif</literal>, and you have the following
entries in your mailcap file, Mutt will search for an entry with the
print command:
+</para>
<screen>
image/*; xv %s
nametemplate=%s.gif
</screen>
+<para>
Mutt will skip the <literal>image/*</literal> entry and use the <literal>image/gif</literal>
entry with the print command.
</para>
automatically, the other to be viewed interactively from the attachment
menu. In addition, you can then use the test feature to determine which
viewer to use interactively depending on your environment.
+</para>
<screen>
text/html; netscape -remote 'openURL(%s)' ; test=RunningX
text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput
</screen>
+<para>
For <link linkend="auto-view">auto_view</link>, Mutt will choose the third
entry because of the copiousoutput tag. For interactive viewing, Mutt
will run the program RunningX to determine if it should use the first
command is passed to <literal>/bin/sh -c</literal>, it is parsed to expand
various special parameters with information from Mutt. The keywords
Mutt expands are:
+</para>
+
<variablelist>
<varlistentry>
Mutt will expand this to the value of the specified parameter
from the Content-Type: line of the mail message. For instance, if
Your mail message contains:
+</para>
<screen>
Content-Type: text/plain; charset=iso-8859-1
</screen>
+<para>
then Mutt will expand %{charset} to iso-8859-1. The default metamail
mailcap file uses this feature to test the charset to spawn an xterm
using the right charset to view the message.
</listitem>
</varlistentry>
</variablelist>
+
+<para>
Mutt does not currently support the %F and %n keywords
specified in RFC 1524. The main purpose of these parameters is for
multipart messages, which is handled internally by Mutt.
<para>
This mailcap file is fairly simple and standard:
+</para>
-<programlisting>
+<screen>
# I'm always running X :)
video/*; xanim %s > /dev/null
image/*; xv %s > /dev/null
# I'm always running netscape (if my computer had more memory, maybe)
text/html; netscape -remote 'openURL(%s)'
-</programlisting>
-
-</para>
+</screen>
<para>
This mailcap file shows quite a number of examples:
</para>
-<para>
-
-<programlisting>
+<screen>
# Use xanim to view all videos Xanim produces a header on startup,
# send that to /dev/null so I don't see it
video/*; xanim %s > /dev/null
# Send excel spreadsheets to my NT box
application/ms-excel; open.pl %s
-</programlisting>
-
-</para>
+</screen>
</sect2>
<para>
For instance, if you set auto_view to:
+</para>
<screen>
auto_view text/html application/x-gunzip \
application/postscript image/gif application/x-tar-gz
</screen>
-</para>
-
<para>
Mutt could use the following mailcap entries to automatically view
attachments of these types.
+</para>
<screen>
text/html; lynx -dump %s; copiousoutput; nametemplate=%s.html
application/postscript; ps2ascii %s; copiousoutput
</screen>
-</para>
-
<para>
<quote>unauto_view</quote> can be used to remove previous entries from the autoview list.
This can be used with message-hook to autoview messages based on size, etc.
is preferred. The alternative_order list consists of a number of
mimetypes in order, including support for implicit and explicit
wildcards, for example:
+</para>
<screen>
alternative_order text/enriched text/plain text application/postscript image/*
</screen>
-</para>
-
<para>
Next, mutt will check if any of the types have a defined
<link linkend="auto-view">auto_view</link>, and use that. Failing
<para>
The syntax is:
</para>
+
<screen>
attachments {+|-}disposition mime-type
unattachments {+|-}disposition mime-type
associated with this extension will then be used to process the attachment
according to the rules in the mailcap file and according to any other configuration
options (such as auto_view) specified. Common usage would be:
+</para>
<screen>
mime_lookup application/octet-stream application/X-Lotus-Manuscript
</screen>
-</para>
-
<para>
In addition, the unmime_lookup command may be used to disable this feature
for any particular mime-type if it had been set, for example, in a global
and
<link linkend="timeout">$timeout</link>
variables. Personally I use
+</para>
<screen>
set mail_check=90
set timeout=15
</screen>
+<para>
with relatively good results over my slow modem line.
</para>
As of version 1.2, mutt supports browsing mailboxes on an IMAP
server. This is mostly the same as the local file browser, with the
following differences:
+</para>
<itemizedlist>
<listitem>
</itemizedlist>
-</para>
-
</sect2>
<sect2 id="imap-authentication">
<para>
There are a few variables which control authentication:
+</para>
<itemizedlist>
<listitem>
</itemizedlist>
-</para>
-
</sect2>
</sect1>
Some examples:
</para>
-<para>
-
<screen>
account-hook . 'unset imap_user; unset imap_pass; unset tunnel'
account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo'
account-hook smtp://user@host3/ 'set tunnel="ssh host3 /usr/libexec/smtpd"'
</screen>
-</para>
-
</sect1>
<sect1 id="caching">
through a command like the following:
</para>
-<para>
<screen>
$ printf '%s' '/path/to/folder' | md5sum
</screen>
-</para>
<para>
The <literal>md5sum</literal> command may also be
Mutt's performance when reading mailboxes can be improved in two ways:
</para>
-<para>
<orderedlist>
-<listitem><para>
+
+<listitem>
+<para>
For remote folders (IMAP and POP) as well as folders using
one-file-per message storage (Maildir and MH), mutt's
performance can be greatly improved using
<link linkend="header-caching">header caching</link>.
Using a single database per folder may further increase
performance.
-</para></listitem>
-<listitem><para>
+</para>
+</listitem>
+
+<listitem>
+<para>
Mutt provides the <link linkend="read-inc">$read_inc</link>
and <link linkend="write-inc">$write_inc</link>
variables to specify at which rate to update progress
<link linkend="read-inc">$read_inc</link>
may be too low. It can be tuned on on a folder-basis using
<link linkend="folder-hook">folder-hooks</link>:
+</para>
<screen>
# use very high $read_inc to speed up reading hcache'd maildirs
folder-hook ^imap 'set read_inc=100'
# use even lower value for reading even slower remote POP folders
folder-hook ^pop 'set read_inc=1'</screen>
-</para>
+
</listitem>
</orderedlist>
-</para>
<para>These settings work on a per-message basis. However, as messages may
greatly differ in size and certain operations are much faster than others,
to send messages from the command line as well.
</para>
-<para>
-
<table id="tab-commandline-options">
<title>Command line options</title>
<tgroup cols="2">
</tgroup>
</table>
-</para>
-
<para>
To read messages in a mailbox
</para>
The following are the commands understood by mutt.
</para>
-<para>
-
<itemizedlist>
<listitem>
</listitem>
<listitem>
-<para>
<cmdsynopsis>
<command><link linkend="color">color</link></command>
<arg choice="plain">
<replaceable class="parameter">background</replaceable>
</arg>
</cmdsynopsis>
-</para>
-<para>
<cmdsynopsis>
<command><link linkend="color">color</link></command>
<group choice="req">
<replaceable class="parameter">regexp</replaceable>
</arg>
</cmdsynopsis>
-</para>
-<para>
<cmdsynopsis>
<command><link linkend="color">color</link></command>
<arg choice="plain">
<replaceable class="parameter">pattern</replaceable>
</arg>
</cmdsynopsis>
-</para>
</listitem>
<listitem>
</listitem>
<listitem>
-<para>
<cmdsynopsis>
<command><link linkend="mono">mono</link></command>
<arg choice="plain">
<replaceable class="parameter">attribute</replaceable>
</arg>
</cmdsynopsis>
-</para>
-<para>
<cmdsynopsis>
<command><link linkend="mono">mono</link></command>
<group choice="req">
<replaceable class="parameter">regexp</replaceable>
</arg>
</cmdsynopsis>
-</para>
-<para>
<cmdsynopsis>
<command><link linkend="mono">mono</link></command>
<arg choice="plain">
<replaceable class="parameter">pattern</replaceable>
</arg>
</cmdsynopsis>
-</para>
</listitem>
<listitem>
</itemizedlist>
-</para>
-
</sect1>
<sect1 id="variables">
** .pp
** Specifies the format of the data displayed for the ``$alias'' menu. The
** following \fCprintf(3)\fP-style sequences are available:
- ** .pp
** .dl
** .dt %a .dd alias name
** .dt %f .dd flags - currently, a ``d'' for an alias marked for deletion
** their text will be colored accordingly. Note that this may override
** your color choices, and even present a security problem, since a
** message could include a line like
- ** .pp
** .ts
** [-- PGP output follows ...
** .te
** indication are assumed to be in ``us-ascii''.
** .pp
** For example, Japanese users might prefer this:
- ** .pp
** .ts
** set assumed_charset="iso-2022-jp:euc-jp:shift_jis:utf-8"
** .te
** If \fIunset\fP, the value of $$charset will be used instead.
** For example, the following configuration would work for Japanese
** text handling:
- ** .pp
** .ts
** set attach_charset="iso-2022-jp:euc-jp:shift_jis:utf-8"
** .te
** .pp
** This variable describes the format of the ``attachment'' menu. The
** following \fCprintf(3)\fP-style sequences are understood:
- ** .pp
** .dl
** .dt %C .dd charset
** .dt %c .dd requires charset conversion (``n'' or ``c'')
** Controls the format of the status line displayed in the ``compose''
** menu. This string is similar to $$status_format, but has its own
** set of \fCprintf(3)\fP-like sequences:
- ** .pp
** .dl
** .dt %a .dd total number of attachments
** .dt %h .dd local hostname
** notified of successful transmission.
** .pp
** Example:
- ** .pp
** .ts
** set dsn_notify="failure,delay"
** .te
** message header, or \fIfull\fP to return the full message.
** .pp
** Example:
- ** .pp
** .ts
** set dsn_return=hdrs
** .te
** This variable allows you to customize the file browser display to your
** personal taste. This string is similar to $$index_format, but has
** its own set of \fCprintf(3)\fP-like sequences:
- ** .pp
** .dl
** .dt %C .dd current file number
** .dt %d .dd date/time folder was last modified
** in order from most-secure to least-secure.
** .pp
** Example:
- ** .pp
** .ts
** set imap_authenticators="gssapi:cram-md5:login"
** .te
** ``Format strings'' are similar to the strings used in the C
** function \fCprintf(3)\fP to format output (see the man page for more details).
** The following sequences are defined in Mutt:
- ** .pp
** .dl
** .dt %a .dd address of the author
** .dt %A .dd reply-to address (if present; otherwise: address of author)
** This variable describes the format of a remailer line on the mixmaster
** chain selection screen. The following \fCprintf(3)\fP-like sequences are
** supported:
- ** .pp
** .dl
** .dt %n .dd The running number on the menu.
** .dt %c .dd Remailer capabilities.
** This variable allows you to customize the PGP key selection menu to
** your personal taste. This string is similar to $$index_format, but
** has its own set of \fCprintf(3)\fP-like sequences:
- ** .pp
** .dl
** .dt %n .dd number
** .dt %k .dd key id
** .pp
** Specifies how the entries in the pgp menu are sorted. The
** following are legal values:
- ** .pp
** .dl
** .dt address .dd sort alphabetically by user id
** .dt keyid .dd sort alphabetically by key id
** application/pgp attachments.
** .pp
** The PGP command formats have their own set of \fCprintf(3)\fP-like sequences:
- ** .pp
** .dl
** .dt %p .dd Expands to PGPPASSFD=0 when a pass phrase is needed, to an empty
** string otherwise. Note: This may be used with a %? construct.
** .pp
** This command is used to list the secret key ring's contents. The
** output format must be analogous to the one used by:
- ** .pp
** .ts
** gpg --list-keys --with-colons.
** .te
** .pp
** This command is used to list the public key ring's contents. The
** output format must be analogous to the one used by
- ** .pp
** .ts
** gpg --list-keys --with-colons.
** .te
** .pp
** The OpenSSL command formats have their own set of \fCprintf(3)\fP-like sequences
** similar to PGP's:
- ** .pp
** .dl
** .dt %f .dd Expands to the name of a file containing a message.
** .dt %s .dd Expands to the name of a file containing the signature part
** also automatically accepted.
** .pp
** Example:
- ** .pp
** .ts
** set certificate_file=~/.mutt/certificates
** .te
** certificates are also automatically accepted.
** .pp
** Example:
- ** .pp
** .ts
** set ssl_ca_certificates_file=/etc/ssl/certs/ca-certificates.crt
** .te
** most-secure to least-secure.
** .pp
** Example:
- ** .pp
** .ts
** set pop_authenticators="digest-md5:apop:user"
** .te
** .pp
** The name of your POP server for the \fC$<fetch-mail>\fP function. You
** can also specify an alternative port, username and password, ie:
- ** .pp
** .ts
** [pop[s]://][username[:password]@]popserver[:port]
** .te
** a connection to the server. This is useful for setting up secure
** connections, e.g. with \fCssh(1)\fP. If the command returns a nonzero
** status, mutt gives up opening the server. Example:
- ** .pp
** .ts
** set preconnect="ssh -f -q -L 1234:mailhost.net:143 mailhost.net \(rs
** sleep 20 < /dev/null > /dev/null"
** .pp
** This variable describes the format of the ``query'' menu. The
** following \fCprintf(3)\fP-style sequences are understood:
- ** .pp
** .dl
** .dt %a .dd destination address
** .dt %c .dd current entry number
** name from your aliases in the index menu if it finds an alias that
** matches the message's sender. For example, if you have the following
** alias:
- ** .pp
** .ts
** alias juser abd30425@somewhere.net (Joe User)
** .te
** .pp
** and then you receive mail which contains the following header:
- ** .pp
** .ts
** From: abd30425@somewhere.net
** .te
** When this variable is \fIset\fP, Mutt will decode RFC2047-encoded MIME
** parameters. You want to set this variable when mutt suggests you
** to save attachments to files named like:
- ** .pp
** .ts
** =?iso-8859-1?Q?file=5F=E4=5F991116=2Ezip?=
** .te
** most-secure to least-secure.
** .pp
** Example:
- ** .pp
** .ts
** set smtp_authenticators="digest-md5:cram-md5"
** .te
** .pp
** Defines the SMTP smarthost where sent messages should relayed for
** delivery. This should take the form of an SMTP URL, eg:
- ** .pp
** .ts
** smtp[s]://[user[:pass]@]host[:port]/
** .te
** .pp
** Specifies how to sort messages in the ``index'' menu. Valid values
** are:
- ** .pp
** .il
** .dd date or date-sent
** .dd date-received
** .pp
** Specifies how the entries in the ``alias'' menu are sorted. The
** following are legal values:
- ** .pp
** .il
** .dd address (sort alphabetically by email address)
** .dd alias (sort alphabetically by alias name)
** must come after ``reverse-''. The ``last-'' prefix causes messages to be
** sorted against its siblings by which has the last descendant, using
** the rest of $$sort_aux as an ordering. For instance,
- ** .pp
** .ts
** set sort_aux=last-date-received
** .te
** .pp
** Specifies how to sort entries in the file browser. By default, the
** entries are sorted alphabetically. Valid values:
- ** .pp
** .il
** .dd alpha (alphabetically)
** .dd date
** Controls the format of the status line displayed in the ``index''
** menu. This string is similar to $$index_format, but has its own
** set of \fCprintf(3)\fP-like sequences:
- ** .pp
** .dl
** .dt %b .dd number of mailboxes with new mail *
** .dt %d .dd number of deleted messages *
** Setting this variable will cause mutt to open a pipe to a command
** instead of a raw socket. You may be able to use this to set up
** preauthenticated connections to your IMAP/POP3/SMTP server. Example:
- ** .pp
** .ts
** set tunnel="ssh -q mailhost.net /usr/local/libexec/imapd"
** .te