1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
7 <title>The Mutt E-Mail Client</title>
9 <firstname>Michael</firstname><surname>Elkins</surname>
10 <email>me@cs.hmc.edu</email>
12 <releaseinfo>version @VERSION@</releaseinfo>
16 <quote>All mail clients suck. This one just sucks less.</quote> -me, circa 1995
22 <title>Introduction</title>
25 <emphasis role="bold">Mutt</emphasis> is a small but very powerful text-based MIME mail client. Mutt is
26 highly configurable, and is well suited to the mail power user with advanced
27 features like key bindings, keyboard macros, mail threading, regular
28 expression searches and a powerful pattern matching language for selecting
33 <title>Mutt Home Page</title>
36 The official homepage can be found at
37 <ulink url="http://www.mutt.org/">http://www.mutt.org/</ulink>.
42 <sect1 id="muttlists">
43 <title>Mailing Lists</title>
46 To subscribe to one of the following mailing lists, send a message with the
47 word <emphasis>subscribe</emphasis> in the body to
48 <literal>list-name</literal><emphasis>-request</emphasis><literal>@mutt.org</literal>.
55 <email>mutt-announce-request@mutt.org</email> -- low traffic list for announcements
61 <email>mutt-users-request@mutt.org</email> -- help, bug reports and feature requests
67 <email>mutt-dev-request@mutt.org</email> -- development mailing list
75 All messages posted to
76 <emphasis>mutt-announce</emphasis> are automatically forwarded to
77 <emphasis>mutt-users</emphasis>, so you do not need to be subscribed to
84 <sect1 id="distribution">
85 <title>Software Distribution Sites</title>
88 Mutt releases can be downloaded from
89 <ulink url="ftp://ftp.mutt.org/mutt/">ftp://ftp.mutt.org/mutt/</ulink>.
90 For a list of mirror sites, please refer to
91 <ulink url="http://www.mutt.org/download.html">http://www.mutt.org/download.html</ulink>.
97 <title>Mutt online resources</title>
102 <term>Bug Tracking System</term>
105 The official mutt bug tracking system can be found at
106 <ulink url="http://dev.mutt.org/">http://dev.mutt.org/</ulink>
115 An (unofficial) wiki can be found
116 at <ulink url="http://wiki.mutt.org/">http://wiki.mutt.org/</ulink>.
125 For the IRC user community, visit channel <emphasis>#mutt</emphasis> on
126 <ulink url="http://www.freenode.net/">irc.freenode.net</ulink>.
135 For USENET, see the newsgroup <ulink url="news:comp.mail.mutt">comp.mail.mutt</ulink>.
145 <title>Contributing to Mutt</title>
148 There are various ways to contribute to the Mutt project.
152 Especially for new users it may be helpful to meet other new and
153 experienced users to chat about Mutt, talk about problems and share
158 Since translations of Mutt into other languages are highly appreciated,
159 the mutt developers always look for skilled translators that help
160 improve and continue to maintain stale translations.
164 For contributing code patches for new features and bug fixes, please
165 refer to the developer pages at
166 <ulink url="http://dev.mutt.org/">http://dev.mutt.org/</ulink> for more details.
172 <title>Typograhical conventions</title>
175 This section lists typographical conventions followed throughout this
176 manual. See table <xref linkend="tab-typo"/> for typographical
177 conventions for special terms.
180 <table id="tab-typo">
181 <title>Typographical conventions for special terms</title>
184 <row><entry>Item</entry><entry>Refers to...</entry></row>
187 <row><entry><literal>printf(3)</literal></entry><entry>UNIX manual pages, execute <literal>man 3 printf</literal></entry></row>
188 <row><entry><literal><PageUp></literal></entry><entry>named keys</entry></row>
189 <row><entry><literal><create-alias></literal></entry><entry>named Mutt function</entry></row>
190 <row><entry><literal>ˆG</literal></entry><entry>Control+G key combination</entry></row>
191 <row><entry><literal>$mail_check</literal></entry><entry>Mutt configuration option</entry></row>
197 Examples are presented as:
205 Within command synopsis, curly brackets (<quote>{}</quote>) denote a set
206 of options of which one is mandatory, square brackets
207 (<quote>[]</quote>) denote optional arguments, three dots
208 denote that the argument may be repeated arbitrary times.
213 <sect1 id="copyright">
214 <title>Copyright</title>
217 Mutt is Copyright (C) 1996-2009 Michael R. Elkins
218 <email>me@mutt.org</email> and others.
222 This program is free software; you can redistribute it and/or modify
223 it under the terms of the GNU General Public License as published by
224 the Free Software Foundation; either version 2 of the License, or
225 (at your option) any later version.
229 This program is distributed in the hope that it will be useful,
230 but WITHOUT ANY WARRANTY; without even the implied warranty of
231 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
232 GNU General Public License for more details.
236 You should have received a copy of the GNU General Public License
237 along with this program; if not, write to the Free Software
238 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
245 <chapter id="gettingstarted">
246 <title>Getting Started</title>
249 This section is intended as a brief overview of how to use Mutt. There are
250 many other features which are described elsewhere in the manual. There
251 is even more information available in the Mutt FAQ and various web
252 pages. See the <ulink url="http://www.mutt.org/">Mutt homepage</ulink> for more details.
256 The keybindings described in this section are the defaults as distributed.
257 Your local system administrator may have altered the defaults for your site.
258 You can always type <quote>?</quote> in any menu to display the current bindings.
262 The first thing you need to do is invoke mutt, simply by typing <literal>mutt</literal>
263 at the command line. There are various command-line options, see
264 either the mutt man page or the <link linkend="commandline">reference</link>.
267 <sect1 id="core-concepts">
268 <title>Core concepts</title>
271 Mutt is a text-based application which interacts with users through
272 different menus which are mostly line-/entry-based or page-based. A
273 line-based menu is the so-called <quote>index</quote> menu (listing all messages of
274 the currently opened folder) or the <quote>alias</quote> menu (allowing you to
275 select recipients from a list). Examples for page-based menus are the
276 <quote>pager</quote> (showing one message at a time) or the <quote>help</quote> menu listing
277 all available key bindings.
281 The user interface consists of a context sensitive help line at the top,
282 the menu's contents followed by a context sensitive status line and
283 finally the command line. The command line is used to display
284 informational and error messages as well as for prompts and for entering
285 interactive commands.
289 Because Mutt allows for customizing almost all key bindings, there are
290 so-called <quote>functions</quote> which can be executed manually (using the
291 command line) or in macros. Macros allow the user to bind a sequence of
292 commands to a single key or a short key sequence instead of repeating a
293 sequence of actions over and over.
297 Many commands (such as saving or copying a message to another folder)
298 can be applied to a single message or a set of messages (so-called
299 <quote>tagged</quote> messages). To help selecting messages, Mutt provides a rich
300 set of message patterns (such as recipients, sender, body contents, date
301 sent/received, etc.) which can be combined into complex expressions
302 using the boolean <emphasis>and</emphasis> and <emphasis>or</emphasis>
303 operations as well as negating. These patterns can also be used to (for
304 example) search for messages or to limit the index to show only matching
309 Mutt supports a <quote>hook</quote> concept which allows the user to execute
310 arbitrary configuration commands and functions in certain situations
311 such as entering a folder, starting a new message or replying to an
312 existing one. These hooks can be used to highly customize Mutt's
313 behaviour including managing multiple identities, customizing the
314 display for a folder or even implementing auto-archiving based on a
315 per-folder basis and much more.
321 <title>Moving Around in Menus</title>
324 The most important navigation keys common to all menus are shown in
325 <xref linkend="tab-keys-nav"/>.
328 <table id="tab-keys-nav">
329 <title>Most common navigation keys</title>
332 <row><entry>Key</entry><entry>Function</entry><entry>Description</entry></row>
335 <row><entry>j or <Down></entry><entry><literal><next-entry></literal></entry><entry>move to the next entry</entry></row>
336 <row><entry>k or <Up></entry><entry><literal><previous-entry></literal></entry><entry>move to the previous entry</entry></row>
337 <row><entry>z or <PageDn></entry><entry><literal><page-down></literal></entry><entry>go to the next page</entry></row>
338 <row><entry>Z or <PageUp></entry><entry><literal><page-up></literal></entry><entry>go to the previous page</entry></row>
339 <row><entry>= or <Home></entry><entry><literal><first-entry></literal></entry><entry>jump to the first entry</entry></row>
340 <row><entry>* or <End></entry><entry><literal><last-entry></literal></entry><entry>jump to the last entry</entry></row>
341 <row><entry>q</entry><entry><literal><quit></literal></entry><entry>exit the current menu</entry></row>
342 <row><entry>?</entry><entry><literal><help></literal></entry><entry>list all keybindings for the current menu</entry></row>
350 <title>Editing Input Fields</title>
352 <sect2 id="editing-intro">
353 <title>Introduction</title>
356 Mutt has a built-in line editor for inputting text, e.g. email
357 addresses or filenames. The keys used to manipulate text input are
358 very similar to those of Emacs. See <xref linkend="tab-keys-editor"/> for a full
359 reference of available functions, their default key bindings, and
363 <table id="tab-keys-editor">
364 <title>Most common line editor keys</title>
367 <row><entry>Key</entry><entry>Function</entry><entry>Description</entry></row>
370 <row><entry>ˆA or <Home></entry><entry><literal><bol></literal></entry><entry>move to the start of the line</entry></row>
371 <row><entry>ˆB or <Left></entry><entry><literal><backward-char></literal></entry><entry>move back one char</entry></row>
372 <row><entry>Esc B</entry><entry><literal><backward-word></literal></entry><entry>move back one word</entry></row>
373 <row><entry>ˆD or <Delete></entry><entry><literal><delete-char></literal></entry><entry>delete the char under the cursor</entry></row>
374 <row><entry>ˆE or <End></entry><entry><literal><eol></literal></entry><entry>move to the end of the line</entry></row>
375 <row><entry>ˆF or <Right></entry><entry><literal><forward-char></literal></entry><entry>move forward one char</entry></row>
376 <row><entry>Esc F</entry><entry><literal><forward-word></literal></entry><entry>move forward one word</entry></row>
377 <row><entry><Tab></entry><entry><literal><complete></literal></entry><entry>complete filename or alias</entry></row>
378 <row><entry>ˆT</entry><entry><literal><complete-query></literal></entry><entry>complete address with query</entry></row>
379 <row><entry>ˆK</entry><entry><literal><kill-eol></literal></entry><entry>delete to the end of the line</entry></row>
380 <row><entry>Esc d</entry><entry><literal><kill-eow></literal></entry><entry>delete to the end of the word</entry></row>
381 <row><entry>ˆW</entry><entry><literal><kill-word></literal></entry><entry>kill the word in front of the cursor</entry></row>
382 <row><entry>ˆU</entry><entry><literal><kill-line></literal></entry><entry>delete entire line</entry></row>
383 <row><entry>ˆV</entry><entry><literal><quote-char></literal></entry><entry>quote the next typed key</entry></row>
384 <row><entry><Up></entry><entry><literal><history-up></literal></entry><entry>recall previous string from history</entry></row>
385 <row><entry><Down></entry><entry><literal><history-down></literal></entry><entry>recall next string from history</entry></row>
386 <row><entry><BackSpace></entry><entry><literal><backspace></literal></entry><entry>kill the char in front of the cursor</entry></row>
387 <row><entry>Esc u</entry><entry><literal><upcase-word></literal></entry><entry>convert word to upper case</entry></row>
388 <row><entry>Esc l</entry><entry><literal><downcase-word></literal></entry><entry>convert word to lower case</entry></row>
389 <row><entry>Esc c</entry><entry><literal><capitalize-word></literal></entry><entry>capitalize the word</entry></row>
390 <row><entry>ˆG</entry><entry>n/a</entry><entry>abort</entry></row>
391 <row><entry><Return></entry><entry>n/a</entry><entry>finish editing</entry></row>
397 You can remap the <emphasis>editor</emphasis> functions using the
398 <link linkend="bind">bind</link> command. For example, to make
399 the <Delete> key delete the character in front of
400 the cursor rather than under, you could use:
404 bind editor <delete> backspace
409 <sect2 id="editing-history">
410 <title>History</title>
413 Mutt maintains a history for the built-in editor. The number of items
414 is controlled by the <link linkend="history">$history</link>
415 variable and can be made persistent using an external file specified
416 using <link linkend="history-file">$history_file</link>.
417 You may cycle through them at an editor prompt by using the
418 <literal><history-up></literal> and/or
419 <literal><history-down></literal> commands.
423 Mutt maintains several distinct history lists, one for each of the
424 following categories:
428 <listitem><para>muttrc commands</para></listitem>
429 <listitem><para>addresses and aliases</para></listitem>
430 <listitem><para>shell commands</para></listitem>
431 <listitem><para>filenames</para></listitem>
432 <listitem><para>patterns</para></listitem>
433 <listitem><para>everything else</para></listitem>
437 Mutt automatically filters out repeated items from the history. It
438 also mimics the behavior of some shells by ignoring items starting
439 with a space. The latter feature can be useful in macros to not clobber
440 the history's valuable entries with unwanted entries.
448 <title>Reading Mail - The Index and Pager</title>
451 Similar to many other mail clients, there are two modes in which mail is
452 read in Mutt. The first is the index of messages in the mailbox, which is
453 called the <quote>index</quote> in Mutt. The second mode is the display of the
454 message contents. This is called the <quote>pager.</quote>
458 The next few sections describe the functions provided in each of these
462 <sect2 id="index-menu">
463 <title>The Message Index</title>
466 Common keys used to navigate through and manage messages in the index
467 are shown in <xref linkend="tab-key-index"/>. How messages are presented
468 in the index menu can be customized using the
469 <link linkend="index-format">$index_format</link> variable.
472 <table id="tab-key-index">
473 <title>Most common message index keys</title>
476 <row><entry>Key</entry><entry>Description</entry></row>
479 <row><entry>c</entry><entry>change to a different mailbox</entry></row>
480 <row><entry>Esc c</entry><entry>change to a folder in read-only mode</entry></row>
481 <row><entry>C</entry><entry>copy the current message to another mailbox</entry></row>
482 <row><entry>Esc C</entry><entry>decode a message and copy it to a folder</entry></row>
483 <row><entry>Esc s</entry><entry>decode a message and save it to a folder</entry></row>
484 <row><entry>D</entry><entry>delete messages matching a pattern</entry></row>
485 <row><entry>d</entry><entry>delete the current message</entry></row>
486 <row><entry>F</entry><entry>mark as important</entry></row>
487 <row><entry>l</entry><entry>show messages matching a pattern</entry></row>
488 <row><entry>N</entry><entry>mark message as new</entry></row>
489 <row><entry>o</entry><entry>change the current sort method</entry></row>
490 <row><entry>O</entry><entry>reverse sort the mailbox</entry></row>
491 <row><entry>q</entry><entry>save changes and exit</entry></row>
492 <row><entry>s</entry><entry>save-message</entry></row>
493 <row><entry>T</entry><entry>tag messages matching a pattern</entry></row>
494 <row><entry>t</entry><entry>toggle the tag on a message</entry></row>
495 <row><entry>Esc t</entry><entry>toggle tag on entire message thread</entry></row>
496 <row><entry>U</entry><entry>undelete messages matching a pattern</entry></row>
497 <row><entry>u</entry><entry>undelete-message</entry></row>
498 <row><entry>v</entry><entry>view-attachments</entry></row>
499 <row><entry>x</entry><entry>abort changes and exit</entry></row>
500 <row><entry><Return></entry><entry>display-message</entry></row>
501 <row><entry><Tab></entry><entry>jump to the next new or unread message</entry></row>
502 <row><entry>@</entry><entry>show the author's full e-mail address</entry></row>
503 <row><entry>$</entry><entry>save changes to mailbox</entry></row>
504 <row><entry>/</entry><entry>search</entry></row>
505 <row><entry>Esc /</entry><entry>search-reverse</entry></row>
506 <row><entry>ˆL</entry><entry>clear and redraw the screen</entry></row>
507 <row><entry>ˆT</entry><entry>untag messages matching a pattern</entry></row>
513 In addition to who sent the message and the subject, a short summary of
514 the disposition of each message is printed beside the message number.
515 Zero or more of the <quote>flags</quote> in <xref linkend="tab-msg-status-flags"/>
516 may appear, some of which can be turned on or off using these functions:
517 <literal><set-flag></literal> and
518 <literal><clear-flag></literal>
519 bound by default to <quote>w</quote> and <quote>W</quote> respectively.
523 Furthermore, the flags in <xref linkend="tab-msg-recip-flags"/> reflect
524 who the message is addressed to. They can be customized with the
525 <link linkend="to-chars">$to_chars</link> variable.
528 <table id="tab-msg-status-flags">
529 <title>Message status flags</title>
532 <row><entry>Flag</entry><entry>Description</entry></row>
535 <row><entry>D</entry><entry>message is deleted (is marked for deletion)</entry></row>
536 <row><entry>d</entry><entry>message has attachments marked for deletion</entry></row>
537 <row><entry>K</entry><entry>contains a PGP public key</entry></row>
538 <row><entry>N</entry><entry>message is new</entry></row>
539 <row><entry>O</entry><entry>message is old</entry></row>
540 <row><entry>P</entry><entry>message is PGP encrypted</entry></row>
541 <row><entry>r</entry><entry>message has been replied to</entry></row>
542 <row><entry>S</entry><entry>message is signed, and the signature is successfully verified</entry></row>
543 <row><entry>s</entry><entry>message is signed</entry></row>
544 <row><entry>!</entry><entry>message is flagged</entry></row>
545 <row><entry>*</entry><entry>message is tagged</entry></row>
550 <table id="tab-msg-recip-flags">
551 <title>Message recipient flags</title>
554 <row><entry>Flag</entry><entry>Description</entry></row>
557 <row><entry>+</entry><entry>message is to you and you only</entry></row>
558 <row><entry>T</entry><entry>message is to you, but also to or cc'ed to others</entry></row>
559 <row><entry>C</entry><entry>message is cc'ed to you</entry></row>
560 <row><entry>F</entry><entry>message is from you</entry></row>
561 <row><entry>L</entry><entry>message is sent to a subscribed mailing list</entry></row>
568 <sect2 id="pager-menu">
569 <title>The Pager</title>
572 By default, Mutt uses its builtin pager to display the contents of messages.
573 The pager is very similar to the Unix program <emphasis>less</emphasis> though not nearly as
577 <table id="tab-key-pager">
578 <title>Most common pager keys</title>
581 <row><entry>Key</entry><entry>Description</entry></row>
584 <row><entry><Return></entry><entry>go down one line</entry></row>
585 <row><entry><Space></entry><entry>display the next page (or next message if at the end of a message)</entry></row>
586 <row><entry>-</entry><entry>go back to the previous page</entry></row>
587 <row><entry>n</entry><entry>search for next match</entry></row>
588 <row><entry>S</entry><entry>skip beyond quoted text</entry></row>
589 <row><entry>T</entry><entry>toggle display of quoted text</entry></row>
590 <row><entry>?</entry><entry>show keybindings</entry></row>
591 <row><entry>/</entry><entry>regular expression search</entry></row>
592 <row><entry>Esc /</entry><entry>backward regular expression search</entry></row>
593 <row><entry>\</entry><entry>toggle highlighting of search matches</entry></row>
594 <row><entry>ˆ</entry><entry>jump to the top of the message</entry></row>
600 In addition to key bindings in <xref linkend="tab-key-pager"/>,
601 many of the functions from the index menu are also available in
602 the pager, such as <literal><delete-message></literal> or <literal><copy-message></literal>
603 (this is one advantage over using an external pager to view messages).
607 Also, the internal pager supports a couple other advanced features. For
608 one, it will accept and translate the <quote>standard</quote> nroff sequences for
609 bold and underline. These sequences are a series of either the letter,
610 backspace (ˆH), the letter again for bold or the letter, backspace,
611 <quote>_</quote> for denoting underline. Mutt will attempt to display these
612 in bold and underline respectively if your terminal supports them. If
613 not, you can use the bold and underline <link linkend="color">color</link>
614 objects to specify a color or mono attribute for them.
618 Additionally, the internal pager supports the ANSI escape sequences for
619 character attributes. Mutt translates them into the correct color and
620 character settings. The sequences Mutt supports are:
624 \e[<emphasis>Ps</emphasis>;<emphasis>Ps</emphasis>;..<emphasis>Ps</emphasis>;m
628 where <emphasis>Ps</emphasis> can be one of the codes shown in
629 <xref linkend="tab-ansi-esc"/>.
632 <table id="tab-ansi-esc">
633 <title>ANSI escape sequences</title>
636 <row><entry>Escape code</entry><entry>Description</entry></row>
639 <row><entry>0</entry><entry>All attributes off</entry></row>
640 <row><entry>1</entry><entry>Bold on</entry></row>
641 <row><entry>4</entry><entry>Underline on</entry></row>
642 <row><entry>5</entry><entry>Blink on</entry></row>
643 <row><entry>7</entry><entry>Reverse video on</entry></row>
644 <row><entry>3<emphasis><color></emphasis></entry><entry>Foreground color is <emphasis><color></emphasis> (see <xref linkend="tab-color"/>)</entry></row>
645 <row><entry>4<emphasis><color></emphasis></entry><entry>Background color is <emphasis><color></emphasis> (see <xref linkend="tab-color"/>)</entry></row>
650 <table id="tab-color">
651 <title>Color sequences</title>
654 <row><entry>Color code</entry><entry>Color</entry></row>
657 <row><entry>0</entry><entry>Black</entry></row>
658 <row><entry>1</entry><entry>Red</entry></row>
659 <row><entry>2</entry><entry>Green</entry></row>
660 <row><entry>3</entry><entry>Yellow</entry></row>
661 <row><entry>4</entry><entry>Blue</entry></row>
662 <row><entry>5</entry><entry>Magenta</entry></row>
663 <row><entry>6</entry><entry>Cyan</entry></row>
664 <row><entry>7</entry><entry>White</entry></row>
670 Mutt uses these attributes for handling <literal>text/enriched</literal>
671 messages, and they can also be used by an external
672 <link linkend="auto-view">autoview</link> script for highlighting
678 If you change the colors for your
679 display, for example by changing the color associated with color2 for
680 your xterm, then that color will be used instead of green.
686 Note that the search commands in the pager take regular expressions,
687 which are not quite the same as the more
688 complex <link linkend="patterns">patterns</link> used by the search
689 command in the index. This is because the pager only performs simple
690 text search, whereas the index provides boolean filtering on several
698 <title>Threaded Mode</title>
701 When the mailbox is <link linkend="sort">sorted</link> by <emphasis>threads</emphasis>, there are
702 a few additional functions available in the <emphasis>index</emphasis> and <emphasis>pager</emphasis> modes
703 as shown in <xref linkend="tab-key-threads"/>.
706 <table id="tab-key-threads">
707 <title>Most common thread mode keys</title>
710 <row><entry>Key</entry><entry>Function</entry><entry>Description</entry></row>
713 <row><entry>ˆD</entry><entry><literal><delete-thread></literal></entry><entry>delete all messages in the current thread</entry></row>
714 <row><entry>ˆU</entry><entry><literal><undelete-thread></literal></entry><entry>undelete all messages in the current thread</entry></row>
715 <row><entry>ˆN</entry><entry><literal><next-thread></literal></entry><entry>jump to the start of the next thread</entry></row>
716 <row><entry>ˆP</entry><entry><literal><previous-thread></literal></entry><entry>jump to the start of the previous thread</entry></row>
717 <row><entry>ˆR</entry><entry><literal><read-thread></literal></entry><entry>mark the current thread as read</entry></row>
718 <row><entry>Esc d</entry><entry><literal><delete-subthread></literal></entry><entry>delete all messages in the current subthread</entry></row>
719 <row><entry>Esc u</entry><entry><literal><undelete-subthread></literal></entry><entry>undelete all messages in the current subthread</entry></row>
720 <row><entry>Esc n</entry><entry><literal><next-subthread></literal></entry><entry>jump to the start of the next subthread</entry></row>
721 <row><entry>Esc p</entry><entry><literal><previous-subthread></literal></entry><entry>jump to the start of the previous subthread</entry></row>
722 <row><entry>Esc r</entry><entry><literal><read-subthread></literal></entry><entry>mark the current subthread as read</entry></row>
723 <row><entry>Esc t</entry><entry><literal><tag-thread></literal></entry><entry>toggle the tag on the current thread</entry></row>
724 <row><entry>Esc v</entry><entry><literal><collapse-thread></literal></entry><entry>toggle collapse for the current thread</entry></row>
725 <row><entry>Esc V</entry><entry><literal><collapse-all></literal></entry><entry>toggle collapse for all threads</entry></row>
726 <row><entry>P</entry><entry><literal><parent-message></literal></entry><entry>jump to parent message in thread</entry></row>
733 Collapsing a thread displays only the first message
734 in the thread and hides the others. This is useful when threads
735 contain so many messages that you can only see a handful of threads on
736 the screen. See %M in <link linkend="index-format">$index_format</link>.
737 For example, you could use "%?M?(#%03M)&(%4l)?" in <link linkend="index-format">$index_format</link> to optionally
738 display the number of hidden messages if the thread is collapsed.
743 See also: <link linkend="strict-threads">$strict_threads</link>.
748 <sect2 id="reading-misc">
749 <title>Miscellaneous Functions</title>
752 In addition, the <emphasis>index</emphasis> and <emphasis>pager</emphasis>
753 menus have these interesting functions:
760 <literal><create-alias></literal><anchor id="create-alias"/> (default: a)
764 Creates a new alias based upon the current message (or prompts for a
765 new one). Once editing is complete, an <link linkend="alias">alias</link>
766 command is added to the file specified by
767 the <link linkend="alias-file">$alias_file</link> variable
773 Mutt does not read the <link linkend="alias-file">$alias_file</link>
774 upon startup so you must explicitly <link linkend="source">source</link> the file.
782 <literal><check-traditional-pgp></literal><anchor id="check-traditional-pgp"/> (default: Esc P)
786 This function will search the current message for content signed or
787 encrypted with PGP the <quote>traditional</quote> way, that is, without proper
788 MIME tagging. Technically, this function will temporarily change
789 the MIME content types of the body parts containing PGP data; this
790 is similar to the <link linkend="edit-type"><literal><edit-type></literal></link> function's
798 <literal><edit></literal><anchor id="edit"/> (default: e)
802 This command (available in the index and pager) allows you to
803 edit the raw current message as it's present in the mail folder.
804 After you have finished editing, the changed message will be
805 appended to the current folder, and the original message will be
806 marked for deletion; if the message is unchanged it won't be replaced.
813 <literal><edit-type></literal><anchor id="edit-type"/> (default:
814 ˆE on the attachment menu, and in the pager and index menus;
815 ˆT on the compose menu)
819 This command is used to temporarily edit an attachment's content
820 type to fix, for instance, bogus character set parameters. When
821 invoked from the index or from the pager, you'll have the
822 opportunity to edit the top-level attachment's content type. On the
823 <link linkend="attach-menu">attachment menu</link>, you can change any
824 attachment's content type. These changes are not persistent, and get
825 lost upon changing folders.
829 Note that this command is also available on the <link linkend="compose-menu">compose
830 menu</link>. There, it's used to fine-tune the properties of attachments you are going
838 <literal><enter-command></literal><anchor id="enter-command"/> (default: <quote>:</quote>)
842 This command is used to execute any command you would normally put in a
843 configuration file. A common use is to check the settings of variables, or
844 in conjunction with <link linkend="macro">macros</link> to change settings on the
852 <literal><extract-keys></literal><anchor id="extract-keys"/> (default: ˆK)
856 This command extracts PGP public keys from the current or tagged
857 message(s) and adds them to your PGP public key ring.
864 <literal><forget-passphrase></literal><anchor id="forget-passphrase"/> (default:
869 This command wipes the passphrase(s) from memory. It is useful, if
870 you misspelled the passphrase.
877 <literal><list-reply></literal><anchor id="list-reply"/> (default: L)
881 Reply to the current or tagged message(s) by extracting any addresses which
882 match the regular expressions given by the <link linkend="lists">lists or subscribe</link>
883 commands, but also honor any <literal>Mail-Followup-To</literal> header(s) if the
884 <link linkend="honor-followup-to">$honor_followup_to</link>
885 configuration variable is set. Using this when replying to messages posted
886 to mailing lists helps avoid duplicate copies being sent to the author of
887 the message you are replying to.
894 <literal><pipe-message></literal><anchor id="pipe-message"/> (default: |)
898 Asks for an external Unix command and pipes the current or
899 tagged message(s) to it. The variables <link linkend="pipe-decode">$pipe_decode</link>, <link linkend="pipe-split">$pipe_split</link>,
900 <link linkend="pipe-sep">$pipe_sep</link> and <link linkend="wait-key">$wait_key</link> control the exact behavior of this function.
907 <literal><resend-message></literal><anchor id="resend-message"/> (default: Esc e)
911 Mutt takes the current message as a template for a
912 new message. This function is best described as "recall from arbitrary
913 folders". It can conveniently be used to forward MIME messages while
914 preserving the original mail structure. Note that the amount of headers
915 included here depends on the value of the <link linkend="weed">$weed</link>
920 This function is also available from the attachment menu. You can use this
921 to easily resend a message which was included with a bounce message
922 as a <literal>message/rfc822</literal> body part.
929 <literal><shell-escape></literal><anchor id="shell-escape"/> (default: !)
933 Asks for an external Unix command and executes it. The <link linkend="wait-key">$wait_key</link> can be used to control
934 whether Mutt will wait for a key to be pressed when the command returns
935 (presumably to let the user read the output of the command), based on
936 the return status of the named command. If no command is given, an
937 interactive shell is executed.
944 <literal><toggle-quoted></literal><anchor id="toggle-quoted"/> (default: T)
948 The pager uses the <link linkend="quote-regexp">$quote_regexp</link> variable to detect quoted text when
949 displaying the body of the message. This function toggles the display
950 of the quoted material in the message. It is particularly useful when
951 being interested in just the response and there is a large amount of
952 quoted text in the way.
959 <literal><skip-quoted></literal><anchor id="skip-quoted"/> (default: S)
963 This function will go to the next line of non-quoted text which comes
964 after a line of quoted text in the internal pager.
976 <title>Sending Mail</title>
978 <sect2 id="sending-intro">
979 <title>Introduction</title>
982 The bindings shown in <xref linkend="tab-key-send"/> are available in the
983 <emphasis>index</emphasis> and <emphasis>pager</emphasis> to start a new message.
986 <table id="tab-key-send">
987 <title>Most common mail sending keys</title>
990 <row><entry>Key</entry><entry>Function</entry><entry>Description</entry></row>
993 <row><entry>m</entry><entry><literal><compose></literal></entry><entry>compose a new message</entry></row>
994 <row><entry>r</entry><entry><literal><reply></literal></entry><entry>reply to sender</entry></row>
995 <row><entry>g</entry><entry><literal><group-reply></literal></entry><entry>reply to all recipients</entry></row>
996 <row><entry>L</entry><entry><literal><list-reply></literal></entry><entry>reply to mailing list address</entry></row>
997 <row><entry>f</entry><entry><literal><forward></literal></entry><entry>forward message</entry></row>
998 <row><entry>b</entry><entry><literal><bounce></literal></entry><entry>bounce (remail) message</entry></row>
999 <row><entry>Esc k</entry><entry><literal><mail-key></literal></entry><entry>mail a PGP public key to someone</entry></row>
1005 <emphasis>Bouncing</emphasis> a message sends the message as-is to the recipient you
1006 specify. <emphasis>Forwarding</emphasis> a message allows you to add comments or
1007 modify the message you are forwarding. These items are discussed
1008 in greater detail in the next chapter <quote><link linkend="forwarding-mail">Forwarding
1009 and Bouncing Mail</link>.</quote>
1013 Mutt will then enter the <emphasis>compose</emphasis> menu and prompt you for the
1014 recipients to place on the <quote>To:</quote> header field. Next, it will ask
1015 you for the <quote>Subject:</quote> field for the message, providing a default if
1016 you are replying to or forwarding a message. See also
1017 <link linkend="askcc">$askcc</link>,
1018 <link linkend="askbcc">$askbcc</link>,
1019 <link linkend="autoedit">$autoedit</link>,
1020 <link linkend="bounce">$bounce</link>,
1021 <link linkend="fast-reply">$fast_reply</link>,
1022 and <link linkend="include">$include</link>
1023 for changing how Mutt asks these questions.
1027 Mutt will then automatically start your <link linkend="editor">$editor</link>
1028 on the message body. If the <link linkend="edit-headers">$edit_headers</link>
1029 variable is set, the headers will be at the top of the message in your editor.
1030 Any messages you are replying to will be added in sort order to the message,
1031 with appropriate <link linkend="attribution">$attribution</link>,
1032 <link linkend="indent-string">$indent_string</link> and
1033 <link linkend="post-indent-string">$post_indent_string</link>.
1034 When forwarding a message, if the <link linkend="mime-forward">$mime_forward</link>
1035 variable is unset, a copy of the forwarded message will be included. If
1036 you have specified a <link linkend="signature">$signature</link>, it
1037 will be appended to the message.
1041 Once you have finished editing the body of your mail message, you are
1042 returned to the <emphasis>compose</emphasis> menu providing the functions
1043 shown in <xref linkend="tab-func-compose"/> to modify, send or postpone the
1047 <table id="tab-func-compose">
1048 <title>Most common compose menu keys</title>
1051 <row><entry>Key</entry><entry>Function</entry><entry>Description</entry></row>
1054 <row><entry>a</entry><entry><literal><attach-file></literal></entry><entry>attach a file</entry></row>
1055 <row><entry>A</entry><entry><literal><attach-message></literal></entry><entry>attach message(s) to the message</entry></row>
1056 <row><entry>Esc k</entry><entry><literal><attach-key></literal></entry><entry>attach a PGP public key</entry></row>
1057 <row><entry>d</entry><entry><literal><edit-description></literal></entry><entry>edit description on attachment</entry></row>
1058 <row><entry>D</entry><entry><literal><detach-file></literal></entry><entry>detach a file</entry></row>
1059 <row><entry>t</entry><entry><literal><edit-to></literal></entry><entry>edit the To field</entry></row>
1060 <row><entry>Esc f</entry><entry><literal><edit-from></literal></entry><entry>edit the From field</entry></row>
1061 <row><entry>r</entry><entry><literal><edit-reply-to></literal></entry><entry>edit the Reply-To field</entry></row>
1062 <row><entry>c</entry><entry><literal><edit-cc></literal></entry><entry>edit the Cc field</entry></row>
1063 <row><entry>b</entry><entry><literal><edit-bcc></literal></entry><entry>edit the Bcc field</entry></row>
1064 <row><entry>y</entry><entry><literal><send-message></literal></entry><entry>send the message</entry></row>
1065 <row><entry>s</entry><entry><literal><edit-subject></literal></entry><entry>edit the Subject</entry></row>
1066 <row><entry>S</entry><entry><literal><smime-menu></literal></entry><entry>select S/MIME options</entry></row>
1067 <row><entry>f</entry><entry><literal><edit-fcc></literal></entry><entry>specify an <quote>Fcc</quote> mailbox</entry></row>
1068 <row><entry>p</entry><entry><literal><pgp-menu></literal></entry><entry>select PGP options</entry></row>
1069 <row><entry>P</entry><entry><literal><postpone-message></literal></entry><entry>postpone this message until later</entry></row>
1070 <row><entry>q</entry><entry><literal><quit></literal></entry><entry>quit (abort) sending the message</entry></row>
1071 <row><entry>w</entry><entry><literal><write-fcc></literal></entry><entry>write the message to a folder</entry></row>
1072 <row><entry>i</entry><entry><literal><ispell></literal></entry><entry>check spelling (if available on your system)</entry></row>
1073 <row><entry>ˆF</entry><entry><literal><forget-passphrase></literal></entry><entry>wipe passphrase(s) from memory</entry></row>
1079 The compose menu is also used to edit the attachments for a message which can be either files
1080 or other messages. The <literal><attach-message></literal> function to will prompt you for a folder to
1081 attach messages from. You can now tag messages in that folder and they
1082 will be attached to the message you are sending.
1088 operations like composing a new mail, replying, forwarding, etc. are
1089 not permitted when you are in that folder. The %r in
1090 <link linkend="status-format">$status_format</link> will change to
1091 a <quote>A</quote> to indicate that you are in attach-message mode.
1097 <sect2 id="edit-header">
1098 <title>Editing the message header</title>
1101 When editing the header because of <link linkend="edit-headers">$edit_headers</link>
1102 being set, there are a several pseudo headers available which
1103 will not be included in sent messages.
1106 <sect3 id="fcc-header">
1107 <title>Fcc: pseudo header</title>
1112 <literal>Fcc:</literal> <emphasis>filename</emphasis>
1114 as a header, Mutt will pick up <emphasis>filename</emphasis>
1115 just as if you had used the <literal><edit-fcc></literal> function in the <emphasis>compose</emphasis> menu.
1120 <sect3 id="attach-header">
1121 <title>Attach: pseudo header</title>
1124 You can also attach files to your message by specifying
1126 <literal>Attach:</literal> <emphasis>filename</emphasis> [ <emphasis>description</emphasis> ]
1128 where <emphasis>filename</emphasis> is the file to attach and <emphasis>description</emphasis> is an
1129 optional string to use as the description of the attached file.
1134 <sect3 id="pgp-header">
1135 <title>Pgp: pseudo header</title>
1138 If you want to use PGP, you can specify
1142 <literal>Pgp:</literal> [ <literal>E</literal> | <literal>S</literal> | <literal>S</literal><emphasis><id></emphasis> ]
1147 <quote>E</quote> selects encryption, <quote>S</quote> selects signing and
1148 <quote>S<id></quote> selects signing with the given key, setting
1149 <link linkend="pgp-sign-as">$pgp_sign_as</link>
1155 <sect3 id="in-reply-to-header">
1156 <title>In-Reply-To: header</title>
1159 When replying to messages, the <emphasis>In-Reply-To:</emphasis> header contains the
1160 Message-Id of the message(s) you reply to. If you remove its value, Mutt will not generate a
1161 <emphasis>References:</emphasis> field, which allows you to create a new message thread, for example
1162 to create a new message to a mailing list without having to enter the mailing list's address.
1169 <sect2 id="sending-crypto">
1170 <title>Sending cryptographically signed/encrypted messages</title>
1173 If you have told mutt to PGP or S/MIME encrypt a message, it will guide you
1174 through a key selection process when you try to send the message.
1175 Mutt will not ask you any questions about keys which have a
1176 certified user ID matching one of the message recipients' mail
1177 addresses. However, there may be situations in which there are
1178 several keys, weakly certified user ID fields, or where no matching
1183 In these cases, you are dropped into a menu with a list of keys from
1184 which you can select one. When you quit this menu, or mutt can't
1185 find any matching keys, you are prompted for a user ID. You can, as
1186 usually, abort this prompt using <literal>ˆG</literal>. When you do so, mutt will
1187 return to the compose screen.
1191 Once you have successfully finished the key selection, the message
1192 will be encrypted using the selected public keys when sent out.
1196 Most fields of the entries in the key selection menu (see also <link linkend="pgp-entry-format">$pgp_entry_format</link>)
1197 have obvious meanings. But some explanations on the capabilities, flags,
1198 and validity fields are in order.
1202 The flags sequence (%f) will expand to one of the flags in
1203 <xref linkend="tab-pgp-menuflags"/>.
1206 <table id="tab-pgp-menuflags">
1207 <title>PGP key menu flags</title>
1210 <row><entry>Flag</entry><entry>Description</entry></row>
1213 <row><entry>R</entry><entry>The key has been revoked and can't be used.</entry></row>
1214 <row><entry>X</entry><entry>The key is expired and can't be used.</entry></row>
1215 <row><entry>d</entry><entry>You have marked the key as disabled.</entry></row>
1216 <row><entry>c</entry><entry>There are unknown critical self-signature packets.</entry></row>
1222 The capabilities field (%c) expands to a two-character sequence
1223 representing a key's capabilities. The first character gives
1224 the key's encryption capabilities: A minus sign (<quote>-</quote>) means
1225 that the key cannot be used for encryption. A dot (<quote>.</quote>) means that
1226 it's marked as a signature key in one of the user IDs, but may
1227 also be used for encryption. The letter <quote>e</quote> indicates that
1228 this key can be used for encryption.
1232 The second character indicates the key's signing capabilities. Once
1233 again, a <quote>-</quote> implies <quote>not for signing</quote>, <quote>.</quote> implies
1234 that the key is marked as an encryption key in one of the user-ids, and
1235 <quote>s</quote> denotes a key which can be used for signing.
1239 Finally, the validity field (%t) indicates how well-certified a user-id
1240 is. A question mark (<quote>?</quote>) indicates undefined validity, a minus
1241 character (<quote>-</quote>) marks an untrusted association, a space character
1242 means a partially trusted association, and a plus character (<quote>+</quote>)
1243 indicates complete validity.
1248 <sect2 id="sending-mixmaster">
1249 <title>Sending anonymous messages via mixmaster</title>
1252 You may also have compiled mutt to co-operate with Mixmaster, an
1253 anonymous remailer. Mixmaster permits you to send your messages
1254 anonymously using a chain of remailers. Mixmaster support in mutt is for
1255 mixmaster version 2.04 (beta 45 appears to be the latest) and 2.03.
1256 It does not support earlier versions or the later so-called version 3 betas,
1257 of which the latest appears to be called 2.9b23.
1261 To use it, you'll have to obey certain restrictions. Most
1262 important, you cannot use the <literal>Cc</literal> and <literal>Bcc</literal> headers. To tell
1263 Mutt to use mixmaster, you have to select a remailer chain, using
1264 the mix function on the compose menu.
1268 The chain selection screen is divided into two parts. In the
1269 (larger) upper part, you get a list of remailers you may use. In
1270 the lower part, you see the currently selected chain of remailers.
1274 You can navigate in the chain using the <literal><chain-prev></literal> and
1275 <literal><chain-next></literal> functions, which are by default bound to the left
1276 and right arrows and to the <literal>h</literal> and <literal>l</literal> keys (think vi
1277 keyboard bindings). To insert a remailer at the current chain
1278 position, use the <literal><insert></literal> function. To append a remailer behind
1279 the current chain position, use <literal><select-entry></literal> or <literal><append></literal>.
1280 You can also delete entries from the chain, using the corresponding
1281 function. Finally, to abandon your changes, leave the menu, or
1282 <literal><accept></literal> them pressing (by default) the <literal>Return</literal> key.
1286 Note that different remailers do have different capabilities,
1287 indicated in the %c entry of the remailer menu lines (see
1288 <link linkend="mix-entry-format">$mix_entry_format</link>). Most important is
1289 the <quote>middleman</quote> capability, indicated by a capital <quote>M</quote>: This
1290 means that the remailer in question cannot be used as the final
1291 element of a chain, but will only forward messages to other
1292 mixmaster remailers. For details on the other capabilities, please
1293 have a look at the mixmaster documentation.
1299 <title>Sending format=flowed messages</title>
1301 <sect3 id="ff-concept">
1302 <title>Concept</title>
1305 <literal>format=flowed</literal>-style messages (or <literal>f=f</literal>
1306 for short) are <literal>text/plain</literal> messages that consist of paragraphs which a receiver's
1307 mail client may reformat to its own needs which mostly means to
1308 customize line lengths regardless of what the sender sent. Technically this is
1309 achieved by letting lines of a <quote>flowable</quote> paragraph end in spaces
1310 except for the last line.
1314 While for text-mode clients like mutt it's the best way to assume only a
1315 standard 80x25 character cell terminal, it may be desired to let the
1316 receiver decide completely how to view a message.
1321 <sect3 id="ff-support">
1322 <title>Mutt support</title>
1325 Mutt only supports setting the required <literal>format=flowed</literal>
1326 MIME parameter on outgoing messages if the <link
1327 linkend="text-flowed">$text_flowed</link>
1328 variable is set, specifically it does not add the
1333 After editing the initial message text and before entering
1334 the compose menu, mutt properly space-stuffes the message.
1335 <emphasis>Space-stuffing</emphasis> is required by RfC3676 defining
1336 <literal>format=flowed</literal> and means to prepend a space to:
1340 <listitem><para>all lines starting with a space</para></listitem>
1341 <listitem><para>lines starting with the word <quote><literal>From</literal></quote>
1342 followed by space</para></listitem>
1343 <listitem><para>all lines starting with <quote><literal>></literal></quote> which
1344 is not intended to be a quote character</para></listitem>
1349 Mutt only supports space-stuffing
1350 for the first two types of lines but not for the third: It is impossible to
1351 safely detect whether a leading <literal>></literal> character starts a
1352 quote or not. Furthermore, Mutt only applies space-stuffing
1353 <emphasis>once</emphasis> after the initial edit is finished.
1358 All leading spaces are to be removed by receiving clients to restore
1359 the original message prior to further processing.
1364 <sect3 id="ff-editor">
1365 <title>Editor considerations</title>
1368 As mutt provides no additional features to compose <literal>f=f</literal>
1369 messages, it's completely up to the user and his editor to produce
1370 proper messages. Please consider your editor's documentation if you
1371 intend to send <literal>f=f</literal> messages.
1375 Please note that when editing messages from the compose menu several
1376 times before really sending a mail, it's up to the user to ensure that
1377 the message is properly space-stuffed.
1381 For example, <emphasis>vim</emphasis> provides the <literal>w</literal>
1382 flag for its <literal>formatoptions</literal> setting to assist in
1383 creating <literal>f=f</literal> messages, see <literal>:help
1384 fo-table</literal> for details.
1393 <sect1 id="forwarding-mail">
1394 <title>Forwarding and Bouncing Mail</title>
1397 Bouncing and forwarding let you send an existing message to recipients
1398 that you specify. Bouncing a message sends a verbatim copy of a message
1399 to alternative addresses as if they were the message's original
1400 recipients specified in the Bcc header.
1401 Forwarding a message, on the other hand, allows you to modify the message
1402 before it is resent (for example, by adding your own comments). Bouncing
1403 is done using the <literal><bounce></literal> function and forwarding
1404 using the <literal><forward></literal> function bound to <quote>b</quote> and <quote>f</quote>
1409 Forwarding can be done by including the original message in the new
1410 message's body (surrounded by indicating lines) or including it as a MIME
1411 attachment, depending on the value of the <link linkend="mime-forward">$mime_forward</link> variable. Decoding of attachments,
1412 like in the pager, can be controlled by the <link linkend="forward-decode">$forward_decode</link> and <link linkend="mime-forward-decode">$mime_forward_decode</link> variables,
1413 respectively. The desired forwarding format may depend on the content,
1414 therefore <emphasis>$mime_forward</emphasis> is a quadoption which, for
1415 example, can be set to <quote>ask-no</quote>.
1419 The inclusion of headers is controlled by the current setting of the
1420 <link linkend="weed">$weed</link> variable, unless <link linkend="mime-forward">$mime_forward</link> is set.
1424 Editing the message to forward follows the same procedure as sending or
1425 replying to a message does.
1430 <sect1 id="postponing-mail">
1431 <title>Postponing Mail</title>
1434 At times it is desirable to delay sending a message that you have
1435 already begun to compose. When the <literal><postpone-message></literal> function is
1436 used in the <emphasis>compose</emphasis> menu, the body of your message and attachments
1437 are stored in the mailbox specified by the <link linkend="postponed">$postponed</link> variable. This means that you can recall the
1438 message even if you exit Mutt and then restart it at a later time.
1442 Once a message is postponed, there are several ways to resume it. From the
1443 command line you can use the <quote>-p</quote> option, or if you compose a new
1444 message from the <emphasis>index</emphasis> or <emphasis>pager</emphasis> you will be prompted if postponed
1445 messages exist. If multiple messages are currently postponed, the
1446 <emphasis>postponed</emphasis> menu will pop up and you can select which message you would
1452 If you postpone a reply to a message, the reply setting of
1453 the message is only updated when you actually finish the message and
1454 send it. Also, you must be in the same folder with the message you
1455 replied to for the status of the message to be updated.
1460 See also the <link linkend="postpone">$postpone</link> quad-option.
1467 <chapter id="configuration">
1468 <title>Configuration</title>
1470 <sect1 id="configuration-files">
1471 <title>Location of initialization files</title>
1474 While the default configuration (or <quote>preferences</quote>) make Mutt
1475 usable right out of the box, it is often desirable to tailor Mutt to
1476 suit your own tastes. When Mutt is first invoked, it will attempt to
1477 read the <quote>system</quote> configuration file (defaults set by your local
1478 system administrator), unless the <quote>-n</quote> <link linkend="commandline">command line</link> option is specified. This file is typically
1479 <literal>/usr/local/share/mutt/Muttrc</literal> or <literal>/etc/Muttrc</literal>. Mutt
1480 will next look for a file named <literal>.muttrc</literal> in your home
1481 directory. If this file does not exist and your home directory has
1482 a subdirectory named <literal>.mutt</literal>, mutt try to load a file named
1483 <literal>.mutt/muttrc</literal>.
1487 <literal>.muttrc</literal> is the file where you will usually place your <link linkend="commands">commands</link> to configure Mutt.
1491 In addition, mutt supports version specific configuration files that are
1492 parsed instead of the default files as explained above. For instance, if
1493 your system has a <literal>Muttrc-0.88</literal> file in the system configuration
1494 directory, and you are running version 0.88 of mutt, this file will be
1495 sourced instead of the <literal>Muttrc</literal> file. The same is true of the user
1496 configuration file, if you have a file <literal>.muttrc-0.88.6</literal> in your home
1497 directory, when you run mutt version 0.88.6, it will source this file
1498 instead of the default <literal>.muttrc</literal> file. The version number is the
1499 same which is visible using the <quote>-v</quote> <link linkend="commandline">command line</link> switch or using the <literal>show-version</literal> key (default:
1500 V) from the index menu.
1505 <sect1 id="muttrc-syntax" xreflabel="Syntax of Initialization Files">
1506 <title>Syntax of Initialization Files</title>
1509 An initialization file consists of a series of <link linkend="commands">commands</link>. Each line of the file may contain one or more commands.
1510 When multiple commands are used, they must be separated by a semicolon
1514 <example id="ex-rc-multiple-cmds">
1515 <title>Multiple configuration commands per line</title>
1517 set realname='Mutt user' ; ignore x-
1522 The hash mark, or pound sign
1523 (<quote>#</quote>), is used as a <quote>comment</quote> character. You can use it to
1524 annotate your initialization file. All text after the comment character
1525 to the end of the line is ignored. For example,
1528 <example id="ex-ec-comment">
1529 <title>Commenting configuration files</title>
1531 my_hdr X-Disclaimer: Why are you listening to me? # This is a comment
1536 Single quotes (') and double quotes (") can be used to quote strings
1537 which contain spaces or other special characters. The difference between
1538 the two types of quotes is similar to that of many popular shell programs,
1539 namely that a single quote is used to specify a literal string (one that is
1540 not interpreted for shell variables or quoting with a backslash [see
1541 next paragraph]), while double quotes indicate a string for which
1542 should be evaluated. For example, backticks are evaluated inside of double
1543 quotes, but <emphasis role="bold">not</emphasis> for single quotes.
1547 \ quotes the next character, just as in shells such as bash and zsh.
1548 For example, if want to put quotes <quote>"</quote> inside of a string, you can use
1549 <quote>\</quote> to force the next character to be a literal instead of interpreted
1553 <example id="ex-rc-quote">
1554 <title>Escaping quotes in congfiguration files</title>
1556 set realname="Michael \"MuttDude\" Elkins"
1561 <quote>\\</quote> means to insert a literal <quote>\</quote> into the line.
1562 <quote>\n</quote> and <quote>\r</quote> have their usual C meanings of linefeed and
1563 carriage-return, respectively.
1567 A \ at the end of a line can be used to split commands over
1568 multiple lines, provided that the split points don't appear in the
1569 middle of command names.
1573 It is also possible to substitute the output of a Unix command in an
1574 initialization file. This is accomplished by enclosing the command in
1575 backticks (``). For example,
1578 <example id="ex-rc-backtick">
1579 <title>Using external command's output in configuration files</title>
1581 my_hdr X-Operating-System: `uname -a`
1586 The output of the Unix command <quote>uname -a</quote> will be substituted before the
1592 Since initialization files are line oriented, only
1593 the first line of output from the Unix command will be substituted.
1598 Both environment variables and mutt variables can be accessed by
1599 prepending <quote>$</quote> to the name of the variable. For example,
1602 <example id="ex-rc-env">
1603 <title>Using environment variables in configuration files</title>
1605 set record=+sent_on_$HOSTNAME
1610 will cause mutt to save outgoing messages to a folder named
1611 <quote>sent_on_kremvax</quote> if the environment variable HOSTNAME is set to
1612 <quote>kremvax.</quote> (See <link linkend="record">$record</link> for
1617 Mutt expands the variable when it is assigned, not when it is used. If
1618 the value of a variable on the right-hand side of an assignment
1619 changes after the assignment, the variable on the left-hand side will
1624 The commands understood by mutt are explained in the next paragraphs.
1625 For a complete list, see the <link linkend="commands">command reference</link>.
1629 All configuration files are expected to be in the current locale as
1630 specified by the <link linkend="charset">$charset</link> variable
1631 which doesn't have a default value since it's determined by Mutt at startup.
1632 If a configuration file is not encoded in the same character set the
1633 <link linkend="config-charset">$config_charset</link>
1634 variable should be used: all lines starting with the next are recoded
1635 from $config_charset to $charset.
1639 This mechanism should be avoided if possible as it has the
1640 following implications:
1645 <listitem><para>These variables should be set early in a configuration
1646 file with $charset preceding $config_charset so Mutt
1647 know what character set to convert to.</para></listitem>
1649 <listitem><para>If $config_charset is set, it should be set
1650 in each configuration file because the value is global and <emphasis>not</emphasis>
1651 per configuration file.</para></listitem>
1653 <listitem><para>Because Mutt first recodes a line before it attempts to parse it,
1654 a conversion introducing question marks or other characters as
1655 part of errors (unconvertable characters, transliteration) may introduce syntax
1656 errors or silently change the meaning of certain tokens (e.g. inserting
1657 question marks into regular expressions).</para></listitem>
1663 <sect1 id="addrgroup">
1664 <title>Address groups</title>
1669 <command>group</command>
1670 <arg choice="opt" rep="repeat">
1671 <option>-group</option>
1672 <replaceable class="parameter">name</replaceable>
1674 <group choice="req">
1675 <arg choice="plain" rep="repeat">
1676 <option>-rx</option>
1677 <replaceable class="parameter">expr</replaceable>
1679 <arg choice="plain" rep="repeat">
1680 <option>-addr</option>
1681 <replaceable class="parameter">expr</replaceable>
1687 <command>ungroup</command>
1688 <arg choice="opt" rep="repeat">
1689 <option>-group</option>
1690 <replaceable class="parameter">name</replaceable>
1692 <group choice="req">
1693 <arg choice="plain">
1694 <replaceable class="parameter">*</replaceable>
1696 <arg choice="plain" rep="repeat">
1697 <option>-rx</option>
1698 <replaceable class="parameter">expr</replaceable>
1700 <arg choice="plain" rep="repeat">
1701 <option>-addr</option>
1702 <replaceable class="parameter">expr</replaceable>
1708 <literal>group</literal> is used to directly add either addresses or
1709 regular expressions to the specified group or groups. The different
1710 categories of arguments to the <literal>group</literal> command can be
1711 in any order. The flags <literal>-rx</literal> and
1712 <literal>-addr</literal> specify what the following strings (that cannot
1713 begin with a hyphen) should be interpreted as: either a regular
1714 expression or an email address, respectively.
1718 These address groups can also be created implicitly by the
1719 <link linkend="alias">alias</link>, <link linkend="lists">lists</link>,
1720 <link linkend="lists">subscribe</link> and
1721 <link linkend="alternates">alternates</link> commands by specifying the
1722 optional <literal>-group</literal> option.
1726 Once defined, these address groups can be used in
1727 <link linkend="patterns">patterns</link> to search for and limit the
1728 display to messages matching a group.
1732 <literal>ungroup</literal> is used to remove addresses or regular
1733 expressions from the specified group or groups. The syntax is similar to
1734 the <literal>group</literal> command, however the special character
1735 <literal>*</literal> can be used to empty a group of all of its
1742 <title>Defining/Using aliases</title>
1747 <command>alias</command>
1748 <arg choice="opt" rep="repeat">
1749 <option>-group</option>
1750 <replaceable class="parameter">name</replaceable>
1752 <arg choice="plain">
1753 <replaceable class="parameter">key</replaceable>
1755 <arg choice="plain">
1756 <replaceable class="parameter">address</replaceable>
1758 <arg choice="opt" rep="repeat">
1759 <replaceable class="parameter">address</replaceable>
1764 It's usually very cumbersome to remember or type out the address of someone
1765 you are communicating with. Mutt allows you to create <quote>aliases</quote> which map
1766 a short string to a full address.
1771 If you want to create an alias for more than
1772 one address, you <emphasis role="bold">must</emphasis> separate the addresses with a comma (<quote>,</quote>).
1777 The optional <literal>-group</literal> argument to
1778 <literal>alias</literal> causes the aliased address(es) to be added to
1779 the named <emphasis>group</emphasis>.
1783 To remove an alias or aliases (<quote>*</quote> means all aliases):
1787 <command>unalias</command>
1788 <arg choice="opt" rep="repeat">
1789 <option>-group</option>
1790 <replaceable>name</replaceable>
1792 <group choice="req">
1793 <arg choice="plain">
1794 <replaceable class="parameter">*</replaceable>
1796 <arg choice="plain" rep="repeat">
1797 <replaceable class="parameter">key</replaceable>
1803 alias muttdude me@cs.hmc.edu (Michael Elkins)
1804 alias theguys manny, moe, jack
1808 Unlike other mailers, Mutt doesn't require aliases to be defined
1809 in a special file. The <literal>alias</literal> command can appear anywhere in
1810 a configuration file, as long as this file is <link linkend="source">sourced</link>. Consequently, you can have multiple alias files, or
1811 you can have all aliases defined in your muttrc.
1815 On the other hand, the <link linkend="create-alias"><literal><create-alias></literal></link>
1816 function can use only one file, the one pointed to by the <link linkend="alias-file">$alias_file</link> variable (which is
1817 <literal>˜/.muttrc</literal> by default). This file is not special either,
1818 in the sense that Mutt will happily append aliases to any file, but in
1819 order for the new aliases to take effect you need to explicitly <link linkend="source">source</link> this file too.
1826 <example id="ex-alias-external">
1827 <title>Configuring external alias files</title>
1829 source /usr/local/share/Mutt.aliases
1830 source ~/.mail_aliases
1831 set alias_file=~/.mail_aliases
1836 To use aliases, you merely use the alias at any place in mutt where mutt
1837 prompts for addresses, such as the <emphasis>To:</emphasis> or <emphasis>Cc:</emphasis> prompt. You can
1838 also enter aliases in your editor at the appropriate headers if you have the
1839 <link linkend="edit-headers">$edit_headers</link> variable set.
1843 In addition, at the various address prompts, you can use the tab character
1844 to expand a partial alias to the full alias. If there are multiple matches,
1845 mutt will bring up a menu with the matching aliases. In order to be
1846 presented with the full list of aliases, you must hit tab with out a partial
1847 alias, such as at the beginning of the prompt or after a comma denoting
1852 In the alias menu, you can select as many aliases as you want with the
1853 <literal>select-entry</literal> key (default: <Return>), and use the
1854 <emphasis>exit</emphasis> key (default: q) to return to the address prompt.
1860 <title>Changing the default key bindings</title>
1865 <command>bind</command>
1866 <arg choice="plain">
1867 <replaceable class="parameter">map</replaceable>
1869 <arg choice="plain">
1870 <replaceable class="parameter">key</replaceable>
1872 <arg choice="plain">
1873 <replaceable class="parameter">function</replaceable>
1878 This command allows you to change the default key bindings (operation
1879 invoked when pressing a key).
1883 <emphasis>map</emphasis> specifies in which menu the binding belongs. Multiple maps may
1884 be specified by separating them with commas (no additional whitespace is
1885 allowed). The currently defined maps are:
1892 <term>generic</term>
1895 This is not a real menu, but is used as a fallback for all of the other
1896 menus except for the pager and editor modes. If a key is not defined in
1897 another menu, Mutt will look for a binding to use in this menu. This allows
1898 you to bind a key to a certain function in multiple menus instead of having
1899 multiple bind statements to accomplish the same task.
1907 The alias menu is the list of your personal aliases as defined in your
1908 muttrc. It is the mapping from a short alias name to the full email
1909 address(es) of the recipient(s).
1917 The attachment menu is used to access the attachments on received messages.
1922 <term>browser</term>
1925 The browser is used for both browsing the local directory structure, and for
1926 listing all of your incoming mailboxes.
1934 The editor is the line-based editor the user enters text data.
1942 The index is the list of messages contained in a mailbox.
1947 <term>compose</term>
1950 The compose menu is the screen used when sending a new message.
1958 The pager is the mode used to display message/attachment data, and help
1967 The pgp menu is used to select the OpenPGP keys used to encrypt outgoing
1976 The smime menu is used to select the OpenSSL certificates used to encrypt outgoing
1982 <term>postpone</term>
1985 The postpone menu is similar to the index menu, except is used when
1986 recalling a message the user was composing, but saved until later.
1994 The query menu is the browser for results returned by
1995 <link linkend="query-command">$query_command</link>.
2003 The mixmaster screen is used to select remailer options for outgoing
2004 messages (if Mutt is compiled with Mixmaster support).
2011 <emphasis>key</emphasis> is the key (or key sequence) you wish to bind. To specify a
2012 control character, use the sequence <emphasis>\Cx</emphasis>, where <emphasis>x</emphasis> is the
2013 letter of the control character (for example, to specify control-A use
2014 <quote>\Ca</quote>). Note that the case of <emphasis>x</emphasis> as well as <emphasis>\C</emphasis> is
2015 ignored, so that <emphasis>\CA</emphasis>, <emphasis>\Ca</emphasis>, <emphasis>\cA</emphasis> and <emphasis>\ca</emphasis> are all
2016 equivalent. An alternative form is to specify the key as a three digit
2017 octal number prefixed with a <quote>\</quote> (for example <emphasis>\177</emphasis> is
2018 equivalent to <emphasis>\c?</emphasis>). In addition, <emphasis>key</emphasis> may
2019 be a symbolic name as shown in <xref linkend="tab-key-names"/>.
2022 <table id="tab-key-names">
2023 <title>Symbolic key names</title>
2026 <row><entry>Symbolic name</entry><entry>Meaning</entry></row>
2029 <row><entry>\t</entry><entry>tab</entry></row>
2030 <row><entry><tab></entry><entry>tab</entry></row>
2031 <row><entry><backtab></entry><entry>backtab / shift-tab</entry></row>
2032 <row><entry>\r</entry><entry>carriage return</entry></row>
2033 <row><entry>\n</entry><entry>newline</entry></row>
2034 <row><entry>\e</entry><entry>escape</entry></row>
2035 <row><entry><esc></entry><entry>escape</entry></row>
2036 <row><entry><up></entry><entry>up arrow</entry></row>
2037 <row><entry><down></entry><entry>down arrow</entry></row>
2038 <row><entry><left></entry><entry>left arrow</entry></row>
2039 <row><entry><right></entry><entry>right arrow</entry></row>
2040 <row><entry><pageup></entry><entry>Page Up</entry></row>
2041 <row><entry><pagedown></entry><entry>Page Down</entry></row>
2042 <row><entry><backspace></entry><entry>Backspace</entry></row>
2043 <row><entry><delete></entry><entry>Delete</entry></row>
2044 <row><entry><insert></entry><entry>Insert</entry></row>
2045 <row><entry><enter></entry><entry>Enter</entry></row>
2046 <row><entry><return></entry><entry>Return</entry></row>
2047 <row><entry><home></entry><entry>Home</entry></row>
2048 <row><entry><end></entry><entry>End</entry></row>
2049 <row><entry><space></entry><entry>Space bar</entry></row>
2050 <row><entry><f1></entry><entry>function key 1</entry></row>
2051 <row><entry><f10></entry><entry>function key 10</entry></row>
2057 <emphasis>key</emphasis> does not need to be enclosed in quotes unless it contains a
2058 space (<quote> </quote>) or semi-colon (<quote>;</quote>).
2062 <emphasis>function</emphasis> specifies which action to take when <emphasis>key</emphasis> is pressed.
2063 For a complete list of functions, see the <link linkend="functions">reference</link>. The special function <literal><noop></literal> unbinds the specified key
2069 <sect1 id="charset-hook">
2070 <title>Defining aliases for character sets </title>
2075 <command>charset-hook</command>
2076 <arg choice="plain">
2077 <replaceable class="parameter">alias</replaceable>
2079 <arg choice="plain">
2080 <replaceable class="parameter">charset</replaceable>
2085 <command>iconv-hook</command>
2086 <arg choice="plain">
2087 <replaceable class="parameter">charset</replaceable>
2089 <arg choice="plain">
2090 <replaceable class="parameter">local-charset</replaceable>
2095 The <literal>charset-hook</literal> command defines an alias for a character set.
2096 This is useful to properly display messages which are tagged with a
2097 character set name not known to mutt.
2101 The <literal>iconv-hook</literal> command defines a system-specific name for a
2102 character set. This is helpful when your systems character
2103 conversion library insists on using strange, system-specific names
2109 <sect1 id="folder-hook">
2110 <title>Setting variables based upon mailbox</title>
2115 <command>folder-hook</command>
2116 <arg choice="plain">
2117 <replaceable class="parameter">[!]regexp</replaceable>
2119 <arg choice="plain">
2120 <replaceable class="parameter">command</replaceable>
2125 It is often desirable to change settings based on which mailbox you are
2126 reading. The folder-hook command provides a method by which you can execute
2127 any configuration command. <emphasis>regexp</emphasis> is a regular expression specifying
2128 in which mailboxes to execute <emphasis>command</emphasis> before loading. If a mailbox
2129 matches multiple folder-hook's, they are executed in the order given in the
2135 If you use the <quote>!</quote> shortcut for <link linkend="spoolfile">$spoolfile</link> at the beginning of the pattern, you must place it
2136 inside of double or single quotes in order to distinguish it from the
2137 logical <emphasis>not</emphasis> operator for the expression.
2143 Settings are <emphasis>not</emphasis> restored when you leave the mailbox.
2144 For example, a command action to perform is to change the sorting method
2145 based upon the mailbox being read:
2150 folder-hook mutt set sort=threads
2154 However, the sorting method is not restored to its previous value when
2155 reading a different mailbox. To specify a <emphasis>default</emphasis> command, use the
2156 pattern <quote>.</quote> before other folder-hooks adjusting a value on a per-folder basis
2157 because folder-hooks are evaluated in the order given in the configuration file.
2158 The following example will set the <link linkend="sort">sort</link> variable
2159 to <literal>date-sent</literal> for all folders but to <literal>threads</literal>
2160 for all folders containing <quote>mutt</quote> in their name.
2163 <example id="ex-folder-sorting">
2164 <title>Setting sort method based on mailbox name</title>
2166 folder-hook . set sort=date-sent
2167 folder-hook mutt set sort=threads
2174 <title>Keyboard macros</title>
2179 <command>macro</command>
2180 <arg choice="plain">
2181 <replaceable class="parameter">menu</replaceable>
2183 <arg choice="plain">
2184 <replaceable class="parameter">key</replaceable>
2186 <arg choice="plain">
2187 <replaceable class="parameter">sequence</replaceable>
2190 <replaceable class="parameter">description</replaceable>
2195 Macros are useful when you would like a single key to perform a series of
2196 actions. When you press <emphasis>key</emphasis> in menu <emphasis>menu</emphasis>, Mutt will behave as if
2197 you had typed <emphasis>sequence</emphasis>. So if you have a common sequence of commands
2198 you type, you can create a macro to execute those commands with a single
2203 <emphasis>menu</emphasis> is the <link linkend="maps">map</link> which the macro will be bound in.
2204 Multiple maps may be specified by separating multiple menu arguments by
2205 commas. Whitespace may not be used in between the menu arguments and the
2206 commas separating them.
2210 <emphasis>key</emphasis> and <emphasis>sequence</emphasis> are expanded by the same rules as the
2211 <link linkend="bind">key bindings</link> with some additions. The
2212 first is that control characters in <emphasis>sequence</emphasis> can also be specified
2213 as <emphasis>ˆx</emphasis>. In order to get a caret (<quote>ˆ</quote>) you need to use
2214 <emphasis>ˆˆ</emphasis>. Secondly, to specify a certain key such as <emphasis>up</emphasis>
2215 or to invoke a function directly, you can use the format
2216 <emphasis><key name></emphasis> and <emphasis><function name></emphasis>. For a listing of key
2217 names see the section on <link linkend="bind">key bindings</link>. Functions
2218 are listed in the <link linkend="functions">reference</link>.
2222 The advantage with using function names directly is that the macros will
2223 work regardless of the current key bindings, so they are not dependent on
2224 the user having particular key definitions. This makes them more robust
2225 and portable, and also facilitates defining of macros in files used by more
2226 than one user (e.g., the system Muttrc).
2230 Optionally you can specify a descriptive text after <emphasis>sequence</emphasis>,
2231 which is shown in the help screens.
2236 Macro definitions (if any) listed in the help screen(s), are
2237 silently truncated at the screen width, and are not wrapped.
2244 <title>Using color and mono video attributes</title>
2249 <command>color</command>
2250 <arg choice="plain">
2251 <replaceable class="parameter">object</replaceable>
2253 <arg choice="plain">
2254 <replaceable class="parameter">foreground</replaceable>
2256 <arg choice="plain">
2257 <replaceable class="parameter">background</replaceable>
2262 <command>color</command>
2263 <group choice="req">
2264 <arg choice="plain">
2265 <option>header</option>
2267 <arg choice="plain">
2268 <option>body</option>
2271 <arg choice="plain">
2272 <replaceable class="parameter">foreground</replaceable>
2274 <arg choice="plain">
2275 <replaceable class="parameter">background</replaceable>
2277 <arg choice="plain">
2278 <replaceable class="parameter">regexp</replaceable>
2283 <command>color</command>
2284 <arg choice="plain">
2285 <option>index</option>
2287 <arg choice="plain">
2288 <replaceable class="parameter">foreground</replaceable>
2290 <arg choice="plain">
2291 <replaceable class="parameter">background</replaceable>
2293 <arg choice="plain">
2294 <replaceable class="parameter">pattern</replaceable>
2299 <command>uncolor</command>
2300 <arg choice="plain">
2301 <option>index</option>
2303 <group choice="req">
2304 <arg choice="plain">
2305 <replaceable>*</replaceable>
2307 <arg choice="plain" rep="repeat">
2308 <replaceable>pattern</replaceable>
2314 If your terminal supports color, you can spice up Mutt by creating your own
2315 color scheme. To define the color of an object (type of information), you
2316 must specify both a foreground color <emphasis role="bold">and</emphasis> a background color (it is not
2317 possible to only specify one or the other).
2321 <emphasis>header</emphasis> and <emphasis>body</emphasis> match <emphasis>regexp</emphasis>
2322 in the header/body of a message, <emphasis>index</emphasis> matches <emphasis>pattern</emphasis>
2323 (see <xref linkend="patterns"/>) in the message index.
2327 <emphasis>object</emphasis> can be one of:
2331 <listitem><para>attachment</para></listitem>
2332 <listitem><para>bold (hiliting bold patterns in the body of messages)</para></listitem>
2333 <listitem><para>error (error messages printed by Mutt)</para></listitem>
2334 <listitem><para>hdrdefault (default color of the message header in the pager)</para></listitem>
2335 <listitem><para>indicator (arrow or bar used to indicate the current item in a menu)</para></listitem>
2336 <listitem><para>markers (the <quote>+</quote> markers at the beginning of wrapped lines in the pager)</para></listitem>
2337 <listitem><para>message (informational messages)</para></listitem>
2338 <listitem><para>normal</para></listitem>
2339 <listitem><para>quoted (text matching <link linkend="quote-regexp">$quote_regexp</link> in the body of a message)</para></listitem>
2340 <listitem><para>quoted1, quoted2, ..., quoted<emphasis role="bold">N</emphasis> (higher levels of quoting)</para></listitem>
2341 <listitem><para>search (hiliting of words in the pager)</para></listitem>
2342 <listitem><para>signature</para></listitem><listitem><para>status (mode lines used to display info about the mailbox or message)</para></listitem>
2343 <listitem><para>tilde (the <quote>˜</quote> used to pad blank lines in the pager)</para></listitem>
2344 <listitem><para>tree (thread tree drawn in the message index and attachment menu)</para></listitem>
2345 <listitem><para>underline (hiliting underlined patterns in the body of messages)</para></listitem>
2349 <emphasis>foreground</emphasis> and <emphasis>background</emphasis> can be one of the following:
2353 <listitem><para>white</para></listitem>
2354 <listitem><para>black</para></listitem>
2355 <listitem><para>green</para></listitem>
2356 <listitem><para>magenta</para></listitem>
2357 <listitem><para>blue</para></listitem>
2358 <listitem><para>cyan</para></listitem>
2359 <listitem><para>yellow</para></listitem>
2360 <listitem><para>red</para></listitem>
2361 <listitem><para>default</para></listitem>
2362 <listitem><para>color<emphasis>x</emphasis></para>
2367 <emphasis>foreground</emphasis> can optionally be prefixed with the keyword <literal>bright</literal> to make
2368 the foreground color boldfaced (e.g., <literal>brightred</literal>).
2372 If your terminal supports it, the special keyword <emphasis>default</emphasis> can be
2373 used as a transparent color. The value <emphasis>brightdefault</emphasis> is also valid.
2374 If Mutt is linked against the <emphasis>S-Lang</emphasis> library, you also need to set
2375 the <emphasis>COLORFGBG</emphasis> environment variable to the default colors of your
2376 terminal for this to work; for example (for Bourne-like shells):
2380 set COLORFGBG="green;black"
2386 The <emphasis>S-Lang</emphasis> library requires you to use the <emphasis>lightgray</emphasis>
2387 and <emphasis>brown</emphasis> keywords instead of <emphasis>white</emphasis> and <emphasis>yellow</emphasis> when
2388 setting this variable.
2394 The uncolor command can be applied to the index object only. It
2395 removes entries from the list. You <emphasis role="bold">must</emphasis> specify the same pattern
2396 specified in the color command for it to be removed. The pattern <quote>*</quote> is
2397 a special token which means to clear the color index list of all entries.
2402 Mutt also recognizes the keywords <emphasis>color0</emphasis>, <emphasis>color1</emphasis>, …,
2403 <emphasis>color</emphasis><emphasis role="bold">N-1</emphasis> (<emphasis role="bold">N</emphasis> being the number of colors supported
2404 by your terminal). This is useful when you remap the colors for your
2405 display (for example by changing the color associated with <emphasis>color2</emphasis>
2406 for your xterm), since color names may then lose their normal meaning.
2410 If your terminal does not support color, it is still possible change the video
2411 attributes through the use of the <quote>mono</quote> command:
2418 <command>mono</command>
2419 <arg choice="plain">
2420 <replaceable class="parameter">object</replaceable>
2422 <arg choice="plain">
2423 <replaceable class="parameter">attribute</replaceable>
2428 <command>mono</command>
2429 <group choice="req">
2430 <arg choice="plain">
2431 <option>header</option>
2433 <arg choice="plain">
2434 <option>body</option>
2437 <arg choice="plain">
2438 <replaceable class="parameter">attribute</replaceable>
2440 <arg choice="plain">
2441 <replaceable class="parameter">regexp</replaceable>
2446 <command>mono</command>
2447 <arg choice="plain">
2448 <option>index</option>
2450 <arg choice="plain">
2451 <replaceable class="parameter">attribute</replaceable>
2453 <arg choice="plain">
2454 <replaceable class="parameter">pattern</replaceable>
2459 <command>unmono</command>
2460 <arg choice="plain">
2461 <option>index</option>
2463 <group choice="req">
2464 <arg choice="plain">
2465 <replaceable>*</replaceable>
2467 <arg choice="plain" rep="repeat">
2468 <replaceable>pattern</replaceable>
2474 For <emphasis>object</emphasis>, see the color command. <emphasis>attribute</emphasis>
2475 can be one of the following:
2479 <listitem><para>none</para></listitem>
2480 <listitem><para>bold</para></listitem>
2481 <listitem><para>underline</para></listitem>
2482 <listitem><para>reverse</para></listitem>
2483 <listitem><para>standout</para></listitem>
2489 <title>Message header display</title>
2494 <command>ignore</command>
2495 <arg choice="plain">
2496 <replaceable class="parameter">pattern</replaceable>
2498 <arg choice="opt" rep="repeat">
2499 <replaceable class="parameter">pattern</replaceable>
2504 <command>unignore</command>
2505 <group choice="req">
2506 <arg choice="plain">
2507 <replaceable>*</replaceable>
2509 <arg choice="plain" rep="repeat">
2510 <replaceable>pattern</replaceable>
2516 Messages often have many header fields added by automatic processing systems,
2517 or which may not seem useful to display on the screen. This command allows
2518 you to specify header fields which you don't normally want to see in the pager.
2522 You do not need to specify the full header field name. For example,
2523 <quote>ignore content-</quote> will ignore all header fields that begin with the pattern
2524 <quote>content-</quote>. <quote>ignore *</quote> will ignore all headers.
2528 To remove a previously added token from the list, use the <quote>unignore</quote> command.
2529 The <quote>unignore</quote> command will make Mutt display headers with the given pattern.
2530 For example, if you do <quote>ignore x-</quote> it is possible to <quote>unignore x-mailer</quote>.
2534 <quote>unignore *</quote> will remove all tokens from the ignore list.
2541 <example id="ex-header-weeding">
2542 <title>Header weeding</title>
2544 # Sven's draconian header weeding
2546 unignore from date subject to cc
2547 unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
2552 <anchor id="hdr-order"/>
2556 <command>hdr_order</command>
2557 <arg choice="plain">
2558 <replaceable class="parameter">header</replaceable>
2560 <arg choice="opt" rep="repeat">
2561 <replaceable class="parameter">header</replaceable>
2566 <command>unhdr_order</command>
2567 <group choice="req">
2568 <arg choice="plain">
2569 <replaceable>*</replaceable>
2571 <arg choice="plain" rep="repeat">
2572 <replaceable>header</replaceable>
2578 With the <literal>hdr_order</literal> command you can specify an order in
2579 which mutt will attempt to present these headers to you when viewing messages.
2583 <quote>unhdr_order *</quote> will clear all previous headers from the order list,
2584 thus removing the header order effects set by the system-wide startup file.
2587 <example id="ex-hdr-order">
2588 <title>Configuring header display order</title>
2590 hdr_order From Date: From: To: Cc: Subject:
2596 <sect1 id="alternates">
2597 <title>Alternative addresses</title>
2602 <command>alternates</command>
2603 <arg choice="opt" rep="repeat">
2604 <option>-group</option>
2605 <replaceable>name</replaceable>
2607 <arg choice="plain">
2608 <replaceable>regexp</replaceable>
2610 <arg choice="opt" rep="repeat">
2611 <replaceable>regexp</replaceable>
2616 <command>unalternates</command>
2617 <arg choice="opt" rep="repeat">
2618 <option>-group</option>
2619 <replaceable>name</replaceable>
2621 <group choice="req">
2622 <arg choice="plain">
2623 <replaceable>*</replaceable>
2625 <arg choice="plain" rep="repeat">
2626 <replaceable>regexp</replaceable>
2632 With various functions, mutt will treat messages differently,
2633 depending on whether you sent them or whether you received them from
2634 someone else. For instance, when replying to a message that you
2635 sent to a different party, mutt will automatically suggest to send
2636 the response to the original message's recipients -- responding to
2637 yourself won't make much sense in many cases. (See <link linkend="reply-to">$reply_to</link>.)
2641 Many users receive e-mail under a number of different addresses. To
2642 fully use mutt's features here, the program must be able to
2643 recognize what e-mail addresses you receive mail under. That's the
2644 purpose of the <literal>alternates</literal> command: It takes a list of regular
2645 expressions, each of which can identify an address under which you
2650 As addresses are matched using regular expressions and not exact strict
2651 comparisons, you should make sure you specify your addresses as precise
2652 as possible to avoid mismatches. For example, if you specify:
2656 alternates user@example
2660 mutt will consider <quote><literal>some-user@example</literal></quote> as
2661 being your address, too which may not be desired. As a solution, in such
2662 cases addresses should be specified as:
2666 alternates '^user@example$'
2670 The <literal>-group</literal> flag causes all of the subsequent regular expressions
2671 to be added to the named group.
2675 The <literal>unalternates</literal> command can be used to write exceptions to
2676 <literal>alternates</literal> patterns. If an address matches something in an
2677 <literal>alternates</literal> command, but you nonetheless do not think it is
2678 from you, you can list a more precise pattern under an <literal>unalternates</literal>
2683 To remove a regular expression from the <literal>alternates</literal> list, use the
2684 <literal>unalternates</literal> command with exactly the same <emphasis>regexp</emphasis>.
2685 Likewise, if the <emphasis>regexp</emphasis> for an <literal>alternates</literal> command matches
2686 an entry on the <literal>unalternates</literal> list, that <literal>unalternates</literal>
2687 entry will be removed. If the <emphasis>regexp</emphasis> for <literal>unalternates</literal>
2688 is <quote>*</quote>, <emphasis>all entries</emphasis> on <literal>alternates</literal> will be removed.
2694 <title>Mailing lists</title>
2696 <anchor id="subscribe"/>
2700 <command>lists</command>
2701 <arg choice="opt" rep="repeat">
2702 <option>-group</option>
2703 <replaceable class="parameter">name</replaceable>
2705 <arg choice="plain">
2706 <replaceable class="parameter">regexp</replaceable>
2708 <arg choice="opt" rep="repeat">
2709 <replaceable class="parameter">regexp</replaceable>
2714 <command>unlists</command>
2715 <arg choice="opt" rep="repeat">
2716 <option>-group</option>
2717 <replaceable class="parameter">name</replaceable>
2719 <group choice="req">
2720 <arg choice="plain">
2721 <replaceable class="parameter">*</replaceable>
2723 <arg choice="plain" rep="repeat">
2724 <replaceable class="parameter">regexp</replaceable>
2730 <command>subscribe</command>
2731 <arg choice="opt" rep="repeat">
2732 <option>-group</option>
2733 <replaceable class="parameter">name</replaceable>
2735 <arg choice="plain">
2736 <replaceable class="parameter">regexp</replaceable>
2738 <arg choice="opt" rep="repeat">
2739 <replaceable class="parameter">regexp</replaceable>
2744 <command>unsubscribe</command>
2745 <arg choice="opt" rep="repeat">
2746 <option>-group</option>
2747 <replaceable class="parameter">name</replaceable>
2749 <group choice="req">
2750 <arg choice="plain">
2751 <replaceable class="parameter">*</replaceable>
2753 <arg choice="plain" rep="repeat">
2754 <replaceable class="parameter">regexp</replaceable>
2760 Mutt has a few nice features for <link linkend="using-lists">handling mailing lists</link>. In order to take advantage of them, you must
2761 specify which addresses belong to mailing lists, and which mailing
2762 lists you are subscribed to. Once you have done this, the <link linkend="list-reply"><literal><list-reply></literal></link> function will work for all known lists.
2763 Additionally, when you send a message to a subscribed list, mutt will
2764 add a Mail-Followup-To header to tell other users' mail user agents
2765 not to send copies of replies to your personal address.
2770 The Mail-Followup-To header is a non-standard extension which is not
2771 supported by all mail user agents. Adding it is not bullet-proof against
2772 receiving personal CCs of list messages. Also note that the generation
2773 of the Mail-Followup-To header is controlled by the
2774 <link linkend="followup-to">$followup_to</link>
2775 configuration variable.
2780 More precisely, Mutt maintains lists of patterns for the addresses
2781 of known and subscribed mailing lists. Every subscribed mailing
2782 list is known. To mark a mailing list as known, use the <quote>lists</quote>
2783 command. To mark it as subscribed, use <quote>subscribe</quote>.
2787 You can use regular expressions with both commands. To mark all
2788 messages sent to a specific bug report's address on mutt's bug
2789 tracking system as list mail, for instance, you could say
2790 <quote>subscribe [0-9]*@bugs.guug.de</quote>. Often, it's sufficient to just
2791 give a portion of the list's e-mail address.
2795 Specify as much of the address as you need to to remove ambiguity. For
2796 example, if you've subscribed to the Mutt mailing list, you will receive mail
2797 addressed to <emphasis>mutt-users@mutt.org</emphasis>. So, to tell Mutt
2798 that this is a mailing list, you could add <quote>lists mutt-users@</quote> to your
2799 initialization file. To tell mutt that you are subscribed to it,
2800 add <quote>subscribe mutt-users</quote> to your initialization file instead.
2801 If you also happen to get mail from someone whose address is
2802 <emphasis>mutt-users@example.com</emphasis>, you could use
2803 <quote>lists ^mutt-users@mutt\\.org$</quote>
2804 or <quote>subscribe ^mutt-users@mutt\\.org$</quote> to
2805 match only mail from the actual list.
2809 The <literal>-group</literal> flag adds all of the subsequent regular expressions
2814 The <quote>unlists</quote> command is used to remove a token from the list of
2815 known and subscribed mailing-lists. Use <quote>unlists *</quote> to remove all
2820 To remove a mailing list from the list of subscribed mailing lists,
2821 but keep it on the list of known mailing lists, use <quote>unsubscribe</quote>.
2826 <sect1 id="mbox-hook">
2827 <title>Using Multiple spool mailboxes</title>
2832 <command>mbox-hook</command>
2833 <arg choice="plain">
2834 <replaceable class="parameter">[!]pattern</replaceable>
2836 <arg choice="plain">
2837 <replaceable class="parameter">mailbox</replaceable>
2842 This command is used to move read messages from a specified mailbox to a
2843 different mailbox automatically when you quit or change folders.
2844 <emphasis>pattern</emphasis> is a regular expression specifying the mailbox to treat as a
2845 <quote>spool</quote> mailbox and <emphasis>mailbox</emphasis> specifies where mail should be saved when
2850 Unlike some of the other <emphasis>hook</emphasis> commands, only the <emphasis>first</emphasis> matching
2851 pattern is used (it is not possible to save read mail in more than a single
2857 <sect1 id="mailboxes">
2858 <title>Monitoring incoming mail</title>
2863 <command>mailboxes</command>
2864 <arg choice="plain">
2865 <replaceable class="parameter">mailbox</replaceable>
2867 <arg choice="opt" rep="repeat">
2868 <replaceable class="parameter">mailbox</replaceable>
2873 <command>unmailboxes</command>
2874 <group choice="req">
2875 <arg choice="plain">
2876 <replaceable class="parameter">*</replaceable>
2878 <arg choice="plain" rep="repeat">
2879 <replaceable class="parameter">mailbox</replaceable>
2885 This command specifies folders which can receive mail and
2886 which will be checked for new messages periodically.
2890 <emphasis>folder</emphasis> can either be a local file or directory
2891 (Mbox/Mmdf or Maildir/Mh). If Mutt was built with POP and/or IMAP
2892 support, <emphasis>folder</emphasis> can also be a POP/IMAP folder
2893 URL. The URL syntax is described in <xref linkend="url-syntax"/>,
2894 POP and IMAP are described in <xref linkend="pop"/> and <xref linkend="imap"/>
2899 Mutt provides a number of advanced features for handling (possibly many)
2900 folders and new mail within them, please refer to
2901 <xref linkend="handling-folders"/> for details (including in what
2902 situations and how often Mutt checks for new mail).
2906 The <quote>unmailboxes</quote> command is used to remove a token from the list
2907 of folders which receive mail. Use <quote>unmailboxes *</quote> to remove all
2913 The folders in the <literal>mailboxes</literal> command are resolved when
2914 the command is executed, so if these names contain <link linkend="shortcuts">shortcut characters</link> (such as <quote>=</quote> and <quote>!</quote>), any variable
2915 definition that affects these characters (like <link linkend="folder">$folder</link> and <link linkend="spoolfile">$spoolfile</link>)
2916 should be set before the <literal>mailboxes</literal> command. If
2917 none of these shorcuts are used, a local path should be absolute as
2918 otherwise mutt tries to find it relative to the directory
2919 from where mutt was started which may not always be desired.
2924 For Mbox and Mmdf folders, new mail is detected by comparing access and/or
2925 modification times of files: Mutt assumes a folder has new mail if it wasn't
2926 accessed after it was last modified. Utilities like <literal>biff</literal> or
2927 <literal>frm</literal> or any other program which accesses the mailbox might cause
2928 Mutt to never detect new mail for that mailbox if they do not properly reset the
2929 access time. Other possible causes of Mutt not detecting new mail in these folders
2930 are backup tools (updating access times) or filesystems mounted without
2931 access time update support.
2935 In cases where new mail detection for Mbox or Mmdf folders appears to be
2937 <link linkend="check-mbox-size">$check_mbox_size</link>
2938 option can be used to make Mutt track and consult file sizes for new
2939 mail detection instead.
2945 <title>User defined headers</title>
2950 <command>my_hdr</command>
2951 <arg choice="plain">
2952 <replaceable class="parameter">string</replaceable>
2957 <command>unmy_hdr</command>
2958 <group choice="req">
2959 <arg choice="plain">
2960 <replaceable class="parameter">*</replaceable>
2962 <arg choice="plain" rep="repeat">
2963 <replaceable class="parameter">field</replaceable>
2969 The <literal>my_hdr</literal> command allows you to create your own header
2970 fields which will be added to every message you send.
2974 For example, if you would like to add an <quote>Organization:</quote> header field to
2975 all of your outgoing messages, you can put the command
2978 <example id="ex-my-hdr">
2979 <title>Defining custom headers</title>
2981 my_hdr Organization: A Really Big Company, Anytown, USA
2986 in your <literal>.muttrc</literal>.
2991 Space characters are <emphasis>not</emphasis> allowed between the keyword and
2992 the colon (<quote>:</quote>). The standard for electronic mail (RFC2822) says that
2993 space is illegal there, so Mutt enforces the rule.
2998 If you would like to add a header field to a single message, you should
2999 either set the <link linkend="edit-headers">$edit_headers</link> variable,
3000 or use the <literal><edit-headers></literal> function (default: <quote>E</quote>) in the compose menu so
3001 that you can edit the header of your message along with the body.
3005 To remove user defined header fields, use the <literal>unmy_hdr</literal>
3006 command. You may specify an asterisk (<quote>*</quote>) to remove all header
3007 fields, or the fields to remove. For example, to remove all <quote>To</quote> and
3008 <quote>Cc</quote> header fields, you could use:
3012 unmy_hdr to cc
3017 <sect1 id="save-hook">
3018 <title>Specify default save mailbox</title>
3023 <command>save-hook</command>
3024 <arg choice="plain">
3025 <replaceable class="parameter">[!]pattern</replaceable>
3027 <arg choice="plain">
3028 <replaceable class="parameter">mailbox</replaceable>
3033 This command is used to override the default mailbox used when saving
3034 messages. <emphasis>mailbox</emphasis> will be used as the default if the message
3035 matches <emphasis>pattern</emphasis>, see <xref linkend="pattern-hook"/> for information
3036 on the exact format.
3040 To provide more flexibility and good defaults, Mutt applies the
3041 expandos of <link linkend="index-format">$index_format</link> to
3042 <emphasis>mailbox</emphasis> after it was expanded.
3049 <example id="ex-save-hook-exando">
3050 <title>Using %-expandos in <literal>save-hook</literal></title>
3052 # default: save all to ~/Mail/<author name>
3053 save-hook . ~/Mail/%F
3055 # save from me@turing.cs.hmc.edu and me@cs.hmc.edu to $folder/elkins
3056 save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins
3058 # save from aol.com to $folder/spam
3059 save-hook aol\\.com$ +spam
3064 Also see the <link linkend="fcc-save-hook">fcc-save-hook</link> command.
3069 <sect1 id="fcc-hook">
3070 <title>Specify default Fcc: mailbox when composing</title>
3075 <command>fcc-hook</command>
3076 <arg choice="plain">
3077 <replaceable class="parameter">[!]pattern</replaceable>
3079 <arg choice="plain">
3080 <replaceable class="parameter">mailbox</replaceable>
3085 This command is used to save outgoing mail in a mailbox other than
3086 <link linkend="record">$record</link>. Mutt searches the initial list of
3087 message recipients for the first matching <emphasis>regexp</emphasis> and uses <emphasis>mailbox</emphasis>
3088 as the default Fcc: mailbox. If no match is found the message will be saved
3089 to <link linkend="record">$record</link> mailbox.
3093 To provide more flexibility and good defaults, Mutt applies the
3094 expandos of <link linkend="index-format">$index_format</link> to
3095 <emphasis>mailbox</emphasis> after it was expanded.
3099 See <xref linkend="pattern-hook"/> for information on the exact format of <emphasis>pattern</emphasis>.
3103 Example: <literal>fcc-hook [@.]aol\\.com$ +spammers</literal>
3107 The above will save a copy of all messages going to the aol.com domain to
3108 the `+spammers' mailbox by default. Also see the <link linkend="fcc-save-hook">fcc-save-hook</link> command.
3113 <sect1 id="fcc-save-hook">
3114 <title>Specify default save filename and default Fcc: mailbox at once</title>
3119 <command>fcc-save-hook</command>
3120 <arg choice="plain">
3121 <replaceable class="parameter">[!]pattern</replaceable>
3123 <arg choice="plain">
3124 <replaceable class="parameter">mailbox</replaceable>
3129 This command is a shortcut, equivalent to doing both a <link linkend="fcc-hook">fcc-hook</link>
3130 and a <link linkend="save-hook">save-hook</link> with its arguments,
3131 including %-expansion on <emphasis>mailbox</emphasis> according
3132 to <link linkend="index-format">$index_format</link>.
3137 <sect1 id="send-hook">
3138 <title>Change settings based upon message recipients</title>
3140 <anchor id="reply-hook"/>
3141 <anchor id="send2-hook"/>
3146 <command>reply-hook</command>
3147 <arg choice="plain">
3148 <replaceable class="parameter">[!]pattern</replaceable>
3150 <arg choice="plain">
3151 <replaceable class="parameter">command</replaceable>
3156 <command>send-hook</command>
3157 <arg choice="plain">
3158 <replaceable class="parameter">[!]pattern</replaceable>
3160 <arg choice="plain">
3161 <replaceable class="parameter">command</replaceable>
3166 <command>send2-hook</command>
3167 <arg choice="plain">
3168 <replaceable class="parameter">[!]pattern</replaceable>
3170 <arg choice="plain">
3171 <replaceable class="parameter">command</replaceable>
3176 These commands can be used to execute arbitrary configuration commands based
3177 upon recipients of the message. <emphasis>pattern</emphasis> is used to match
3178 the message, see <xref linkend="pattern-hook"/> for details. <emphasis>command</emphasis>
3179 is executed when <emphasis>pattern</emphasis> matches.
3183 <literal>reply-hook</literal> is matched against the message you are <emphasis>replying to</emphasis>,
3184 instead of the message you are <emphasis>sending</emphasis>. <literal>send-hook</literal> is
3185 matched against all messages, both <emphasis>new</emphasis>
3186 and <emphasis>replies</emphasis>.
3191 <literal>reply-hook</literal>s are matched <emphasis role="bold">before</emphasis> the <literal>send-hook</literal>, <emphasis role="bold">regardless</emphasis>
3192 of the order specified in the user's configuration file.
3197 <literal>send2-hook</literal> is matched every time a message is changed, either
3198 by editing it, or by using the compose menu to change its recipients
3199 or subject. <literal>send2-hook</literal> is executed after <literal>send-hook</literal>, and
3200 can, e.g., be used to set parameters such as the <link linkend="sendmail">$sendmail</link> variable depending on the message's sender
3205 For each type of <literal>send-hook</literal> or <literal>reply-hook</literal>, when multiple matches
3206 occur, commands are executed in the order they are specified in the muttrc
3207 (for that type of hook).
3211 Example: <literal>send-hook mutt "set mime_forward signature=''"</literal>
3215 Another typical use for this command is to change the values of the
3216 <link linkend="attribution">$attribution</link>, <link linkend="signature">$signature</link> and <link linkend="locale">$locale</link>
3217 variables in order to change the language of the attributions and
3218 signatures based upon the recipients.
3223 send-hook's are only executed once after getting the initial
3224 list of recipients. Adding a recipient after replying or editing the
3225 message will not cause any send-hook to be executed. Also note that
3226 <literal>my_hdr</literal> commands which modify recipient headers, or the message's
3227 subject, don't have any effect on the current message when executed
3234 <sect1 id="message-hook">
3235 <title>Change settings before formatting a message</title>
3240 <command>message-hook</command>
3241 <arg choice="plain">
3242 <replaceable class="parameter">[!]pattern</replaceable>
3244 <arg choice="plain">
3245 <replaceable class="parameter">command</replaceable>
3250 This command can be used to execute arbitrary configuration commands
3251 before viewing or formatting a message based upon information about the message.
3252 <emphasis>command</emphasis> is executed if the <emphasis>pattern</emphasis> matches the message to be
3253 displayed. When multiple matches occur, commands are executed in the order
3254 they are specified in the muttrc.
3258 See <xref linkend="pattern-hook"/> for
3259 information on the exact format of <emphasis>pattern</emphasis>.
3267 message-hook ~A 'set pager=builtin'
3268 message-hook '~f freshmeat-news' 'set pager="less \"+/^ subject: .*\""'
3273 <sect1 id="crypt-hook">
3274 <title>Choosing the cryptographic key of the recipient</title>
3279 <command>crypt-hook</command>
3280 <arg choice="plain">
3281 <replaceable class="parameter">pattern</replaceable>
3283 <arg choice="plain">
3284 <replaceable class="parameter">keyid</replaceable>
3289 When encrypting messages with PGP/GnuPG or OpenSSL, you may want to associate a certain
3290 key with a given e-mail address automatically, either because the
3291 recipient's public key can't be deduced from the destination address,
3292 or because, for some reasons, you need to override the key Mutt would
3293 normally use. The <literal>crypt-hook</literal> command provides a
3294 method by which you can specify the ID of the public key to be used
3295 when encrypting messages to a certain recipient.
3299 The meaning of <emphasis>keyid</emphasis> is to be taken broadly in this context: You
3300 can either put a numerical key ID here, an e-mail address, or even
3307 <title>Adding key sequences to the keyboard buffer</title>
3312 <command>push</command>
3313 <arg choice="plain">
3314 <replaceable class="parameter">string</replaceable>
3319 This command adds the named string to the keyboard buffer. The string may
3320 contain control characters, key names and function names like the sequence
3321 string in the <link linkend="macro">macro</link> command. You may use it to
3322 automatically run a sequence of commands at startup, or when entering
3323 certain folders. For example, the following command will automatically
3324 collapse all threads when entering a folder:
3327 <example id="ex-folder-hook-push">
3328 <title>Embedding <literal>push</literal> in <literal>folder-hook</literal></title>
3330 folder-hook . 'push <collapse-all>'
3337 <title>Executing functions</title>
3342 <command>exec</command>
3343 <arg choice="plain">
3344 <replaceable class="parameter">function</replaceable>
3346 <arg choice="opt" rep="repeat">
3347 <replaceable class="parameter">function</replaceable>
3352 This command can be used to execute any function. Functions are
3353 listed in the <link linkend="functions">function reference</link>.
3354 <quote>exec function</quote> is equivalent to <quote>push <function></quote>.
3359 <sect1 id="score-command">
3360 <title>Message Scoring</title>
3365 <command>score</command>
3366 <arg choice="plain">
3367 <replaceable class="parameter">pattern</replaceable>
3369 <arg choice="plain">
3370 <replaceable class="parameter">value</replaceable>
3375 <command>unscore</command>
3376 <group choice="req">
3377 <arg choice="plain">
3378 <replaceable class="parameter">*</replaceable>
3380 <arg choice="plain" rep="repeat">
3381 <replaceable class="parameter">pattern</replaceable>
3387 The <literal>score</literal> commands adds <emphasis>value</emphasis> to a message's score if <emphasis>pattern</emphasis>
3388 matches it. <emphasis>pattern</emphasis> is a string in the format described in the <link linkend="patterns">patterns</link> section (note: For efficiency reasons, patterns
3389 which scan information not available in the index, such as <literal>˜b</literal>,
3390 <literal>˜B</literal> or <literal>˜h</literal>, may not be used). <emphasis>value</emphasis> is a
3391 positive or negative integer. A message's final score is the sum total of all
3392 matching <literal>score</literal> entries. However, you may optionally prefix <emphasis>value</emphasis> with
3393 an equal sign (=) to cause evaluation to stop at a particular entry if there is
3394 a match. Negative final scores are rounded up to 0.
3398 The <literal>unscore</literal> command removes score entries from the list. You <emphasis role="bold">must</emphasis>
3399 specify the same pattern specified in the <literal>score</literal> command for it to be
3400 removed. The pattern <quote>*</quote> is a special token which means to clear the list
3401 of all score entries.
3407 <title>Spam detection</title>
3412 <command>spam</command>
3413 <arg choice="plain">
3414 <replaceable class="parameter">pattern</replaceable>
3416 <arg choice="plain">
3417 <replaceable class="parameter">format</replaceable>
3422 <command>nospam</command>
3423 <group choice="req">
3424 <arg choice="plain">
3425 <replaceable class="parameter">*</replaceable>
3427 <arg choice="plain">
3428 <replaceable class="parameter">pattern</replaceable>
3434 Mutt has generalized support for external spam-scoring filters.
3435 By defining your spam patterns with the <literal>spam</literal> and <literal>nospam</literal>
3436 commands, you can <emphasis>limit</emphasis>, <emphasis>search</emphasis>, and <emphasis>sort</emphasis> your
3437 mail based on its spam attributes, as determined by the external
3438 filter. You also can display the spam attributes in your index
3439 display using the <literal>%H</literal> selector in the <link linkend="index-format">$index_format</link> variable. (Tip: try <literal>%?H?[%H] ?</literal>
3440 to display spam tags only when they are defined for a given message.)
3444 Your first step is to define your external filter's spam patterns using
3445 the <literal>spam</literal> command. <emphasis>pattern</emphasis> should be a regular expression
3446 that matches a header in a mail message. If any message in the mailbox
3447 matches this regular expression, it will receive a <quote>spam tag</quote> or
3448 <quote>spam attribute</quote> (unless it also matches a <literal>nospam</literal> pattern -- see
3449 below.) The appearance of this attribute is entirely up to you, and is
3450 governed by the <emphasis>format</emphasis> parameter. <emphasis>format</emphasis> can be any static
3451 text, but it also can include back-references from the <emphasis>pattern</emphasis>
3452 expression. (A regular expression <quote>back-reference</quote> refers to a
3453 sub-expression contained within parentheses.) <literal>%1</literal> is replaced with
3454 the first back-reference in the regex, <literal>%2</literal> with the second, etc.
3458 If you're using multiple spam filters, a message can have more than
3459 one spam-related header. You can define <literal>spam</literal> patterns for each
3460 filter you use. If a message matches two or more of these patterns, and
3461 the $spam_separator variable is set to a string, then the
3462 message's spam tag will consist of all the <emphasis>format</emphasis> strings joined
3463 together, with the value of $spam_separator separating
3468 For example, suppose I use DCC, SpamAssassin, and PureMessage. I might
3469 define these spam settings:
3472 <example id="ex-spam">
3473 <title>Configuring spam detection</title>
3475 spam "X-DCC-.*-Metrics:.*(....)=many" "90+/DCC-%1"
3476 spam "X-Spam-Status: Yes" "90+/SA"
3477 spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM"
3478 set spam_separator=", "
3483 If I then received a message that DCC registered with <quote>many</quote> hits
3484 under the <quote>Fuz2</quote> checksum, and that PureMessage registered with a
3485 97% probability of being spam, that message's spam tag would read
3486 <literal>90+/DCC-Fuz2, 97/PM</literal>. (The four characters before <quote>=many</quote> in a
3487 DCC report indicate the checksum used -- in this case, <quote>Fuz2</quote>.)
3491 If the $spam_separator variable is unset, then each
3492 spam pattern match supersedes the previous one. Instead of getting
3493 joined <emphasis>format</emphasis> strings, you'll get only the last one to match.
3497 The spam tag is what will be displayed in the index when you use
3498 <literal>%H</literal> in the <literal>$index_format</literal> variable. It's also the
3499 string that the <literal>˜H</literal> pattern-matching expression matches against for
3500 <literal><search></literal> and <literal><limit></literal> functions. And it's what sorting by spam
3501 attribute will use as a sort key.
3505 That's a pretty complicated example, and most people's actual
3506 environments will have only one spam filter. The simpler your
3507 configuration, the more effective mutt can be, especially when it comes
3512 Generally, when you sort by spam tag, mutt will sort <emphasis>lexically</emphasis> --
3513 that is, by ordering strings alphanumerically. However, if a spam tag
3514 begins with a number, mutt will sort numerically first, and lexically
3515 only when two numbers are equal in value. (This is like UNIX's
3516 <literal>sort -n</literal>.) A message with no spam attributes at all -- that is, one
3517 that didn't match <emphasis>any</emphasis> of your <literal>spam</literal> patterns -- is sorted at
3518 lowest priority. Numbers are sorted next, beginning with 0 and ranging
3519 upward. Finally, non-numeric strings are sorted, with <quote>a</quote> taking lower
3520 priority than <quote>z</quote>. Clearly, in general, sorting by spam tags is most
3521 effective when you can coerce your filter to give you a raw number. But
3522 in case you can't, mutt can still do something useful.
3526 The <literal>nospam</literal> command can be used to write exceptions to <literal>spam</literal>
3527 patterns. If a header pattern matches something in a <literal>spam</literal> command,
3528 but you nonetheless do not want it to receive a spam tag, you can list a
3529 more precise pattern under a <literal>nospam</literal> command.
3533 If the <emphasis>pattern</emphasis> given to <literal>nospam</literal> is exactly the same as the
3534 <emphasis>pattern</emphasis> on an existing <literal>spam</literal> list entry, the effect will be to
3535 remove the entry from the spam list, instead of adding an exception.
3536 Likewise, if the <emphasis>pattern</emphasis> for a <literal>spam</literal> command matches an entry
3537 on the <literal>nospam</literal> list, that <literal>nospam</literal> entry will be removed. If the
3538 <emphasis>pattern</emphasis> for <literal>nospam</literal> is <quote>*</quote>, <emphasis>all entries on both lists</emphasis>
3539 will be removed. This might be the default action if you use <literal>spam</literal>
3540 and <literal>nospam</literal> in conjunction with a <literal>folder-hook</literal>.
3544 You can have as many <literal>spam</literal> or <literal>nospam</literal> commands as you like.
3545 You can even do your own primitive spam detection within mutt -- for
3546 example, if you consider all mail from <literal>MAILER-DAEMON</literal> to be spam,
3547 you can use a <literal>spam</literal> command like this:
3551 spam "^From: .*MAILER-DAEMON" "999"
3557 <title>Setting and Querying Variables</title>
3559 <sect2 id="set-commands">
3560 <title>Commands</title>
3563 The following commands are available to manipulate and query variables:
3569 <command>set</command>
3570 <group choice="req">
3571 <arg choice="plain">
3572 <group choice="opt">
3573 <arg choice="plain"><option>no</option></arg>
3574 <arg choice="plain"><option>inv</option></arg>
3576 <replaceable class="parameter">variable</replaceable>
3578 <arg choice="plain">
3579 <replaceable class="parameter">variable=value</replaceable>
3582 <arg choice="opt" rep="repeat"/>
3586 <command>toggle</command>
3587 <arg choice="plain">
3588 <replaceable class="parameter">variable</replaceable>
3590 <arg choice="opt" rep="repeat">
3591 <replaceable class="parameter">variable</replaceable>
3596 <command>unset</command>
3597 <arg choice="plain">
3598 <replaceable class="parameter">variable</replaceable>
3600 <arg choice="opt" rep="repeat">
3601 <replaceable class="parameter">variable</replaceable>
3606 <command>reset</command>
3607 <arg choice="plain">
3608 <replaceable class="parameter">variable</replaceable>
3610 <arg choice="opt" rep="repeat">
3611 <replaceable class="parameter">variable</replaceable>
3616 This command is used to set (and unset) <link linkend="variables">configuration variables</link>. There are four basic types of variables:
3617 boolean, number, string and quadoption. <emphasis>boolean</emphasis> variables can be
3618 <emphasis>set</emphasis> (true) or <emphasis>unset</emphasis> (false). <emphasis>number</emphasis> variables can be
3619 assigned a positive integer value.
3620 <emphasis>string</emphasis> variables consist of any number of printable characters and
3621 must be enclosed in quotes if they contain spaces or tabs. You
3622 may also use the escape sequences <quote>\n</quote> and <quote>\t</quote> for newline and tab, respectively.
3623 <emphasis>quadoption</emphasis> variables are used to control whether or not to be prompted
3624 for certain actions, or to specify a default action. A value of <emphasis>yes</emphasis>
3625 will cause the action to be carried out automatically as if you had answered
3626 yes to the question. Similarly, a value of <emphasis>no</emphasis> will cause the
3627 action to be carried out as if you had answered <quote>no.</quote> A value of
3628 <emphasis>ask-yes</emphasis> will cause a prompt with a default answer of <quote>yes</quote> and
3629 <emphasis>ask-no</emphasis> will provide a default answer of <quote>no.</quote>
3633 Prefixing a variable with <quote>no</quote> will unset it. Example: <literal>set noaskbcc</literal>.
3637 For <emphasis>boolean</emphasis> variables, you may optionally prefix the variable name with
3638 <literal>inv</literal> to toggle the value (on or off). This is useful when writing
3639 macros. Example: <literal>set invsmart_wrap</literal>.
3643 The <literal>toggle</literal> command automatically prepends the <literal>inv</literal> prefix to all
3644 specified variables.
3648 The <literal>unset</literal> command automatically prepends the <literal>no</literal> prefix to all
3649 specified variables.
3653 Using the <literal><enter-command></literal> function in the <emphasis>index</emphasis> menu, you can query the
3654 value of a variable by prefixing the name of the variable with a question
3663 The question mark is actually only required for boolean and quadoption
3668 The <literal>reset</literal> command resets all given variables to the compile time
3669 defaults (hopefully mentioned in this manual). If you use the command
3670 <literal>set</literal> and prefix the variable with <quote>&</quote> this has the same
3671 behavior as the reset command.
3675 With the <literal>reset</literal> command there exists the special variable <quote>all</quote>,
3676 which allows you to reset all variables to their system defaults.
3681 <sect2 id="set-myvar">
3682 <title>User-defined variables</title>
3684 <sect3 id="set-myvar-intro">
3685 <title>Introduction</title>
3688 Along with the variables listed in the
3689 <link linkend="variables">Configuration variables</link> section, mutt
3690 supports user-defined variables with names starting
3691 with <literal>my_</literal> as in, for
3692 example, <literal>my_cfgdir</literal>.
3696 The <literal>set</literal> command either creates a
3697 custom <literal>my_</literal> variable or changes its
3698 value if it does exist already. The <literal>unset</literal> and <literal>reset</literal>
3699 commands remove the variable entirely.
3703 Since user-defined variables are expanded in the same way that
3704 environment variables are (except for
3705 the <link linkend="shell-escape">shell-escape</link> command and
3706 backtick expansion), this feature can be used to make configuration
3707 files more readable.
3712 <sect3 id="set-myvar-examples">
3713 <title>Examples</title>
3716 The following example defines and uses the variable <literal>my_cfgdir</literal>
3717 to abbreviate the calls of the <link linkend="source">source</link> command:
3720 <example id="ex-myvar1">
3721 <title>Using user-defined variables for config file readability</title>
3723 set my_cfgdir = $HOME/mutt/config
3725 source $my_cfgdir/hooks
3726 source $my_cfgdir/macros
3727 # more source commands...
3732 A custom variable can also be used in macros to backup the current value
3733 of another variable. In the following example, the value of the
3734 <link linkend="delete">$delete</link> is changed temporarily
3735 while its original value is saved as <literal>my_delete</literal>.
3736 After the macro has executed all commands, the original value of <link
3737 linkend="delete">$delete</link> is restored.
3740 <example id="ex-myvar2">
3741 <title>Using user-defined variables for backing up other config option values</title>
3743 macro pager ,x '\
3744 <enter-command>set my_delete=$delete<enter>\
3745 <enter-command>set delete=yes<enter>\
3747 <enter-command>set delete=$my_delete<enter>'
3752 Since mutt expands such values already when parsing the configuration
3753 file(s), the value of <literal>$my_delete</literal> in the
3754 last example would be the value of <literal>$delete</literal> exactly
3755 as it was at that point during parsing the configuration file. If
3756 another statement would change the value for <literal>$delete</literal>
3757 later in the same or another file, it would have no effect on
3758 <literal>$my_delete</literal>. However, the expansion can
3759 be deferred to runtime, as shown in the next example, when escaping the
3763 <example id="ex-myvar3">
3764 <title>Deferring user-defined variable expansion to runtime</title>
3766 macro pager <PageDown> "\
3767 <enter-command> set my_old_pager_stop=\$pager_stop pager_stop<Enter>\
3768 <next-page>\
3769 <enter-command> set pager_stop=\$my_old_pager_stop<Enter>\
3770 <enter-command> unset my_old_pager_stop<Enter>"
3775 Note that there is a space
3776 between <literal><enter-command></literal> and
3777 the <literal>set</literal> configuration command, preventing mutt from
3778 recording the macro's commands into its history.
3788 <title>Reading initialization commands from another file</title>
3793 <command>source</command>
3794 <arg choice="plain">
3795 <replaceable class="parameter">filename</replaceable>
3800 This command allows the inclusion of initialization commands
3801 from other files. For example, I place all of my aliases in
3802 <literal>˜/.mail_aliases</literal> so that I can make my
3803 <literal>˜/.muttrc</literal> readable and keep my aliases private.
3807 If the filename begins with a tilde (<quote>˜</quote>), it will be expanded to the
3808 path of your home directory.
3812 If the filename ends with a vertical bar (|), then <emphasis>filename</emphasis> is
3813 considered to be an executable program from which to read input (eg.
3814 <literal>source ˜/bin/myscript|</literal>).
3820 <title>Removing hooks</title>
3825 <command>unhook</command>
3826 <group choice="req">
3827 <arg choice="plain">
3828 <replaceable class="parameter">*</replaceable>
3830 <arg choice="plain">
3831 <replaceable class="parameter">hook-type</replaceable>
3837 This command permits you to flush hooks you have previously defined.
3838 You can either remove all hooks by giving the <quote>*</quote> character as an
3839 argument, or you can remove all hooks of a specific type by saying
3840 something like <literal>unhook send-hook</literal>.
3845 <sect1 id="formatstrings">
3846 <title>Format Strings</title>
3848 <sect2 id="formatstrings-basics">
3849 <title>Basic usage</title>
3852 Format strings are a general concept you'll find in several locations
3853 through the mutt configuration, especially in the
3854 <link linkend="index-format">$index_format</link>,
3855 <link linkend="pager-format">$pager_format</link>,
3856 <link linkend="status-format">$status_format</link>,
3857 and other <quote>*_format</quote> variables. These can be very straightforward,
3858 and it's quite possible you already know how to use them.
3862 The most basic format string element is a percent symbol followed
3863 by another character. For example, <literal>%s</literal>
3864 represents a message's Subject: header in the <link
3865 linkend="index-format">$index_format</link> variable. The
3866 <quote>expandos</quote> available are documented with each format variable, but
3867 there are general modifiers available with all formatting expandos,
3868 too. Those are our concern here.
3872 Some of the modifiers are borrowed right out of C (though you might
3873 know them from Perl, Python, shell, or another language). These are
3874 the [-]m.n modifiers, as in <literal>%-12.12s</literal>. As with
3875 such programming languages, these modifiers allow you to specify the
3876 minimum and maximum size of the resulting string, as well as its
3877 justification. If the <quote>-</quote> sign follows the percent, the string will
3878 be left-justified instead of right-justified. If there's a number
3879 immediately following that, it's the minimum amount of space the
3880 formatted string will occupy -- if it's naturally smaller than that, it
3881 will be padded out with spaces. If a decimal point and another number
3882 follow, that's the maximum space allowable -- the string will not be
3883 permitted to exceed that width, no matter its natural size. Each of
3884 these three elements is optional, so that all these are legal format
3886 <literal>%-12s</literal>
3887 <literal>%4c</literal>
3888 <literal>%.15F</literal>
3889 <literal>%-12.15L</literal>
3893 Mutt adds some other modifiers to format strings. If you use an equals
3894 symbol (<literal>=</literal>) as a numeric prefix (like the minus
3895 above), it will force the string to be centered within its minimum
3896 space range. For example, <literal>%=14y</literal> will reserve 14
3897 characters for the %y expansion -- that's the X-Label: header, in
3898 <literal>$index_format</literal>. If the expansion
3899 results in a string less than 14 characters, it will be centered in a
3900 14-character space. If the X-Label for a message were "test", that
3901 expansion would look like <quote> test </quote>.
3905 There are two very little-known modifiers that affect the way that an
3906 expando is replaced. If there is an underline (<quote>_</quote>) character
3907 between any format modifiers (as above) and the expando letter, it will
3908 expands in all lower case. And if you use a colon (<quote>:</quote>), it will
3909 replace all decimal points with underlines.
3914 <sect2 id="formatstrings-filters">
3915 <title>Filters</title>
3918 Any format string ending in a vertical bar (<quote>|</quote>) will be
3919 expanded and piped through the first word in the string, using spaces
3920 as separator. The string returned will be used for display.
3921 If the returned string ends in %, it will be passed through
3922 the formatter a second time. This allows the filter to generate a
3923 replacement format string including % expandos.
3927 All % expandos in a format string are expanded before the script
3931 <example id="ex-fmtpipe">
3932 <title>Using external filters in format strings</title>
3934 set status_format="script.sh '%r %f (%L)'|"
3939 will make mutt expand <literal>%r</literal>,
3940 <literal>%f</literal> and <literal>%L</literal>
3941 before calling the script. The example also shows that arguments can be
3942 quoted: the script will receive the expanded string between the single quotes
3943 as the only argument.
3947 A practical example is the <literal>mutt_xtitle</literal>
3948 script installed in the <literal>samples</literal>
3949 subdirectory of the mutt documentation: it can be used as filter for
3950 <literal>$status_format</literal> to set the current
3951 terminal's title, if supported.
3960 <chapter id="advancedusage">
3961 <title>Advanced Usage</title>
3964 <title>Regular Expressions</title>
3967 All string patterns in Mutt including those in more complex
3968 <link linkend="patterns">patterns</link> must be specified
3969 using regular expressions (regexp) in the <quote>POSIX extended</quote> syntax (which
3970 is more or less the syntax used by egrep and GNU awk). For your
3971 convenience, we have included below a brief description of this syntax.
3975 The search is case sensitive if the pattern contains at least one upper
3976 case letter, and case insensitive otherwise.
3981 Note that <quote>\</quote>
3982 must be quoted if used for a regular expression in an initialization
3983 command: <quote>\\</quote>.
3988 A regular expression is a pattern that describes a set of strings.
3989 Regular expressions are constructed analogously to arithmetic
3990 expressions, by using various operators to combine smaller expressions.
3995 Note that the regular expression can be enclosed/delimited by either "
3996 or ' which is useful if the regular expression includes a white-space
3997 character. See <xref linkend="muttrc-syntax"/>
3998 for more information on " and ' delimiter processing. To match a
3999 literal " or ' you must preface it with \ (backslash).
4004 The fundamental building blocks are the regular expressions that match
4005 a single character. Most characters, including all letters and digits,
4006 are regular expressions that match themselves. Any metacharacter with
4007 special meaning may be quoted by preceding it with a backslash.
4011 The period <quote>.</quote> matches any single character. The caret <quote>ˆ</quote> and
4012 the dollar sign <quote>$</quote> are metacharacters that respectively match
4013 the empty string at the beginning and end of a line.
4017 A list of characters enclosed by <quote>[</quote> and <quote>]</quote> matches any
4018 single character in that list; if the first character of the list
4019 is a caret <quote>ˆ</quote> then it matches any character <emphasis role="bold">not</emphasis> in the
4020 list. For example, the regular expression <emphasis role="bold">[0123456789]</emphasis>
4021 matches any single digit. A range of ASCII characters may be specified
4022 by giving the first and last characters, separated by a hyphen
4023 <quote>-</quote>. Most metacharacters lose their special meaning inside
4024 lists. To include a literal <quote>]</quote> place it first in the list.
4025 Similarly, to include a literal <quote>ˆ</quote> place it anywhere but first.
4026 Finally, to include a literal hyphen <quote>-</quote> place it last.
4030 Certain named classes of characters are predefined. Character classes
4031 consist of <quote>[:</quote>, a keyword denoting the class, and <quote>:]</quote>.
4032 The following classes are defined by the POSIX standard in
4033 <xref linkend="posix-regex-char-classes"/>
4036 <table id="posix-regex-char-classes">
4037 <title>POSIX regular expression character classes</title>
4040 <row><entry>Character class</entry><entry>Description</entry></row>
4043 <row><entry>[:alnum:]</entry><entry>Alphanumeric characters</entry></row>
4044 <row><entry>[:alpha:]</entry><entry>Alphabetic characters</entry></row>
4045 <row><entry>[:blank:]</entry><entry>Space or tab characters</entry></row>
4046 <row><entry>[:cntrl:]</entry><entry>Control characters</entry></row>
4047 <row><entry>[:digit:]</entry><entry>Numeric characters</entry></row>
4048 <row><entry>[:graph:]</entry><entry>Characters that are both printable and visible. (A space is printable, but not visible, while an <quote>a</quote> is both)</entry></row>
4049 <row><entry>[:lower:]</entry><entry>Lower-case alphabetic characters</entry></row>
4050 <row><entry>[:print:]</entry><entry>Printable characters (characters that are not control characters)</entry></row>
4051 <row><entry>[:punct:]</entry><entry>Punctuation characters (characters that are not letter, digits, control characters, or space characters)</entry></row>
4052 <row><entry>[:space:]</entry><entry>Space characters (such as space, tab and formfeed, to name a few)</entry></row>
4053 <row><entry>[:upper:]</entry><entry>Upper-case alphabetic characters</entry></row>
4054 <row><entry>[:xdigit:]</entry><entry>Characters that are hexadecimal digits</entry></row>
4060 A character class is only valid in a regular expression inside the
4061 brackets of a character list.
4066 Note that the brackets in these
4067 class names are part of the symbolic names, and must be included
4068 in addition to the brackets delimiting the bracket list. For
4069 example, <emphasis role="bold">[[:digit:]]</emphasis> is equivalent to
4070 <emphasis role="bold">[0-9]</emphasis>.
4075 Two additional special sequences can appear in character lists. These
4076 apply to non-ASCII character sets, which can have single symbols (called
4077 collating elements) that are represented with more than one character,
4078 as well as several characters that are equivalent for collating or
4085 <term>Collating Symbols</term>
4088 A collating symbol is a multi-character collating element enclosed in
4089 <quote>[.</quote> and <quote>.]</quote>. For example, if <quote>ch</quote> is a collating
4090 element, then <emphasis role="bold">[[.ch.]]</emphasis> is a regexp that matches
4091 this collating element, while <emphasis role="bold">[ch]</emphasis> is a regexp that
4092 matches either <quote>c</quote> or <quote>h</quote>.
4097 <term>Equivalence Classes</term>
4100 An equivalence class is a locale-specific name for a list of
4101 characters that are equivalent. The name is enclosed in <quote>[=</quote>
4102 and <quote>=]</quote>. For example, the name <quote>e</quote> might be used to
4103 represent all of <quote>è</quote> <quote>é</quote> and <quote>e</quote>. In this case,
4104 <emphasis role="bold">[[=e=]]</emphasis> is a regexp that matches any of
4105 <quote>è</quote>, <quote>é</quote> and <quote>e</quote>.
4112 A regular expression matching a single character may be followed by one
4113 of several repetition operators described in <xref linkend="regex-repeat"/>.
4116 <table id="regex-repeat">
4117 <title>Regular expression repetition operators</title>
4120 <row><entry>Operator</entry><entry>Description</entry></row>
4123 <row><entry>?</entry><entry>The preceding item is optional and matched at most once</entry></row>
4124 <row><entry>*</entry><entry>The preceding item will be matched zero or more times</entry></row>
4125 <row><entry>+</entry><entry>The preceding item will be matched one or more times</entry></row>
4126 <row><entry>{n}</entry><entry>The preceding item is matched exactly <emphasis>n</emphasis> times</entry></row>
4127 <row><entry>{n,}</entry><entry>The preceding item is matched <emphasis>n</emphasis> or more times</entry></row>
4128 <row><entry>{,m}</entry><entry>The preceding item is matched at most <emphasis>m</emphasis> times</entry></row>
4129 <row><entry>{n,m}</entry><entry>The preceding item is matched at least <emphasis>n</emphasis> times, but no more than <emphasis>m</emphasis> times</entry></row>
4135 Two regular expressions may be concatenated; the resulting regular
4136 expression matches any string formed by concatenating two substrings
4137 that respectively match the concatenated subexpressions.
4141 Two regular expressions may be joined by the infix operator <quote>|</quote>;
4142 the resulting regular expression matches any string matching either
4147 Repetition takes precedence over concatenation, which in turn takes
4148 precedence over alternation. A whole subexpression may be enclosed in
4149 parentheses to override these precedence rules.
4154 If you compile Mutt with the GNU <emphasis>rx</emphasis> package, the
4155 following operators may also be used in regular expressions as described in <xref linkend="regex-gnu-ext"/>.
4159 <table id="regex-gnu-ext">
4160 <title>GNU regular expression extensions</title>
4163 <row><entry>Expression</entry><entry>Description</entry></row>
4166 <row><entry>\\y</entry><entry>Matches the empty string at either the beginning or the end of a word</entry></row>
4167 <row><entry>\\B</entry><entry>Matches the empty string within a word</entry></row>
4168 <row><entry>\\<</entry><entry>Matches the empty string at the beginning of a word</entry></row>
4169 <row><entry>\\></entry><entry>Matches the empty string at the end of a word</entry></row>
4170 <row><entry>\\w</entry><entry>Matches any word-constituent character (letter, digit, or underscore)</entry></row>
4171 <row><entry>\\W</entry><entry>Matches any character that is not word-constituent</entry></row>
4172 <row><entry>\\`</entry><entry>Matches the empty string at the beginning of a buffer (string)</entry></row>
4173 <row><entry>\\'</entry><entry>Matches the empty string at the end of a buffer</entry></row>
4179 Please note however that these operators are not defined by POSIX, so
4180 they may or may not be available in stock libraries on various systems.
4185 <sect1 id="patterns">
4186 <title>Patterns: Searching, Limiting and Tagging</title>
4189 Many of Mutt's commands allow you to specify a pattern to match
4190 (<literal>limit</literal>, <literal>tag-pattern</literal>,
4191 <literal>delete-pattern</literal>, etc.). <xref linkend="tab-patterns"/>
4192 shows several ways to select messages.
4195 <table id="tab-patterns">
4196 <title>Pattern modifiers</title>
4199 <row><entry>Pattern modifier</entry><entry>Description</entry></row>
4202 <row><entry>~A</entry><entry>all messages</entry></row>
4203 <row><entry>~b <emphasis>EXPR</emphasis></entry><entry>messages which contain <emphasis>EXPR</emphasis> in the message body</entry></row>
4204 <row><entry>=b <emphasis>STRING</emphasis></entry><entry>messages which contain <emphasis>STRING</emphasis> in the message body. If IMAP is enabled, searches for <emphasis>STRING</emphasis> on the server, rather than downloading each message and searching it locally.</entry></row>
4205 <row><entry>~B <emphasis>EXPR</emphasis></entry><entry>messages which contain <emphasis>EXPR</emphasis> in the whole message</entry></row>
4206 <row><entry>~c <emphasis>EXPR</emphasis></entry><entry>messages carbon-copied to <emphasis>EXPR</emphasis></entry></row>
4207 <row><entry>%c <emphasis>GROUP</emphasis></entry><entry>messages carbon-copied to any member of <emphasis>GROUP</emphasis></entry></row>
4208 <row><entry>~C <emphasis>EXPR</emphasis></entry><entry>messages either to: or cc: <emphasis>EXPR</emphasis></entry></row>
4209 <row><entry>%C <emphasis>GROUP</emphasis></entry><entry>messages either to: or cc: to any member of <emphasis>GROUP</emphasis></entry></row>
4210 <row><entry>~d [<emphasis>MIN</emphasis>]-[<emphasis>MAX</emphasis>]</entry><entry>messages with <quote>date-sent</quote> in a Date range</entry></row>
4211 <row><entry>~D</entry><entry>deleted messages</entry></row>
4212 <row><entry>~e <emphasis>EXPR</emphasis></entry><entry>messages which contains <emphasis>EXPR</emphasis> in the <quote>Sender</quote> field</entry></row>
4213 <row><entry>%e <emphasis>GROUP</emphasis></entry><entry>messages which contain a member of <emphasis>GROUP</emphasis> in the <quote>Sender</quote> field</entry></row>
4214 <row><entry>~E</entry><entry>expired messages</entry></row>
4215 <row><entry>~F</entry><entry>flagged messages</entry></row>
4216 <row><entry>~f <emphasis>EXPR</emphasis></entry><entry>messages originating from <emphasis>EXPR</emphasis></entry></row>
4217 <row><entry>%f <emphasis>GROUP</emphasis></entry><entry>messages originating from any member of <emphasis>GROUP</emphasis></entry></row>
4218 <row><entry>~g</entry><entry>cryptographically signed messages</entry></row>
4219 <row><entry>~G</entry><entry>cryptographically encrypted messages</entry></row>
4220 <row><entry>~h <emphasis>EXPR</emphasis></entry><entry>messages which contain <emphasis>EXPR</emphasis> in the message header</entry></row>
4221 <row><entry>~H <emphasis>EXPR</emphasis></entry><entry>messages with a spam attribute matching <emphasis>EXPR</emphasis></entry></row>
4222 <row><entry>~i <emphasis>EXPR</emphasis></entry><entry>messages which match <emphasis>EXPR</emphasis> in the <quote>Message-ID</quote> field</entry></row>
4223 <row><entry>~k</entry><entry>messages which contain PGP key material</entry></row>
4224 <row><entry>~L <emphasis>EXPR</emphasis></entry><entry>messages either originated or received by <emphasis>EXPR</emphasis></entry></row>
4225 <row><entry>%L <emphasis>GROUP</emphasis></entry><entry>message either originated or received by any member of <emphasis>GROUP</emphasis></entry></row>
4226 <row><entry>~l</entry><entry>messages addressed to a known mailing list</entry></row>
4227 <row><entry>~m [<emphasis>MIN</emphasis>]-[<emphasis>MAX</emphasis>]</entry><entry>messages in the range <emphasis>MIN</emphasis> to <emphasis>MAX</emphasis> *)</entry></row>
4228 <row><entry>~n [<emphasis>MIN</emphasis>]-[<emphasis>MAX</emphasis>]</entry><entry>messages with a score in the range <emphasis>MIN</emphasis> to <emphasis>MAX</emphasis> *)</entry></row>
4229 <row><entry>~N</entry><entry>new messages</entry></row>
4230 <row><entry>~O</entry><entry>old messages</entry></row>
4231 <row><entry>~p</entry><entry>messages addressed to you (consults alternates)</entry></row>
4232 <row><entry>~P</entry><entry>messages from you (consults alternates)</entry></row>
4233 <row><entry>~Q</entry><entry>messages which have been replied to</entry></row>
4234 <row><entry>~r [<emphasis>MIN</emphasis>]-[<emphasis>MAX</emphasis>]</entry><entry>messages with <quote>date-received</quote> in a Date range</entry></row>
4235 <row><entry>~R</entry><entry>read messages</entry></row>
4236 <row><entry>~s <emphasis>EXPR</emphasis></entry><entry>messages having <emphasis>EXPR</emphasis> in the <quote>Subject</quote> field.</entry></row>
4237 <row><entry>~S</entry><entry>superseded messages</entry></row>
4238 <row><entry>~t <emphasis>EXPR</emphasis></entry><entry>messages addressed to <emphasis>EXPR</emphasis></entry></row>
4239 <row><entry>~T</entry><entry>tagged messages</entry></row>
4240 <row><entry>~u</entry><entry>messages addressed to a subscribed mailing list</entry></row>
4241 <row><entry>~U</entry><entry>unread messages</entry></row>
4242 <row><entry>~v</entry><entry>messages part of a collapsed thread.</entry></row>
4243 <row><entry>~V</entry><entry>cryptographically verified messages</entry></row>
4244 <row><entry>~x <emphasis>EXPR</emphasis></entry><entry>messages which contain <emphasis>EXPR</emphasis> in the <quote>References</quote> field</entry></row>
4245 <row><entry>~X [<emphasis>MIN</emphasis>]-[<emphasis>MAX</emphasis>]</entry><entry>messages with <emphasis>MIN</emphasis> to <emphasis>MAX</emphasis> attachments *)</entry></row>
4246 <row><entry>~y <emphasis>EXPR</emphasis></entry><entry>messages which contain <emphasis>EXPR</emphasis> in the <quote>X-Label</quote> field</entry></row>
4247 <row><entry>~z [<emphasis>MIN</emphasis>]-[<emphasis>MAX</emphasis>]</entry><entry>messages with a size in the range <emphasis>MIN</emphasis> to <emphasis>MAX</emphasis> *)</entry></row>
4248 <row><entry>~=</entry><entry>duplicated messages (see <link linkend="duplicate-threads">$duplicate_threads</link>)</entry></row>
4249 <row><entry>~$</entry><entry>unreferenced messages (requires threaded view)</entry></row>
4250 <row><entry>~(<emphasis>PATTERN</emphasis>)</entry><entry>messages in threads
4251 containing messages matching <emphasis>PATTERN</emphasis>, e.g. all
4252 threads containing messages from you: ~(~P)</entry></row>
4258 Where <emphasis>EXPR</emphasis> is a
4259 <link linkend="regexp">regular expression</link>. Special attention has to be
4260 made when using regular expressions inside of patterns. Specifically,
4261 Mutt's parser for these patterns will strip one level of backslash (<quote>\</quote>),
4262 which is normally used for quoting. If it is your intention to use a
4263 backslash in the regular expression, you will need to use two backslashes
4264 instead (<quote>\\</quote>). You can force mutt to treat <emphasis>EXPR</emphasis> as a simple string
4265 instead of a regular expression by using = instead of ˜ in the
4266 pattern name. For example, <literal>=b *.*</literal> will find all messages that contain
4267 the literal string <quote>*.*</quote>. Simple string matches are less powerful than
4268 regular expressions but can be considerably faster. This is especially
4269 true for IMAP folders, because string matches can be performed on the
4270 server instead of by fetching every message. IMAP treats <literal>=h</literal> specially:
4271 it must be of the form "header: substring" and will not partially
4272 match header names. The substring part may be omitted if you simply
4273 wish to find messages containing a particular header without regard to
4278 *) The forms <quote><[<emphasis>MAX</emphasis>]</quote>, <quote>>[<emphasis>MIN</emphasis>]</quote>,
4279 <quote>[<emphasis>MIN</emphasis>]-</quote> and <quote>-[<emphasis>MAX</emphasis>]</quote>
4283 <sect2 id="patterns-modifier">
4284 <title>Pattern Modifier</title>
4288 Note that patterns matching 'lists' of addresses (notably c, C, p, P and t)
4289 match if there is at least one match in the whole list. If you want to
4290 make sure that all elements of that list match, you need to prefix your
4291 pattern with <quote>ˆ</quote>.
4292 This example matches all mails which only has recipients from Germany.
4302 <sect2 id="simple-patterns">
4303 <title>Simple Patterns</title>
4306 Mutt supports two versions of so called <quote>simple searches</quote> which are
4307 issued if the query entered for searching, limiting and similar
4308 operations does not seem to be a valid pattern (i.e. it does not contain
4309 one of these characters: <quote>˜</quote>, <quote>=</quote> or <quote>%</quote>). If the query is
4310 supposed to contain one of these special characters, they must be escaped
4311 by prepending a backslash (<quote>\</quote>).
4315 The first type is by checking whether the query string equals
4316 a keyword case-insensitively from <xref linkend="tab-simplesearch-keywords"/>:
4317 If that is the case, Mutt will use the shown pattern modifier instead.
4318 If a keyword would conflict with your search keyword, you need to turn
4319 it into a regular expression to avoid matching the keyword table. For
4320 example, if you want to find all messages matching <quote>flag</quote>
4321 (using <link linkend="simple-search">$simple_search</link>)
4322 but don't want to match flagged messages, simply search for
4323 <quote><literal>[f]lag</literal></quote>.
4326 <table id="tab-simplesearch-keywords">
4327 <title>Simple search keywords</title>
4330 <row><entry>Keyword</entry><entry>Pattern modifier</entry></row>
4333 <row><entry>all</entry><entry>~A</entry></row>
4334 <row><entry>.</entry><entry>~A</entry></row>
4335 <row><entry>ˆ</entry><entry>~A</entry></row>
4336 <row><entry>del</entry><entry>~D</entry></row>
4337 <row><entry>flag</entry><entry>~F</entry></row>
4338 <row><entry>new</entry><entry>~N</entry></row>
4339 <row><entry>old</entry><entry>~O</entry></row>
4340 <row><entry>repl</entry><entry>~Q</entry></row>
4341 <row><entry>read</entry><entry>~R</entry></row>
4342 <row><entry>tag</entry><entry>~T</entry></row>
4343 <row><entry>unread</entry><entry>~U</entry></row>
4349 The second type of simple search is to build a complex search
4350 pattern using <link linkend="simple-search">$simple_search</link>
4351 as a template. Mutt will insert your query properly quoted and search
4352 for the composed complex query.
4357 <sect2 id="complex-patterns">
4358 <title>Complex Patterns</title>
4361 Logical AND is performed by specifying more than one criterion. For
4370 would select messages which contain the word <quote>mutt</quote> in the list of
4371 recipients <emphasis role="bold">and</emphasis> that have the word <quote>elkins</quote> in the <quote>From</quote> header
4376 Mutt also recognizes the following operators to create more complex search
4384 ! -- logical NOT operator
4390 | -- logical OR operator
4396 () -- logical grouping operator
4403 Here is an example illustrating a complex search pattern. This pattern will
4404 select all messages which do not contain <quote>mutt</quote> in the <quote>To</quote> or <quote>Cc</quote>
4405 field and which are from <quote>elkins</quote>.
4408 <example id="ex-pattern-bool">
4409 <title>Using boolean operators in patterns</title>
4411 !(~t mutt|~c mutt) ~f elkins
4416 Here is an example using white space in the regular expression (note
4417 the ' and " delimiters). For this to match, the mail's subject must
4418 match the <quote>ˆJunk +From +Me$</quote> and it must be from either <quote>Jim +Somebody</quote>
4419 or <quote>Ed +SomeoneElse</quote>:
4423 '~s "^Junk +From +Me$" ~f ("Jim +Somebody"|"Ed +SomeoneElse")'
4428 If a regular expression contains parenthesis, or a vertical bar
4429 ("|"), you <emphasis role="bold">must</emphasis> enclose the expression in double or single quotes since
4430 those characters are also used to separate different parts of Mutt's
4431 pattern language. For example: <literal>~f "me@(mutt\.org|cs\.hmc\.edu)"</literal>
4436 Without the quotes, the parenthesis wouldn't end.
4437 This would be separated to two OR'd patterns: <emphasis>˜f me@(mutt\.org</emphasis>
4438 and <emphasis>cs\.hmc\.edu)</emphasis>. They are never what you want.
4443 <sect2 id="date-patterns">
4444 <title>Searching by Date</title>
4447 Mutt supports two types of dates, <emphasis>absolute</emphasis> and <emphasis>relative</emphasis>.
4451 <emphasis role="bold">Absolute</emphasis>. Dates <emphasis role="bold">must</emphasis> be in DD/MM/YY format (month and year are
4452 optional, defaulting to the current month and year). An example of a valid
4457 Limit to messages matching: ~d 20/1/95-31/10
4461 If you omit the minimum (first) date, and just specify <quote>-DD/MM/YY</quote>, all
4462 messages <emphasis>before</emphasis> the given date will be selected. If you omit the maximum
4463 (second) date, and specify <quote>DD/MM/YY-</quote>, all messages <emphasis>after</emphasis> the given
4464 date will be selected. If you specify a single date with no dash (<quote>-</quote>),
4465 only messages sent on the given date will be selected.
4469 <emphasis role="bold">Error Margins</emphasis>. You can add error margins to absolute dates.
4470 An error margin is a sign (+ or -), followed by a digit, followed by
4471 one of the units in <xref linkend="tab-date-units"/>. As a special case, you can replace the
4472 sign by a <quote>*</quote> character, which is equivalent to giving identical plus and minus error margins.
4475 <table id="tab-date-units">
4476 <title>Date units</title>
4479 <row><entry>Unit</entry><entry>Description</entry></row>
4482 <row><entry>y</entry><entry>Years</entry></row>
4483 <row><entry>m</entry><entry>Months</entry></row>
4484 <row><entry>w</entry><entry>Weeks</entry></row>
4485 <row><entry>d</entry><entry>Days</entry></row>
4491 Example: To select any messages two weeks around January 15, 2001,
4492 you'd use the following pattern:
4496 Limit to messages matching: ~d 15/1/2001*2w
4500 <emphasis role="bold">Relative</emphasis>. This type of date is relative to the current date, and may
4508 ><emphasis>offset</emphasis> (messages older than <emphasis>offset</emphasis> units)
4514 <<emphasis>offset</emphasis> (messages newer than <emphasis>offset</emphasis> units)
4520 =<emphasis>offset</emphasis> (messages exactly <emphasis>offset</emphasis> units old)
4527 <emphasis>offset</emphasis> is specified as a positive number with one of the units from <xref linkend="tab-date-units"/>.
4531 Example: to select messages less than 1 month old, you would use
4535 Limit to messages matching: ~d <1m
4540 All dates used when searching are relative to the
4541 <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
4542 <literal>%[...]</literal> format, these are <emphasis role="bold">not</emphasis> the dates shown
4552 <title>Using Tags</title>
4555 Sometimes it is desirable to perform an operation on a group of
4556 messages all at once rather than one at a time. An example might be
4557 to save messages to a mailing list to a separate folder, or to
4558 delete all messages with a given subject. To tag all messages
4559 matching a pattern, use the <literal><tag-pattern></literal> function, which is bound to
4560 <quote>shift-T</quote> by default. Or you can select individual messages by
4561 hand using the <literal><tag-message></literal> function, which is bound to <quote>t</quote> by
4562 default. See <link linkend="patterns">patterns</link> for Mutt's pattern
4567 Once you have tagged the desired messages, you can use the
4568 <quote>tag-prefix</quote> operator, which is the <quote>;</quote> (semicolon) key by default.
4569 When the <quote>tag-prefix</quote> operator is used, the <emphasis role="bold">next</emphasis> operation will
4570 be applied to all tagged messages if that operation can be used in that
4571 manner. If the <link linkend="auto-tag">$auto_tag</link>
4572 variable is set, the next operation applies to the tagged messages
4573 automatically, without requiring the <quote>tag-prefix</quote>.
4577 In <link linkend="macro">macros</link> or <link linkend="push">push</link> commands,
4578 you can use the <quote>tag-prefix-cond</quote> operator. If there are no tagged
4579 messages, mutt will "eat" the rest of the macro to abort it's execution.
4580 Mutt will stop "eating" the macro when it encounters the <quote>end-cond</quote>
4581 operator; after this operator the rest of the macro will be executed as
4588 <title>Using Hooks</title>
4591 A <emphasis>hook</emphasis> is a concept found in many other programs which allows you to
4592 execute arbitrary commands before performing some operation. For example,
4593 you may wish to tailor your configuration based upon which mailbox you are
4594 reading, or to whom you are sending mail. In the Mutt world, a <emphasis>hook</emphasis>
4595 consists of a <link linkend="regexp">regular expression</link> or
4596 <link linkend="patterns">pattern</link> along with a
4597 configuration option/command. See
4603 <link linkend="folder-hook">folder-hook</link>
4609 <link linkend="send-hook">send-hook</link>
4615 <link linkend="message-hook">message-hook</link>
4621 <link linkend="save-hook">save-hook</link>
4627 <link linkend="mbox-hook">mbox-hook</link>
4633 <link linkend="fcc-hook">fcc-hook</link>
4639 <link linkend="fcc-save-hook">fcc-save-hook</link>
4645 for specific details on each type of <emphasis>hook</emphasis> available.
4650 If a hook changes configuration settings, these changes remain
4651 effective until the end of the current mutt session. As this is generally
4652 not desired, a default hook needs to be added before all other hooks to
4653 restore configuration defaults. Here is an example with send-hook and the
4654 my_hdr directive:
4658 <example id="ex-send-hook-my-hdr">
4659 <title>Combining <literal>send-hook</literal> and <literal>my_hdr</literal></title>
4661 send-hook . 'unmy_hdr From:'
4662 send-hook ~C'^b@b\.b$' my_hdr from: c@c.c
4666 <sect2 id="pattern-hook" xreflabel="Message Matching in Hooks">
4667 <title>Message Matching in Hooks</title>
4670 Hooks that act upon messages (<literal>message-hook, reply-hook,
4671 send-hook, send2-hook, save-hook, fcc-hook</literal>) are evaluated in a
4672 slightly different manner. For the other
4673 types of hooks, a <link linkend="regexp">regular expression</link> is
4674 sufficient. But in dealing with messages a finer grain of control is
4675 needed for matching since for different purposes you want to match
4680 Mutt allows the use of the <link linkend="patterns">search pattern</link>
4681 language for matching messages in hook commands. This works in
4682 exactly the same way as it would when <emphasis>limiting</emphasis> or
4683 <emphasis>searching</emphasis> the mailbox, except that you are restricted to those
4684 operators which match information mutt extracts from the header of
4685 the message (i.e., from, to, cc, date, subject, etc.).
4689 For example, if you wanted to set your return address based upon sending
4690 mail to a specific address, you could do something like:
4694 send-hook '~t ^me@cs\.hmc\.edu$' 'my_hdr From: Mutt User <user@host>'
4698 which would execute the given command when sending mail to
4699 <emphasis>me@cs.hmc.edu</emphasis>.
4703 However, it is not required that you write the pattern to match using the
4704 full searching language. You can still specify a simple <emphasis>regular
4705 expression</emphasis> like the other hooks, in which case Mutt will translate your
4706 pattern into the full language, using the translation specified by the
4707 <link linkend="default-hook">$default_hook</link> variable. The
4708 pattern is translated at the time the hook is declared, so the value of
4709 <link linkend="default-hook">$default_hook</link> that is in effect
4710 at that time will be used.
4718 <title>External Address Queries</title>
4721 Mutt supports connecting to external directory databases such as LDAP,
4722 ph/qi, bbdb, or NIS through a wrapper script which connects to mutt
4723 using a simple interface. Using the <link linkend="query-command">$query_command</link> variable, you specify the wrapper
4724 command to use. For example:
4728 set query_command = "mutt_ldap_query.pl '%s'"
4732 The wrapper script should accept the query on the command-line. It
4733 should return a one line message, then each matching response on a
4734 single line, each line containing a tab separated address then name then
4735 some other optional information. On error, or if there are no matching
4736 addresses, return a non-zero exit code and a one line error message.
4740 An example multiple response output:
4744 Searching database ... 20 entries ... 3 matching:
4745 me@cs.hmc.edu Michael Elkins mutt dude
4746 blong@fiction.net Brandon Long mutt and more
4747 roessler@does-not-exist.org Thomas Roessler mutt pgp
4751 There are two mechanisms for accessing the query function of mutt. One
4752 is to do a query from the index menu using the <literal><query></literal> function (default: Q).
4753 This will prompt for a query, then bring up the query menu which will
4754 list the matching responses. From the query menu, you can select
4755 addresses to create aliases, or to mail. You can tag multiple addresses
4756 to mail, start a new query, or have a new query appended to the current
4761 The other mechanism for accessing the query function is for address
4762 completion, similar to the alias completion. In any prompt for address
4763 entry, you can use the <literal><complete-query></literal> function (default: ˆT) to run a
4764 query based on the current address you have typed. Like aliases, mutt
4765 will look for what you have typed back to the last space or comma. If
4766 there is a single response for that query, mutt will expand the address
4767 in place. If there are multiple responses, mutt will activate the query
4768 menu. At the query menu, you can select one or more addresses to be
4769 added to the prompt.
4774 <sect1 id="mailbox-formats">
4775 <title>Mailbox Formats</title>
4778 Mutt supports reading and writing of four different mailbox formats:
4779 mbox, MMDF, MH and Maildir. The mailbox type is autodetected, so there
4780 is no need to use a flag for different mailbox types. When creating new
4781 mailboxes, Mutt uses the default specified with the <link linkend="mbox-type">$mbox_type</link> variable.
4785 <emphasis role="bold">mbox</emphasis>. This is the most widely used mailbox format for UNIX. All
4786 messages are stored in a single file. Each message has a line of the form:
4790 From me@cs.hmc.edu Fri, 11 Apr 1997 11:44:56 PST
4794 to denote the start of a new message (this is often referred to as the
4795 <quote>From_</quote> line).
4799 <emphasis role="bold">MMDF</emphasis>. This is a variant of the <emphasis>mbox</emphasis> format. Each message is
4800 surrounded by lines containing <quote>ˆAˆAˆAˆA</quote> (four control-A's).
4804 <emphasis role="bold">MH</emphasis>. A radical departure from <emphasis>mbox</emphasis> and <emphasis>MMDF</emphasis>, a mailbox
4805 consists of a directory and each message is stored in a separate file.
4806 The filename indicates the message number (however, this is may not
4807 correspond to the message number Mutt displays). Deleted messages are
4808 renamed with a comma (,) prepended to the filename. Mutt
4809 detects this type of mailbox by looking for either <literal>.mh_sequences</literal>
4810 or <literal>.xmhcache</literal> (needed to distinguish normal directories from MH
4815 <emphasis role="bold">Maildir</emphasis>. The newest of the mailbox formats, used by the Qmail MTA (a
4816 replacement for sendmail). Similar to <emphasis>MH</emphasis>, except that it adds three
4817 subdirectories of the mailbox: <emphasis>tmp</emphasis>, <emphasis>new</emphasis> and <emphasis>cur</emphasis>. Filenames
4818 for the messages are chosen in such a way they are unique, even when two
4819 programs are writing the mailbox over NFS, which means that no file locking
4825 <sect1 id="shortcuts">
4826 <title>Mailbox Shortcuts</title>
4829 There are a number of built in shortcuts which refer to specific mailboxes.
4830 These shortcuts can be used anywhere you are prompted for a file or mailbox
4838 ! -- refers to your <link linkend="spoolfile">$spoolfile</link> (incoming) mailbox
4844 > -- refers to your <link linkend="mbox">$mbox</link> file
4850 < -- refers to your <link linkend="record">$record</link> file
4856 ˆ -- refers to the current mailbox
4862 - or !! -- refers to the file you've last visited
4868 ˜ -- refers to your home directory
4874 = or + -- refers to your <link linkend="folder">$folder</link> directory
4880 @<emphasis>alias</emphasis> -- refers to the <link linkend="save-hook">default save folder</link> as determined by the address of the alias
4888 <sect1 id="using-lists">
4889 <title>Handling Mailing Lists</title>
4892 Mutt has a few configuration options that make dealing with large
4893 amounts of mail easier. The first thing you must do is to let Mutt
4894 know what addresses you consider to be mailing lists (technically
4895 this does not have to be a mailing list, but that is what it is most
4896 often used for), and what lists you are subscribed to. This is
4897 accomplished through the use of the <link linkend="lists">lists and subscribe</link> commands in your muttrc.
4901 Now that Mutt knows what your mailing lists are, it can do several
4902 things, the first of which is the ability to show the name of a list
4903 through which you received a message (i.e., of a subscribed list) in
4904 the <emphasis>index</emphasis> menu display. This is useful to distinguish between
4905 personal and list mail in the same mailbox. In the <link linkend="index-format">$index_format</link> variable, the escape <quote>%L</quote>
4906 will return the string <quote>To <list></quote> when <quote>list</quote> appears in the
4907 <quote>To</quote> field, and <quote>Cc <list></quote> when it appears in the <quote>Cc</quote>
4908 field (otherwise it returns the name of the author).
4912 Often times the <quote>To</quote> and <quote>Cc</quote> fields in mailing list messages
4913 tend to get quite large. Most people do not bother to remove the
4914 author of the message they reply to from the list, resulting in
4915 two or more copies being sent to that person. The <literal><list-reply></literal>
4916 function, which by default is bound to <quote>L</quote> in the <emphasis>index</emphasis> menu
4917 and <emphasis>pager</emphasis>, helps reduce the clutter by only replying to the
4918 known mailing list addresses instead of all recipients (except as
4919 specified by <literal>Mail-Followup-To</literal>, see below).
4923 Mutt also supports the <literal>Mail-Followup-To</literal> header. When you send
4924 a message to a list of recipients which includes one or several
4925 subscribed mailing lists, and if the <link linkend="followup-to">$followup_to</link> option is set, mutt will generate
4926 a Mail-Followup-To header which contains all the recipients to whom
4927 you send this message, but not your address. This indicates that
4928 group-replies or list-replies (also known as <quote>followups</quote>) to this
4929 message should only be sent to the original recipients of the
4930 message, and not separately to you - you'll receive your copy through
4931 one of the mailing lists you are subscribed to.
4935 Conversely, when group-replying or list-replying to a message which
4936 has a <literal>Mail-Followup-To</literal> header, mutt will respect this header if
4937 the <link linkend="honor-followup-to">$honor_followup_to</link> configuration
4938 variable is set. Using list-reply will in this case also make sure
4939 that the reply goes to the mailing list, even if it's not specified
4940 in the list of recipients in the <literal>Mail-Followup-To</literal>.
4945 When header editing is enabled, you can create a
4946 <literal>Mail-Followup-To</literal> header manually. Mutt will only auto-generate
4947 this header if it doesn't exist when you send the message.
4952 The other method some mailing list admins use is to generate a
4953 <quote>Reply-To</quote> field which points back to the mailing list address rather
4954 than the author of the message. This can create problems when trying
4955 to reply directly to the author in private, since most mail clients
4956 will automatically reply to the address given in the <quote>Reply-To</quote>
4957 field. Mutt uses the <link linkend="reply-to">$reply_to</link>
4958 variable to help decide which address to use. If set to <emphasis>ask-yes</emphasis> or
4959 <emphasis>ask-no</emphasis>, you will be
4960 prompted as to whether or not you would like to use the address given in
4961 the <quote>Reply-To</quote> field, or reply directly to the address given in the
4962 <quote>From</quote> field. When set to <emphasis>yes</emphasis>, the <quote>Reply-To</quote> field will be used when
4967 The <quote>X-Label:</quote> header field can be used to further identify mailing
4968 lists or list subject matter (or just to annotate messages
4969 individually). The <link linkend="index-format">$index_format</link> variable's <quote>%y</quote> and
4970 <quote>%Y</quote> escapes can be used to expand <quote>X-Label:</quote> fields in the
4971 index, and Mutt's pattern-matcher can match regular expressions to
4972 <quote>X-Label:</quote> fields with the <quote>˜y</quote> selector. <quote>X-Label:</quote> is not a
4973 standard message header field, but it can easily be inserted by procmail
4974 and other mail filtering agents.
4978 Lastly, Mutt has the ability to <link linkend="sort">sort</link> the mailbox into
4979 <link linkend="threads">threads</link>. A thread is a group of messages which all relate to the same
4980 subject. This is usually organized into a tree-like structure where a
4981 message and all of its replies are represented graphically. If you've ever
4982 used a threaded news client, this is the same concept. It makes dealing
4983 with large volume mailing lists easier because you can easily delete
4984 uninteresting threads and quickly find topics of value.
4989 <sect1 id="handling-folders">
4990 <title>Handling multiple folders</title>
4993 Mutt supports setups with multiple folders, allowing all of them to
4994 be monitored for new mail (see <xref linkend="mailboxes"/> for details).
4998 When in the index menu and being idle (also see
4999 <link linkend="timeout">$timeout</link>), Mutt periodically checks
5000 for new mail in all folders which have been configured via the
5001 <literal>mailboxes</literal> command. The interval depends on the folder
5002 type: for local/IMAP folders it consults
5003 <link linkend="mail-check">$mail_check</link> and
5004 <link linkend="pop-checkinterval">$pop_checkinterval</link>
5009 Outside the index menu the directory browser supports checking
5010 for new mail using the <literal><check-new></literal> function which is
5011 unbound by default. Pressing TAB will bring up a
5012 menu showing the files specified by the <literal>mailboxes</literal> command,
5013 and indicate which contain new messages. Mutt will automatically enter this
5014 mode when invoked from the command line with the <literal>-y</literal> option.
5018 For the pager, index and directory browser menus, Mutt contains the
5019 <literal><buffy-list></literal> function (bound to <quote>.</quote> by default)
5020 which will print a list of folders with new mail in the command line at
5021 the bottom of the screen.
5025 For the index, by default Mutt displays the number of mailboxes with new
5026 mail in the status bar, please refer to the
5027 <link linkend="index-format">$index_format</link>
5028 variable for details.
5032 When changing folders, Mutt fills the prompt with the first folder from
5033 the mailboxes list containing new mail (if any), pressing
5034 <emphasis>space</emphasis> will cycle through folders with new mail.
5039 <sect1 id="editing-threads">
5040 <title>Editing threads</title>
5043 Mutt has the ability to dynamically restructure threads that are broken
5044 either by misconfigured software or bad behavior from some
5045 correspondents. This allows to clean your mailboxes formats) from these
5046 annoyances which make it hard to follow a discussion.
5049 <sect2 id="link-threads">
5050 <title>Linking threads</title>
5053 Some mailers tend to "forget" to correctly set the "In-Reply-To:" and
5054 "References:" headers when replying to a message. This results in broken
5055 discussions because Mutt has not enough information to guess the correct
5057 You can fix this by tagging the reply, then moving to the parent message
5058 and using the <literal><link-threads></literal> function (bound to & by default). The
5059 reply will then be connected to this "parent" message.
5063 You can also connect multiple children at once, tagging them and using the
5064 tag-prefix command (';') or the auto_tag option.
5069 <sect2 id="break-threads">
5070 <title>Breaking threads</title>
5073 On mailing lists, some people are in the bad habit of starting a new
5074 discussion by hitting "reply" to any message from the list and changing
5075 the subject to a totally unrelated one.
5076 You can fix such threads by using the <literal><break-thread></literal> function (bound
5077 by default to #), which will turn the subthread starting from the
5078 current message into a whole different thread.
5086 <title>Delivery Status Notification (DSN) Support</title>
5089 RFC1894 defines a set of MIME content types for relaying information
5090 about the status of electronic mail messages. These can be thought of as
5091 <quote>return receipts.</quote>
5095 To support DSN, there are two variables. <link linkend="dsn-notify">$dsn_notify</link> is used to request receipts for
5096 different results (such as failed message, message delivered, etc.).
5097 <link linkend="dsn-return">$dsn_return</link> requests how much
5098 of your message should be returned with the receipt (headers or full
5103 When using <link linkend="sendmail">$sendmail</link> for mail
5104 delivery, you need to use either Berkeley sendmail 8.8.x (or greater) a MTA
5105 supporting DSN command line options compatible to Sendmail: The -N and -R
5106 options can be used by the mail client to make requests as to what type of
5107 status messages should be returned. Please consider your MTA documentation
5108 whether DSN is supported.
5112 For SMTP delivery using <link
5113 linkend="smtp-url">$smtp_url</link>, it depends on the
5114 capabilities announced by the server whether mutt will attempt to
5120 <sect1 id="urlview">
5121 <title>Start a WWW Browser on URLs</title>
5124 If a message contains URLs, it is efficient to get
5125 a menu with all the URLs and start a WWW browser on one of them. This
5126 functionality is provided by the external urlview program which can be
5128 <ulink url="ftp://ftp.mutt.org/mutt/contrib/">ftp://ftp.mutt.org/mutt/contrib/</ulink>
5129 and the configuration commands:
5133 macro index \cb |urlview\n
5134 macro pager \cb |urlview\n
5141 <chapter id="mimesupport">
5142 <title>Mutt's MIME Support</title>
5145 Quite a bit of effort has been made to make Mutt the premier text-mode
5146 MIME MUA. Every effort has been made to provide the functionality that
5147 the discerning MIME user requires, and the conformance to the standards
5148 wherever possible. When configuring Mutt for MIME, there are two extra
5149 types of configuration files which Mutt uses. One is the
5150 <literal>mime.types</literal> file, which contains the mapping of file extensions to
5151 IANA MIME types. The other is the <literal>mailcap</literal> file, which specifies
5152 the external commands to use for handling specific MIME types.
5155 <sect1 id="using-mime">
5156 <title>Using MIME in Mutt</title>
5159 There are three areas/menus in Mutt which deal with MIME, they are the
5160 pager (while viewing a message), the attachment menu and the compose
5164 <sect2 id="mime-pager">
5165 <title>Viewing MIME messages in the pager</title>
5168 When you select a message from the index and view it in the pager, Mutt
5169 decodes the message to a text representation. Mutt internally supports
5170 a number of MIME types, including <literal>text/plain, text/enriched,
5171 message/rfc822, and message/news</literal>. In addition, the export
5172 controlled version of Mutt recognizes a variety of PGP MIME types,
5173 including PGP/MIME and application/pgp.
5177 Mutt will denote attachments with a couple lines describing them.
5178 These lines are of the form:
5182 [-- Attachment #1: Description --]
5183 [-- Type: text/plain, Encoding: 7bit, Size: 10000 --]
5187 Where the <literal>Description</literal> is the description or filename given for the
5188 attachment, and the <literal>Encoding</literal> is one of
5189 <literal>7bit/8bit/quoted-printable/base64/binary</literal>.
5193 If Mutt cannot deal with a MIME type, it will display a message like:
5197 [-- image/gif is unsupported (use 'v' to view this part) --]
5202 <sect2 id="attach-menu">
5203 <title>The Attachment Menu</title>
5206 The default binding for <literal>view-attachments</literal> is `v', which displays the
5207 attachment menu for a message. The attachment menu displays a list of
5208 the attachments in a message. From the attachment menu, you can save,
5209 print, pipe, delete, and view attachments. You can apply these
5210 operations to a group of attachments at once, by tagging the attachments
5211 and by using the <quote>tag-prefix</quote> operator. You can also reply to the
5212 current message from this menu, and only the current attachment (or the
5213 attachments tagged) will be quoted in your reply. You can view
5214 attachments as text, or view them using the mailcap viewer definition.
5218 Finally, you can apply the usual message-related functions (like
5219 <link linkend="resend-message"><literal><resend-message></literal></link>, and the
5220 <literal><reply></literal> and <literal><forward></literal>
5221 functions) to attachments of type <literal>message/rfc822</literal>.
5225 See the help on the attachment menu for more information.
5230 <sect2 id="compose-menu">
5231 <title>The Compose Menu</title>
5234 The compose menu is the menu you see before you send a message. It
5235 allows you to edit the recipient list, the subject, and other aspects
5236 of your message. It also contains a list of the attachments of your
5237 message, including the main body. From this menu, you can print, copy,
5238 filter, pipe, edit, compose, review, and rename an attachment or a
5239 list of tagged attachments. You can also modifying the attachment
5240 information, notably the type, encoding and description.
5244 Attachments appear as follows:
5248 - 1 [text/plain, 7bit, 1K] /tmp/mutt-euler-8082-0 <no description>
5249 2 [applica/x-gunzip, base64, 422K] ~/src/mutt-0.85.tar.gz <no description>
5253 The '-' denotes that Mutt will delete the file after sending (or
5254 postponing, or canceling) the message. It can be toggled with the
5255 <literal>toggle-unlink</literal> command (default: u). The next field is the MIME
5256 content-type, and can be changed with the <literal>edit-type</literal> command
5257 (default: ˆT). The next field is the encoding for the attachment,
5258 which allows a binary message to be encoded for transmission on 7bit
5259 links. It can be changed with the <literal>edit-encoding</literal> command
5260 (default: ˆE). The next field is the size of the attachment,
5261 rounded to kilobytes or megabytes. The next field is the filename,
5262 which can be changed with the <literal>rename-file</literal> command (default: R).
5263 The final field is the description of the attachment, and can be
5264 changed with the <literal>edit-description</literal> command (default: d).
5271 <sect1 id="mime-types">
5272 <title>MIME Type configuration with <literal>mime.types</literal></title>
5275 When you add an attachment to your mail message, Mutt searches your
5276 personal mime.types file at <literal>${HOME}/.mime.types</literal>, and then
5277 the system mime.types file at <literal>/usr/local/share/mutt/mime.types</literal> or
5278 <literal>/etc/mime.types</literal>
5282 The mime.types file consist of lines containing a MIME type and a space
5283 separated list of extensions. For example:
5287 application/postscript ps eps
5289 audio/x-aiff aif aifc aiff
5293 A sample <literal>mime.types</literal> file comes with the Mutt distribution, and
5294 should contain most of the MIME types you are likely to use.
5298 If Mutt can not determine the mime type by the extension of the file you
5299 attach, it will look at the file. If the file is free of binary
5300 information, Mutt will assume that the file is plain text, and mark it
5301 as <literal>text/plain</literal>. If the file contains binary information, then Mutt will
5302 mark it as <literal>application/octet-stream</literal>. You can change the MIME
5303 type that Mutt assigns to an attachment by using the <literal>edit-type</literal>
5304 command from the compose menu (default: ˆT). The MIME type is actually a
5305 major mime type followed by the sub-type, separated by a '/'. 6 major
5306 types: application, text, image, video, audio, and model have been approved
5307 after various internet discussions. Mutt recognizes all of these if the
5308 appropriate entry is found in the mime.types file. It also recognizes other
5309 major mime types, such as the chemical type that is widely used in the
5310 molecular modeling community to pass molecular data in various forms to
5311 various molecular viewers. Non-recognized mime types should only be used
5312 if the recipient of the message is likely to be expecting such attachments.
5317 <sect1 id="mailcap">
5318 <title>MIME Viewer configuration with <literal>mailcap</literal></title>
5321 Mutt supports RFC 1524 MIME Configuration, in particular the Unix
5322 specific format specified in Appendix A of RFC 1524. This file format
5323 is commonly referred to as the mailcap format. Many MIME compliant
5324 programs utilize the mailcap format, allowing you to specify handling
5325 for all MIME types in one place for all programs. Programs known to
5326 use this format include Netscape, XMosaic, lynx and metamail.
5330 In order to handle various MIME types that Mutt can not handle
5331 internally, Mutt parses a series of external configuration files to
5332 find an external handler. The default search string for these files
5333 is a colon delimited list containing the following files:
5337 <listitem><para><literal>$HOME/.mailcap</literal></para></listitem>
5338 <listitem><para><literal>$PKGDATADIR/mailcap</literal></para></listitem>
5339 <listitem><para><literal>$SYSCONFDIR/mailcap</literal></para></listitem>
5340 <listitem><para><literal>/etc/mailcap</literal></para></listitem>
5341 <listitem><para><literal>/usr/etc/mailcap</literal></para></listitem>
5342 <listitem><para><literal>/usr/local/etc/mailcap</literal></para></listitem>
5346 where <literal>$HOME</literal> is your home directory. The
5347 <literal>$PKGDATADIR</literal> and the
5348 <literal>$SYSCONFDIR</literal> directories depend on where mutt
5349 is installed: the former is the default for shared data, the
5350 latter for system configuration files.
5354 The default search path can be obtained by running the following
5359 mutt -nF /dev/null -Q mailcap_path
5363 In particular, the metamail distribution will install a mailcap file,
5364 usually as <literal>/usr/local/etc/mailcap</literal>, which contains some baseline
5368 <sect2 id="mailcap-basics">
5369 <title>The Basics of the mailcap file</title>
5372 A mailcap file consists of a series of lines which are comments, blank,
5377 A comment line consists of a # character followed by anything you want.
5381 A blank line is blank.
5385 A definition line consists of a content type, a view command, and any
5386 number of optional fields. Each field of a definition line is divided
5387 by a semicolon ';' character.
5391 The content type is specified in the MIME standard type/subtype method.
5393 <literal>text/plain, text/html, image/gif, </literal>
5394 etc. In addition, the mailcap format includes two formats for
5395 wildcards, one using the special '*' subtype, the other is the implicit
5396 wild, where you only include the major type. For example, <literal>image/*</literal>, or
5397 <literal>video,</literal> will match all image types and video types,
5402 The view command is a Unix command for viewing the type specified. There
5403 are two different types of commands supported. The default is to send
5404 the body of the MIME message to the command on stdin. You can change
5405 this behavior by using %s as a parameter to your view command.
5406 This will cause Mutt to save the body of the MIME message to a temporary
5407 file, and then call the view command with the %s replaced by
5408 the name of the temporary file. In both cases, Mutt will turn over the
5409 terminal to the view program until the program quits, at which time Mutt
5410 will remove the temporary file if it exists.
5414 So, in the simplest form, you can send a text/plain message to the
5415 external pager more on stdin:
5423 Or, you could send the message as a file:
5431 Perhaps you would like to use lynx to interactively view a text/html
5440 In this case, lynx does not support viewing a file from stdin, so you
5441 must use the %s syntax.
5446 <emphasis>Some older versions of lynx contain a bug where they
5447 will check the mailcap file for a viewer for text/html. They will find
5448 the line which calls lynx, and run it. This causes lynx to continuously
5449 spawn itself to view the object.</emphasis>
5454 On the other hand, maybe you don't want to use lynx interactively, you
5455 just want to have it convert the text/html to text/plain, then you can
5460 text/html; lynx -dump %s | more
5464 Perhaps you wish to use lynx to view text/html files, and a pager on
5465 all other text formats, then you would use the following:
5474 This is the simplest form of a mailcap file.
5479 <sect2 id="secure-mailcap">
5480 <title>Secure use of mailcap</title>
5483 The interpretation of shell meta-characters embedded in MIME parameters
5484 can lead to security problems in general. Mutt tries to quote parameters
5485 in expansion of %s syntaxes properly, and avoids risky characters by
5486 substituting them, see the <link linkend="mailcap-sanitize">$mailcap_sanitize</link> variable.
5490 Although mutt's procedures to invoke programs with mailcap seem to be
5491 safe, there are other applications parsing mailcap, maybe taking less care
5492 of it. Therefore you should pay attention to the following rules:
5496 <emphasis>Keep the %-expandos away from shell quoting.</emphasis>
5497 Don't quote them with single or double quotes. Mutt does this for
5498 you, the right way, as should any other program which interprets
5499 mailcap. Don't put them into backtick expansions. Be highly careful
5500 with eval statements, and avoid them if possible at all. Trying to fix
5501 broken behavior with quotes introduces new leaks - there is no
5502 alternative to correct quoting in the first place.
5506 If you have to use the %-expandos' values in context where you need
5507 quoting or backtick expansions, put that value into a shell variable
5508 and reference the shell variable where necessary, as in the following
5509 example (using <literal>$charset</literal> inside the backtick expansion is safe,
5510 since it is not itself subject to any further expansion):
5514 text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \
5515 && test "`echo $charset | tr '[A-Z]' '[a-z]'`" != iso-8859-1
5520 <sect2 id="advanced-mailcap">
5521 <title>Advanced mailcap Usage</title>
5523 <sect3 id="optional-mailcap-fields">
5524 <title>Optional Fields</title>
5527 In addition to the required content-type and view command fields, you
5528 can add semi-colon ';' separated fields to set flags and other options.
5529 Mutt recognizes the following optional fields:
5535 <term>copiousoutput</term>
5538 This flag tells Mutt that the command passes possibly large amounts of
5539 text on stdout. This causes Mutt to invoke a pager (either the internal
5540 pager or the external pager defined by the pager variable) on the output
5541 of the view command. Without this flag, Mutt assumes that the command
5542 is interactive. One could use this to replace the pipe to <literal>more</literal>
5543 in the <literal>lynx -dump</literal> example in the Basic section:
5547 text/html; lynx -dump %s ; copiousoutput
5551 This will cause lynx to format the text/html output as text/plain
5552 and Mutt will use your standard pager to display the results.
5557 <term>needsterminal</term>
5560 Mutt uses this flag when viewing attachments with <link linkend="auto-view">auto_view</link>, in order to decide whether it should honor the setting
5561 of the <link linkend="wait-key">$wait_key</link> variable or
5562 not. When an attachment is viewed using an interactive program, and the
5563 corresponding mailcap entry has a <emphasis>needsterminal</emphasis> flag, Mutt will use
5564 <link linkend="wait-key">$wait_key</link> and the exit status
5565 of the program to decide if it will ask you to press a key after the
5566 external program has exited. In all other situations it will not prompt
5572 <term>compose=<command></term>
5575 This flag specifies the command to use to create a new attachment of a
5576 specific MIME type. Mutt supports this from the compose menu.
5581 <term>composetyped=<command></term>
5584 This flag specifies the command to use to create a new attachment of a
5585 specific MIME type. This command differs from the compose command in
5586 that mutt will expect standard MIME headers on the data. This can be
5587 used to specify parameters, filename, description, etc. for a new
5588 attachment. Mutt supports this from the compose menu.
5593 <term>print=<command></term>
5596 This flag specifies the command to use to print a specific MIME type.
5597 Mutt supports this from the attachment and compose menus.
5602 <term>edit=<command></term>
5605 This flag specifies the command to use to edit a specific MIME type.
5606 Mutt supports this from the compose menu, and also uses it to compose
5607 new attachments. Mutt will default to the defined editor for text
5613 <term>nametemplate=<template></term>
5616 This field specifies the format for the file denoted by %s in the
5617 command fields. Certain programs will require a certain file extension,
5618 for instance, to correctly view a file. For instance, lynx will only
5619 interpret a file as <literal>text/html</literal> if the file ends in <literal>.html</literal>.
5620 So, you would specify lynx as a <literal>text/html</literal> viewer with a line in
5621 the mailcap file like:
5625 text/html; lynx %s; nametemplate=%s.html
5631 <term>test=<command></term>
5634 This field specifies a command to run to test whether this mailcap
5635 entry should be used. The command is defined with the command expansion
5636 rules defined in the next section. If the command returns 0, then the
5637 test passed, and Mutt uses this entry. If the command returns non-zero,
5638 then the test failed, and Mutt continues searching for the right entry.
5639 Note that the content-type must match before Mutt performs the test.
5644 text/html; netscape -remote 'openURL(%s)' ; test=RunningX
5649 In this example, Mutt will run the program RunningX which will return 0
5650 if the X Window manager is running, and non-zero if it isn't. If
5651 RunningX returns 0, then Mutt will call netscape to display the
5652 text/html object. If RunningX doesn't return 0, then Mutt will go on
5653 to the next entry and use lynx to display the text/html object.
5661 <sect3 id="mailcap-search-order">
5662 <title>Search Order</title>
5665 When searching for an entry in the mailcap file, Mutt will search for
5666 the most useful entry for its purpose. For instance, if you are
5667 attempting to print an <literal>image/gif</literal>, and you have the following
5668 entries in your mailcap file, Mutt will search for an entry with the
5674 image/gif; ; print= anytopnm %s | pnmtops | lpr; \
5679 Mutt will skip the <literal>image/*</literal> entry and use the <literal>image/gif</literal>
5680 entry with the print command.
5684 In addition, you can use this with <link linkend="auto-view">auto_view</link>
5685 to denote two commands for viewing an attachment, one to be viewed
5686 automatically, the other to be viewed interactively from the attachment
5687 menu. In addition, you can then use the test feature to determine which
5688 viewer to use interactively depending on your environment.
5692 text/html; netscape -remote 'openURL(%s)' ; test=RunningX
5693 text/html; lynx %s; nametemplate=%s.html
5694 text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput
5698 For <link linkend="auto-view">auto_view</link>, Mutt will choose the third
5699 entry because of the copiousoutput tag. For interactive viewing, Mutt
5700 will run the program RunningX to determine if it should use the first
5701 entry. If the program returns non-zero, Mutt will use the second entry
5702 for interactive viewing.
5707 <sect3 id="mailcap-command-expansion">
5708 <title>Command Expansion</title>
5711 The various commands defined in the mailcap files are passed to the
5712 <literal>/bin/sh</literal> shell using the system() function. Before the
5713 command is passed to <literal>/bin/sh -c</literal>, it is parsed to expand
5714 various special parameters with information from Mutt. The keywords
5721 <term>%s</term>
5724 As seen in the basic mailcap section, this variable is expanded
5725 to a filename specified by the calling program. This file contains
5726 the body of the message to view/print/edit or where the composing
5727 program should place the results of composition. In addition, the
5728 use of this keyword causes Mutt to not pass the body of the message
5729 to the view/print/edit program on stdin.
5734 <term>%t</term>
5737 Mutt will expand %t to the text representation of the content
5738 type of the message in the same form as the first parameter of the
5739 mailcap definition line, ie <literal>text/html</literal> or
5740 <literal>image/gif</literal>.
5745 <term>%{<parameter>}</term>
5748 Mutt will expand this to the value of the specified parameter
5749 from the Content-Type: line of the mail message. For instance, if
5750 Your mail message contains:
5754 Content-Type: text/plain; charset=iso-8859-1
5758 then Mutt will expand %{charset} to iso-8859-1. The default metamail
5759 mailcap file uses this feature to test the charset to spawn an xterm
5760 using the right charset to view the message.
5765 <term>\%</term>
5768 This will be replaced by a %
5775 Mutt does not currently support the %F and %n keywords
5776 specified in RFC 1524. The main purpose of these parameters is for
5777 multipart messages, which is handled internally by Mutt.
5784 <sect2 id="mailcap-example">
5785 <title>Example mailcap files</title>
5788 This mailcap file is fairly simple and standard:
5792 # I'm always running X :)
5793 video/*; xanim %s > /dev/null
5794 image/*; xv %s > /dev/null
5796 # I'm always running netscape (if my computer had more memory, maybe)
5797 text/html; netscape -remote 'openURL(%s)'
5801 This mailcap file shows quite a number of examples:
5805 # Use xanim to view all videos Xanim produces a header on startup,
5806 # send that to /dev/null so I don't see it
5807 video/*; xanim %s > /dev/null
5809 # Send html to a running netscape by remote
5810 text/html; netscape -remote 'openURL(%s)'; test=RunningNetscape
5812 # If I'm not running netscape but I am running X, start netscape on the
5814 text/html; netscape %s; test=RunningX
5816 # Else use lynx to view it as text
5819 # This version would convert the text/html to text/plain
5820 text/html; lynx -dump %s; copiousoutput
5822 # I use enscript to print text in two columns to a page
5823 text/*; more %s; print=enscript -2Gr %s
5825 # Netscape adds a flag to tell itself to view jpegs internally
5826 image/jpeg;xv %s; x-mozilla-flags=internal
5828 # Use xv to view images if I'm running X
5829 # In addition, this uses the \ to extend the line and set my editor
5831 image/*;xv %s; test=RunningX; \
5834 # Convert images to text using the netpbm tools
5835 image/*; (anytopnm %s | pnmscale -xysize 80 46 | ppmtopgm | pgmtopbm |
5836 pbmtoascii -1x2 ) 2>&1 ; copiousoutput
5838 # Send excel spreadsheets to my NT box
5839 application/ms-excel; open.pl %s
5846 <sect1 id="auto-view">
5847 <title>MIME Autoview</title>
5850 In addition to explicitly telling Mutt to view an attachment with the
5851 MIME viewer defined in the mailcap file, Mutt has support for
5852 automatically viewing MIME attachments while in the pager.
5856 To work, you must define a viewer in the mailcap file which uses the
5857 <literal>copiousoutput</literal> option to denote that it is non-interactive.
5858 Usually, you also use the entry to convert the attachment to a text
5859 representation which you can view in the pager.
5863 You then use the <literal>auto_view</literal> muttrc command to list the
5864 content-types that you wish to view automatically.
5868 For instance, if you set auto_view to:
5872 auto_view text/html application/x-gunzip \
5873 application/postscript image/gif application/x-tar-gz
5877 Mutt could use the following mailcap entries to automatically view
5878 attachments of these types.
5882 text/html; lynx -dump %s; copiousoutput; nametemplate=%s.html
5883 image/*; anytopnm %s | pnmscale -xsize 80 -ysize 50 | ppmtopgm | \
5884 pgmtopbm | pbmtoascii ; copiousoutput
5885 application/x-gunzip; gzcat; copiousoutput
5886 application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput
5887 application/postscript; ps2ascii %s; copiousoutput
5891 <quote>unauto_view</quote> can be used to remove previous entries from the autoview list.
5892 This can be used with message-hook to autoview messages based on size, etc.
5893 <quote>unauto_view *</quote> will remove all previous entries.
5898 <sect1 id="alternative-order">
5899 <title>MIME Multipart/Alternative</title>
5902 Mutt has some heuristics for determining which attachment of a
5903 multipart/alternative type to display. First, mutt will check the
5904 alternative_order list to determine if one of the available types
5905 is preferred. The alternative_order list consists of a number of
5906 mimetypes in order, including support for implicit and explicit
5907 wildcards, for example:
5911 alternative_order text/enriched text/plain text application/postscript image/*
5915 Next, mutt will check if any of the types have a defined
5916 <link linkend="auto-view">auto_view</link>, and use that. Failing
5917 that, Mutt will look for any text type. As a last attempt, mutt will
5918 look for any type it knows how to handle.
5922 To remove a MIME type from the <literal>alternative_order</literal> list, use the
5923 <literal>unalternative_order</literal> command.
5928 <sect1 id="attachments">
5929 <title>Attachment Searching and Counting</title>
5932 If you ever lose track of attachments in your mailboxes, Mutt's
5933 attachment-counting and -searching support might be for you. You can
5934 make your message index display the number of qualifying attachments in
5935 each message, or search for messages by attachment count. You also can
5936 configure what kinds of attachments qualify for this feature with the
5937 attachments and unattachments commands.
5941 In order to provide this information, mutt needs to fully MIME-parse
5942 all messages affected first. This can slow down operation especially for
5943 remote mail folders such as IMAP because all messages have to be
5944 downloaded first regardless whether the user really wants to view them
5953 attachments {+|-}disposition mime-type
5954 unattachments {+|-}disposition mime-type
5959 Disposition is the attachment's Content-disposition type -- either
5960 <literal>inline</literal> or <literal>attachment</literal>.
5961 You can abbreviate this to <literal>I</literal> or <literal>A</literal>.
5965 Disposition is prefixed by either a + symbol or a - symbol. If it's
5966 a +, you're saying that you want to allow this disposition and MIME
5967 type to qualify. If it's a -, you're saying that this disposition
5968 and MIME type is an exception to previous + rules. There are examples
5969 below of how this is useful.
5973 Mime-type is, unsurprisingly, the MIME type of the attachment you want
5974 to affect. A MIME type is always of the format <literal>major/minor</literal>, where
5975 <literal>major</literal> describes the broad category of document you're looking at, and
5976 <literal>minor</literal> describes the specific type within that category. The major
5977 part of mime-type must be literal text (or the special token <quote><literal>*</literal></quote>), but
5978 the minor part may be a regular expression. (Therefore, <quote><literal>*/.*</literal></quote> matches
5983 The MIME types you give to the attachments directive are a kind of
5984 pattern. When you use the attachments directive, the patterns you
5985 specify are added to a list. When you use unattachments, the pattern
5986 is removed from the list. The patterns are not expanded and matched
5987 to specific MIME types at this time -- they're just text in a list.
5988 They're only matched when actually evaluating a message.
5992 Some examples might help to illustrate. The examples that are not
5993 commented out define the default configuration of the lists.
5996 <example id="ex-attach-count">
5997 <title>Attachment counting</title>
5999 ## Removing a pattern from a list removes that pattern literally. It
6000 ## does not remove any type matching the pattern.
6002 ## attachments +A */.*
6003 ## attachments +A image/jpeg
6004 ## unattachments +A */.*
6006 ## This leaves "attached" image/jpeg files on the allowed attachments
6007 ## list. It does not remove all items, as you might expect, because the
6008 ## second */.* is not a matching expression at this time.
6010 ## Remember: "unattachments" only undoes what "attachments" has done!
6011 ## It does not trigger any matching on actual messages.
6014 ## Qualify any MIME part with an "attachment" disposition, EXCEPT for
6015 ## text/x-vcard and application/pgp parts. (PGP parts are already known
6016 ## to mutt, and can be searched for with ~g, ~G, and ~k.)
6018 ## I've added x-pkcs7 to this, since it functions (for S/MIME)
6019 ## analogously to PGP signature attachments. S/MIME isn't supported
6020 ## in a stock mutt build, but we can still treat it specially here.
6023 attachments -A text/x-vcard application/pgp.*
6024 attachments -A application/x-pkcs7-.*
6026 ## Discount all MIME parts with an "inline" disposition, unless they're
6027 ## text/plain. (Why inline a text/plain part unless it's external to the
6030 attachments +I text/plain
6032 ## These two lines make Mutt qualify MIME containers. (So, for example,
6033 ## a message/rfc822 forward will count as an attachment.) The first
6034 ## line is unnecessary if you already have "attach-allow */.*", of
6035 ## course. These are off by default! The MIME elements contained
6036 ## within a message/* or multipart/* are still examined, even if the
6037 ## containers themseves don't qualify.
6039 #attachments +A message/.* multipart/.*
6040 #attachments +I message/.* multipart/.*
6042 ## You probably don't really care to know about deleted attachments.
6043 attachments -A message/external-body
6044 attachments -I message/external-body
6049 Entering the command <quote><literal>attachments ?</literal></quote>
6050 as a command will list your current settings in Muttrc format, so that
6051 it can be pasted elsewhere.
6056 <sect1 id="mime-lookup">
6057 <title>MIME Lookup</title>
6060 Mutt's mime_lookup list specifies a list of mime-types that should not
6061 be treated according to their mailcap entry. This option is designed to
6062 deal with binary types such as application/octet-stream. When an attachment's
6063 mime-type is listed in mime_lookup, then the extension of the filename will
6064 be compared to the list of extensions in the mime.types file. The mime-type
6065 associated with this extension will then be used to process the attachment
6066 according to the rules in the mailcap file and according to any other configuration
6067 options (such as auto_view) specified. Common usage would be:
6071 mime_lookup application/octet-stream application/X-Lotus-Manuscript
6075 In addition, the unmime_lookup command may be used to disable this feature
6076 for any particular mime-type if it had been set, for example, in a global
6084 <chapter id="optionalfeatures">
6085 <title>Optional features</title>
6087 <sect1 id="optionalfeatures-notes">
6088 <title>General notes</title>
6090 <sect2 id="compile-time-features">
6091 <title>Enabling/disabling features</title>
6094 Mutt supports several of optional features which can be enabled or
6095 disabled at compile-time by giving the <emphasis>configure</emphasis> script
6096 certain arguments. These are listed in the <quote>Optional features</quote> section of
6097 the <emphasis>configure --help</emphasis> output.
6101 Which features are enabled or disabled can later be determined from the
6102 output of <literal>mutt -v</literal>. If a compile option starts with
6103 <quote>+</quote> it is enabled and disabled if prefixed with <quote>-</quote>. For example, if
6104 mutt was compiled using GnuTLS for encrypted communication instead of
6105 OpenSSL, <literal>mutt -v</literal> would contain:
6109 -USE_SSL_OPENSSL +USE_SSL_GNUTLS</screen>
6113 <sect2 id="url-syntax">
6114 <title>URL syntax</title>
6117 Mutt optionally supports the IMAP, POP3 and SMTP protocols which require
6118 to access servers using URLs. The canonical syntax for specifying URLs
6119 in mutt is (an item enclosed in <literal>[]</literal> means it is optional and
6124 proto[s]://[username[:password]@]server[:port]/[path]
6128 <literal>proto</literal> is the communication protocol:
6129 <literal>imap</literal> for IMAP, <literal>pop</literal> for POP3 and
6130 <literal>smtp</literal> for SMTP. If <quote>s</quote> for <quote>secure communication</quote>
6131 is appended, mutt will attempt to establish an encrypted communication
6132 using SSL or TLS. If no explicit port is given, mutt will use the
6133 system's default for the given protocol.
6137 Since all protocols by mutt support authentication, the username may be
6138 given directly in the URL instead of using the <literal>pop_user</literal> or
6139 <literal>imap_user</literal> variables. It may contain the <quote>@</quote> symbol
6140 being used by many mail systems as part of the login name. A password can be
6141 given, too but is not recommended if the URL is specified in a configuration
6146 The optional path is only relevant for IMAP.
6150 For IMAP for example, you can select an alternative port by specifying it with the
6151 server: <literal>imap://imapserver:port/INBOX</literal>. You can also specify different
6152 username for each folder: <literal>imap://username@imapserver[:port]/INBOX</literal>
6153 or <literal>imap://username2@imapserver[:port]/path/to/folder</literal>.
6154 Replacing <literal>imap://</literal> by <literal>imaps://</literal>
6155 would make mutt attempt to connect using SSL or TLS on a different port
6156 to encrypt the communication.
6164 <title>SSL/TLS Support</title>
6167 If mutt is compiled with IMAP, POP3 and/or SMTP support, it can also be
6168 compiled with support for SSL or TLS using either OpenSSL or GnuTLS (
6169 by running the <emphasis>configure</emphasis> script with the
6170 <emphasis>--enable-ssl=...</emphasis> option for OpenSSL or
6171 <emphasis>--enable-gnutls=...</emphasis> for GnuTLS). Mutt can then
6172 attempt to encrypt communication with remote servers if these protocols
6173 are suffixed with <quote>s</quote> for <quote>secure communication</quote>.
6179 <title>POP3 Support</title>
6182 If Mutt was compiled with POP3 support (by running the <emphasis>configure</emphasis>
6183 script with the <emphasis>--enable-pop</emphasis> flag), it has the ability to work
6184 with mailboxes located on a remote POP3 server and fetch mail for local
6189 Remote POP3 servers can be accessed using URLs with the <literal>pop</literal> protocol
6190 for unencrypted and <literal>pops</literal> for encrypted
6191 communication, see <xref linkend="url-syntax"/> for details.
6195 Polling for new mail is more expensive over POP3 than locally. For this
6196 reason the frequency at which Mutt will check for mail remotely can be
6198 <link linkend="pop-checkinterval">$pop_checkinterval</link>
6199 variable, which defaults to every 60 seconds.
6202 <anchor id="fetch-mail"/>
6204 Another way to access your POP3 mail is the <literal><fetch-mail$</literal> function
6205 (default: G). It allows to connect to <link linkend="pop-host">$pop_host</link>, fetch all your new mail and place it in the
6206 local <link linkend="spoolfile">$spoolfile</link>. After this
6207 point, Mutt runs exactly as if the mail had always been local.
6212 If you only need to fetch all messages to a
6213 local mailbox you should consider using a specialized program, such as
6214 <literal>fetchmail</literal>, <literal>getmail</literal> or similar.
6221 <title>IMAP Support</title>
6224 If Mutt was compiled with IMAP support (by running the <emphasis>configure</emphasis>
6225 script with the <emphasis>--enable-imap</emphasis> flag), it has the ability to work
6226 with folders located on a remote IMAP server.
6230 You can access the remote inbox by selecting the folder by its URL
6231 (see <xref linkend="url-syntax"/> for details) using the
6232 <literal>imap</literal> or <literal>imaps</literal> protocol.
6233 Alternatively, a pine-compatible notation is also supported, ie
6234 <literal>{[username@]imapserver[:port][/ssl]}path/to/folder</literal>
6238 Note that not all servers use <quote>/</quote> as the hierarchy separator. Mutt should
6239 correctly notice which separator is being used by the server and convert
6244 When browsing folders on an IMAP server, you can toggle whether to look
6245 at only the folders you are subscribed to, or all folders with the
6246 <emphasis>toggle-subscribed</emphasis> command. See also the
6247 <link linkend="imap-list-subscribed">$imap_list_subscribed</link> variable.
6251 Polling for new mail on an IMAP server can cause noticeable delays. So, you'll
6252 want to carefully tune the
6253 <link linkend="mail-check">$mail_check</link>
6255 <link linkend="timeout">$timeout</link>
6256 variables. Personally I use
6265 with relatively good results over my slow modem line.
6270 Note that if you are using mbox as the mail store on UW servers prior to
6271 v12.250, the server has been reported to disconnect a client if another client
6272 selects the same folder.
6276 <sect2 id="imap-browser">
6277 <title>The Folder Browser</title>
6280 As of version 1.2, mutt supports browsing mailboxes on an IMAP
6281 server. This is mostly the same as the local file browser, with the
6282 following differences:
6289 In lieu of file permissions, mutt displays the string "IMAP",
6290 possibly followed by the symbol "+", indicating
6291 that the entry contains both messages and subfolders. On
6292 Cyrus-like servers folders will often contain both messages and
6299 For the case where an entry can contain both messages and
6300 subfolders, the selection key (bound to <literal>enter</literal> by default)
6301 will choose to descend into the subfolder view. If you wish to view
6302 the messages in that folder, you must use <literal>view-file</literal> instead
6303 (bound to <literal>space</literal> by default).
6309 You can create, delete and rename mailboxes with the
6310 <literal>create-mailbox</literal>, <literal>delete-mailbox</literal>, and
6311 <literal>rename-mailbox</literal> commands (default bindings: <literal>C</literal>,
6312 <literal>d</literal> and <literal>r</literal>, respectively). You may also
6313 <literal>subscribe</literal> and <literal>unsubscribe</literal> to mailboxes (normally
6314 these are bound to <literal>s</literal> and <literal>u</literal>, respectively).
6322 <sect2 id="imap-authentication">
6323 <title>Authentication</title>
6326 Mutt supports four authentication methods with IMAP servers: SASL,
6327 GSSAPI, CRAM-MD5, and LOGIN (there is a patch by Grant Edwards to add
6328 NTLM authentication for you poor exchange users out there, but it has
6329 yet to be integrated into the main tree). There is also support for
6330 the pseudo-protocol ANONYMOUS, which allows you to log in to a public
6331 IMAP server without having an account. To use ANONYMOUS, simply make
6332 your username blank or "anonymous".
6336 SASL is a special super-authenticator, which selects among several protocols
6337 (including GSSAPI, CRAM-MD5, ANONYMOUS, and DIGEST-MD5) the most secure
6338 method available on your host and the server. Using some of these methods
6339 (including DIGEST-MD5 and possibly GSSAPI), your entire session will be
6340 encrypted and invisible to those teeming network snoops. It is the best
6341 option if you have it. To use it, you must have the Cyrus SASL library
6342 installed on your system and compile mutt with the <emphasis>--with-sasl</emphasis> flag.
6346 Mutt will try whichever methods are compiled in and available on the server,
6347 in the following order: SASL, ANONYMOUS, GSSAPI, CRAM-MD5, LOGIN.
6351 There are a few variables which control authentication:
6358 <link linkend="imap-user">$imap_user</link> - controls
6359 the username under which you request authentication on the IMAP server,
6360 for all authenticators. This is overridden by an explicit username in
6361 the mailbox path (ie by using a mailbox name of the form
6362 <literal>{user@host}</literal>).
6368 <link linkend="imap-pass">$imap_pass</link> - a
6369 password which you may preset, used by all authentication methods where
6370 a password is needed.
6376 <link linkend="imap-authenticators">$imap_authenticators</link> - a colon-delimited list of IMAP
6377 authentication methods to try, in the order you wish to try them. If
6378 specified, this overrides mutt's default (attempt everything, in the order
6390 <title>SMTP Support</title>
6393 Besides supporting traditional mail delivery through a
6394 sendmail-compatible program, mutt supports delivery through SMTP if it
6395 was configured and built with <literal>--enable-smtp</literal>.
6399 If the configuration variable
6400 <link linkend="smtp-url">$smtp_url</link> is set, mutt
6401 will contact the given SMTP server to deliver messages; if it is unset,
6402 mutt will use the program specified by <link linkend="sendmail">$sendmail</link>.
6406 For details on the URL syntax, please see <xref linkend="url-syntax"/>.
6410 The built-in SMTP support supports encryption (the <literal>smtps</literal> protocol
6411 using SSL or TLS) as well as SMTP authentication using SASL. The authentication mechanisms
6412 for SASL are specified in <link linkend="smtp-authenticators">$smtp_authenticators</link>
6413 defaulting to an empty list which makes mutt try all available methods
6414 from most-secure to least-secure.
6419 <sect1 id="account-hook">
6420 <title>Managing multiple accounts</title>
6423 If you happen to have accounts on multiple IMAP, POP and/or SMTP servers,
6424 you may find managing all the authentication settings inconvenient and
6425 error-prone. The account-hook command may help. This hook works like
6426 folder-hook but is invoked whenever you access a remote mailbox
6427 (including inside the folder browser), not just when you open the
6428 mailbox which includes (for example) polling for new mail, storing Fcc
6429 messages and saving messages to a folder. As a consequence,
6430 account-hook should only be used to set connection-related settings such
6431 as passwords or tunnel commands but not settings such as sender
6432 address or name (because in general it should be considered unpredictable
6433 which account-hook was last used).
6441 account-hook . 'unset imap_user; unset imap_pass; unset tunnel'
6442 account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo'
6443 account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'
6444 account-hook smtp://user@host3/ 'set tunnel="ssh host3 /usr/libexec/smtpd"'
6449 <sect1 id="caching">
6450 <title>Local caching</title>
6453 Mutt contains two types of local caching: <emphasis>(1)</emphasis>
6454 the so-called <quote>header caching</quote> and <emphasis>(2)</emphasis> the
6455 so-called <quote>body caching</quote> which are both described in this section.
6459 Header caching is optional as it depends on external libraries, body
6460 caching is always enabled if mutt is compiled with POP and/or IMAP
6461 support as these use it (body caching requires no external library).
6464 <sect2 id="header-caching">
6465 <title>Header caching</title>
6468 Mutt provides optional support for caching message headers for the
6469 following types of folders: IMAP, POP, Maildir and MH. Header caching
6470 greatly improves speed because for remote folders, headers
6471 usually only need to be downloaded once. For Maildir and MH, reading the
6472 headers from a single file is much faster than looking at possibly
6473 thousands of single files (since Maildir and MH use one file per message.)
6477 Header caching can be enabled via the configure script and the
6478 <emphasis>--enable-hcache</emphasis> option. It's not turned on
6479 by default because external database libraries are required: one
6480 of tokyocabinet, qdbm, gdbm or bdb must be present.
6485 linkend="header-cache">$header_cache</link> can be
6486 used to either point to a file or a directory. If set to point to
6487 a file, one database file for all folders will be used (which may
6488 result in lower performance), but one file per folder if it points
6493 For the one-file-per-folder case, database files for remote folders
6494 will be named according to their URL while database files for local
6495 folders will be named by the MD5 checksums of their path. These database
6496 files may be safely removed if a system is short on space. You
6497 can compute the name of the header cache file for a particular local folder
6498 through a command like the following:
6502 $ printf '%s' '/path/to/folder' | md5sum
6506 The <literal>md5sum</literal> command may also be
6507 named <literal>md5</literal>, depending on your operating system.
6512 <sect2 id="body-caching">
6513 <title>Body caching</title>
6516 Both cache methods can be combined using the same directory for storage
6517 (and for IMAP/POP even provide meaningful file names) which simplifies
6518 manual maintenance tasks.
6523 In addition to caching message headers only, mutt can also cache
6524 whole message bodies. This results in faster display of messages
6525 for POP and IMAP folders because messages usually have to be
6526 downloaded only once.
6530 For configuration, the variable <link linkend="message-cachedir"
6531 >$message_cachedir</link> must point to a
6532 directory. There, mutt will create a hierarchy of subdirectories
6533 named like: <literal>proto:user@hostname</literal> where
6534 <literal>proto</literal> is either <quote>pop</quote> or <quote>imap.</quote> Within
6535 there for each folder, mutt stores messages in single files (just
6536 like Maildir) so that with manual symlink creation these cache
6537 directories can be examined with mutt as read-only Maildir folders.
6541 All files can be removed as needed if the consumed disk space
6542 becomes an issue as mutt will silently fetch missing items again.
6547 <sect2 id="maint-cache">
6548 <title>Maintenance</title>
6551 Mutt does not (yet) support maintenance features for header cache
6552 database files so that files have to be removed in case they grow too
6553 big. It depends on the database library used for header caching whether
6554 disk space freed by removing messages is re-used.
6558 For body caches, mutt can keep the local cache in sync with the
6559 remote mailbox if the
6560 <link linkend="message-cache-clean">$message_cache_clean</link>
6561 variable is set. Cleaning means to remove messages from the cache which
6562 are no longer present in the mailbox which only happens when other mail
6563 clients or instances of mutt using a different body cache location
6564 delete messages (Mutt itself removes deleted messages from the cache
6565 when syncing a mailbox). As cleaning can take a noticeable amount of time,
6566 it should not be set in general but only occasionally.
6573 <sect1 id="exact-address">
6574 <title>Exact address generation</title>
6577 Mutt supports the <quote>Name <user@host></quote> address syntax for reading and
6578 writing messages, the older <quote>user@host (Name)</quote> syntax is only supported when
6579 reading messages. The <emphasis>--enable-exact-address</emphasis>
6580 switch can be given to configure to build it with write-support
6581 for the latter syntax. <literal>EXACT_ADDRESS</literal> in the output of
6582 <literal>mutt -v</literal> indicates whether it's supported.
6589 <chapter id="tuning">
6590 <title>Performance tuning</title>
6592 <sect1 id="tuning-mailboxes">
6593 <title>Reading and writing mailboxes</title>
6596 Mutt's performance when reading mailboxes can be improved in two ways:
6603 For remote folders (IMAP and POP) as well as folders using
6604 one-file-per message storage (Maildir and MH), mutt's
6605 performance can be greatly improved using
6606 <link linkend="header-caching">header caching</link>.
6607 Using a single database per folder may further increase
6614 Mutt provides the <link linkend="read-inc">$read_inc</link>
6615 and <link linkend="write-inc">$write_inc</link>
6616 variables to specify at which rate to update progress
6617 counters. If these values are too low, mutt may spend more
6618 time on updating the progress counter than it spends on
6619 actually reading/writing folders.
6622 For example, when opening a maildir folder with a few
6623 thousand messages, the default value for
6624 <link linkend="read-inc">$read_inc</link>
6625 may be too low. It can be tuned on on a folder-basis using
6626 <link linkend="folder-hook">folder-hooks</link>:
6630 # use very high $read_inc to speed up reading hcache'd maildirs
6631 folder-hook . 'set read_inc=1000'
6632 # use lower value for reading slower remote IMAP folders
6633 folder-hook ^imap 'set read_inc=100'
6634 # use even lower value for reading even slower remote POP folders
6635 folder-hook ^pop 'set read_inc=1'</screen>
6640 <para>These settings work on a per-message basis. However, as messages may
6641 greatly differ in size and certain operations are much faster than others,
6642 even per-folder settings of the increment variables may not be
6643 desirable as they produce either too few or too much progress updates.
6644 Thus, Mutt allows to limit the number of progress updates per second it'll
6645 actually send to the terminal using the
6646 <link linkend="time-inc">$time_inc</link> variable.</para>
6650 <sect1 id="tuning-messages">
6651 <title>Reading messages from remote folders</title>
6654 Reading messages from remote folders such as IMAP an POP can be
6655 slow especially for large mailboxes since mutt only caches a very
6656 limited number of recently viewed messages (usually 10) per
6657 session (so that it will be gone for the next session.)
6661 To improve performance and permanently cache whole messages,
6662 please refer to mutt's so-called
6663 <link linkend="body-caching">body caching</link> for details.
6668 <sect1 id="tuning-search">
6669 <title>Searching and limiting</title>
6672 When searching mailboxes either via a search or a limit action, for
6673 some patterns mutt distinguishes between regular expression and string
6674 searches. For regular expressions, patterns are prefixed with
6675 <quote>˜</quote> and with <quote>=</quote> for string searches.
6679 Even though a regular expression search is fast, it's several times
6680 slower than a pure string search which is noticeable especially on large
6681 folders. As a consequence, a string search should be used instead of a
6682 regular expression search if the user already knows enough about the
6687 For example, when limiting a large folder to all messages sent to or by
6688 an author, it's much faster to search for the initial part of an e-mail
6689 address via <literal>=Luser@</literal> instead of
6690 <literal>˜Luser@</literal>. This is especially true for searching
6691 message bodies since a larger amount of input has to be searched.
6695 Please note that string search is an exact case-sensitive search
6696 while a regular expression search with only lower-case letters performs
6697 a case-insensitive search.
6704 <chapter id="reference">
6705 <title>Reference</title>
6707 <sect1 id="commandline">
6708 <title>Command line options</title>
6711 Running <literal>mutt</literal> with no arguments will make Mutt attempt to read your spool
6712 mailbox. However, it is possible to read other mailboxes and
6713 to send messages from the command line as well.
6716 <table id="tab-commandline-options">
6717 <title>Command line options</title>
6720 <row><entry>Option</entry><entry>Description</entry></row>
6723 <row><entry>-A</entry><entry>expand an alias</entry></row>
6724 <row><entry>-a</entry><entry>attach a file to a message</entry></row>
6725 <row><entry>-b</entry><entry>specify a blind carbon-copy (BCC) address</entry></row>
6726 <row><entry>-c</entry><entry>specify a carbon-copy (Cc) address</entry></row>
6727 <row><entry>-D</entry><entry>print the value of all mutt variables to stdout</entry></row>
6728 <row><entry>-e</entry><entry>specify a config command to be run after initialization files are read</entry></row>
6729 <row><entry>-f</entry><entry>specify a mailbox to load</entry></row>
6730 <row><entry>-F</entry><entry>specify an alternate file to read initialization commands</entry></row>
6731 <row><entry>-h</entry><entry>print help on command line options</entry></row>
6732 <row><entry>-H</entry><entry>specify a draft file from which to read a header and body</entry></row>
6733 <row><entry>-i</entry><entry>specify a file to include in a message composition</entry></row>
6734 <row><entry>-m</entry><entry>specify a default mailbox type</entry></row>
6735 <row><entry>-n</entry><entry>do not read the system Muttrc</entry></row>
6736 <row><entry>-p</entry><entry>recall a postponed message</entry></row>
6737 <row><entry>-Q</entry><entry>query a configuration variable</entry></row>
6738 <row><entry>-R</entry><entry>open mailbox in read-only mode</entry></row>
6739 <row><entry>-s</entry><entry>specify a subject (enclose in quotes if it contains spaces)</entry></row>
6740 <row><entry>-v</entry><entry>show version number and compile-time definitions</entry></row>
6741 <row><entry>-x</entry><entry>simulate the mailx(1) compose mode</entry></row>
6742 <row><entry>-y</entry><entry>show a menu containing the files specified by the mailboxes command</entry></row>
6743 <row><entry>-z</entry><entry>exit immediately if there are no messages in the mailbox</entry></row>
6744 <row><entry>-Z</entry><entry>open the first folder with new message,exit immediately if none</entry></row>
6750 To read messages in a mailbox
6754 <command>mutt</command>
6755 <arg choice="opt"><option>-nz</option></arg>
6756 <arg choice="opt"><option>-F</option>
6757 <replaceable>muttrc</replaceable>
6759 <arg choice="opt"><option>-m</option>
6760 <replaceable>type</replaceable>
6762 <arg choice="opt"><option>-f</option>
6763 <replaceable>mailbox</replaceable>
6768 To compose a new message
6772 <command>mutt</command>
6773 <arg choice="opt"><option>-n</option></arg>
6774 <arg choice="opt"><option>-F</option>
6775 <replaceable>muttrc</replaceable>
6777 <arg choice="opt"><option>-a</option>
6778 <replaceable>file</replaceable>
6780 <arg choice="opt"><option>-c</option>
6781 <replaceable>address</replaceable>
6783 <arg choice="opt"><option>-i</option>
6784 <replaceable>filename</replaceable>
6786 <arg choice="opt"><option>-s</option>
6787 <replaceable>subject</replaceable>
6790 <arg choice="opt" rep="repeat">
6791 <replaceable>file</replaceable>
6793 <arg choice="plain">--</arg>
6795 <arg choice="plain">
6796 <replaceable>address</replaceable>
6798 <arg choice="opt" rep="repeat">
6799 <replaceable>address</replaceable>
6804 Mutt also supports a <quote>batch</quote> mode to send prepared messages. Simply redirect
6805 input from the file you wish to send. For example,
6809 <literal>mutt -s "data set for run #2" professor@bigschool.edu
6810 < ˜/run2.dat</literal>
6814 This command will send a message to <quote>professor@bigschool.edu</quote> with a subject
6815 of <quote>data set for run #2</quote>. In the body of the message will be the contents
6816 of the file <quote>˜/run2.dat</quote>.
6820 All files passed with -a <emphasis>file</emphasis> will be attached as a MIME
6821 part to the message. To attach several files, use <quote>--</quote> to separate files and
6822 recipient addresses: <literal>mutt -a *.png -- some@one.org</literal>
6827 <sect1 id="commands">
6828 <title>Configuration Commands</title>
6831 The following are the commands understood by mutt.
6838 <command><link linkend="account-hook">account-hook</link></command>
6839 <arg choice="plain">
6840 <replaceable>pattern</replaceable>
6841 <replaceable>command</replaceable>
6848 <command><link linkend="alias">alias</link></command>
6849 <arg choice="opt" rep="repeat">
6850 <option>-group</option>
6851 <replaceable class="parameter">name</replaceable>
6853 <arg choice="plain">
6854 <replaceable class="parameter">key</replaceable>
6856 <arg choice="plain">
6857 <replaceable class="parameter">address</replaceable>
6859 <arg choice="opt" rep="repeat">
6860 <replaceable class="parameter">address</replaceable>
6867 <command><link linkend="alias">unalias</link></command>
6868 <arg choice="opt" rep="repeat">
6869 <option>-group</option>
6870 <replaceable>name</replaceable>
6872 <group choice="req">
6873 <arg choice="plain">
6874 <replaceable class="parameter">*</replaceable>
6876 <arg choice="plain" rep="repeat">
6877 <replaceable class="parameter">key</replaceable>
6885 <command><link linkend="alternates">alternates</link></command>
6886 <arg choice="opt" rep="repeat">
6887 <option>-group</option>
6888 <replaceable>name</replaceable>
6890 <arg choice="plain">
6891 <replaceable>regexp</replaceable>
6893 <arg choice="opt" rep="repeat">
6894 <replaceable>regexp</replaceable>
6901 <command><link linkend="alternates">unalternates</link></command>
6902 <arg choice="opt" rep="repeat">
6903 <option>-group</option>
6904 <replaceable>name</replaceable>
6906 <group choice="req">
6907 <arg choice="plain">
6908 <replaceable>*</replaceable>
6910 <arg choice="plain" rep="repeat">
6911 <replaceable>regexp</replaceable>
6919 <command><link linkend="alternative-order">alternative-order</link></command>
6920 <arg choice="plain">
6921 <replaceable>mimetype</replaceable>
6923 <arg choice="opt" rep="repeat">
6924 <replaceable>mimetype</replaceable>
6931 <command><link linkend="alternative-order">unalternative-order</link></command>
6932 <group choice="req">
6933 <arg choice="plain">
6934 <replaceable>*</replaceable>
6936 <arg choice="plain" rep="repeat">
6937 <replaceable>mimetype</replaceable>
6945 <command><link linkend="auto-view">auto-view</link></command>
6946 <arg choice="plain">
6947 <replaceable>mimetype</replaceable>
6949 <arg choice="opt" rep="repeat">
6950 <replaceable>mimetype</replaceable>
6957 <command><link linkend="auto-view">unauto-view</link></command>
6958 <group choice="req">
6959 <arg choice="plain">
6960 <replaceable>*</replaceable>
6962 <arg choice="plain" rep="repeat">
6963 <replaceable>mimetype</replaceable>
6971 <command><link linkend="bind">bind</link></command>
6972 <arg choice="plain">
6973 <replaceable class="parameter">map</replaceable>
6975 <arg choice="plain">
6976 <replaceable class="parameter">key</replaceable>
6978 <arg choice="plain">
6979 <replaceable class="parameter">function</replaceable>
6986 <command><link linkend="charset-hook">charset-hook</link></command>
6987 <arg choice="plain">
6988 <replaceable class="parameter">alias</replaceable>
6990 <arg choice="plain">
6991 <replaceable class="parameter">charset</replaceable>
6998 <command><link linkend="charset-hook">iconv-hook</link></command>
6999 <arg choice="plain">
7000 <replaceable class="parameter">charset</replaceable>
7002 <arg choice="plain">
7003 <replaceable class="parameter">local-charset</replaceable>
7010 <command><link linkend="color">color</link></command>
7011 <arg choice="plain">
7012 <replaceable class="parameter">object</replaceable>
7014 <arg choice="plain">
7015 <replaceable class="parameter">foreground</replaceable>
7017 <arg choice="plain">
7018 <replaceable class="parameter">background</replaceable>
7022 <command><link linkend="color">color</link></command>
7023 <group choice="req">
7024 <arg choice="plain">
7025 <option>header</option>
7027 <arg choice="plain">
7028 <option>body</option>
7031 <arg choice="plain">
7032 <replaceable class="parameter">foreground</replaceable>
7034 <arg choice="plain">
7035 <replaceable class="parameter">background</replaceable>
7037 <arg choice="plain">
7038 <replaceable class="parameter">regexp</replaceable>
7042 <command><link linkend="color">color</link></command>
7043 <arg choice="plain">
7044 <option>index</option>
7046 <arg choice="plain">
7047 <replaceable class="parameter">foreground</replaceable>
7049 <arg choice="plain">
7050 <replaceable class="parameter">background</replaceable>
7052 <arg choice="plain">
7053 <replaceable class="parameter">pattern</replaceable>
7060 <command><link linkend="color">uncolor</link></command>
7061 <arg choice="plain">
7062 <option>index</option>
7064 <arg choice="plain" rep="repeat">
7065 <replaceable class="parameter">pattern</replaceable>
7072 <command><link linkend="exec">exec</link></command>
7073 <arg choice="plain">
7074 <replaceable class="parameter">function</replaceable>
7076 <arg choice="opt" rep="repeat">
7077 <replaceable class="parameter">function</replaceable>
7084 <command><link linkend="fcc-hook">fcc-hook</link></command>
7085 <arg choice="plain">
7086 <replaceable class="parameter">[!]pattern</replaceable>
7088 <arg choice="plain">
7089 <replaceable class="parameter">mailbox</replaceable>
7096 <command><link linkend="fcc-save-hook">fcc-save-hook</link></command>
7097 <arg choice="plain">
7098 <replaceable class="parameter">[!]pattern</replaceable>
7100 <arg choice="plain">
7101 <replaceable class="parameter">mailbox</replaceable>
7108 <command><link linkend="folder-hook">folder-hook</link></command>
7109 <arg choice="plain">
7110 <replaceable class="parameter">[!]regexp</replaceable>
7112 <arg choice="plain">
7113 <replaceable class="parameter">command</replaceable>
7120 <command><link linkend="addrgroup">group</link></command>
7121 <arg choice="opt" rep="repeat">
7122 <option>-group</option>
7123 <replaceable class="parameter">name</replaceable>
7125 <group choice="req">
7126 <arg choice="plain" rep="repeat">
7127 <option>-rx</option>
7128 <replaceable class="parameter">expr</replaceable>
7130 <arg choice="plain" rep="repeat">
7131 <option>-addr</option>
7132 <replaceable class="parameter">expr</replaceable>
7140 <command><link linkend="addrgroup">ungroup</link></command>
7141 <arg choice="opt" rep="repeat">
7142 <option>-group</option>
7143 <replaceable class="parameter">name</replaceable>
7145 <group choice="req">
7146 <arg choice="plain">
7147 <replaceable class="parameter">*</replaceable>
7149 <arg choice="plain" rep="repeat">
7150 <option>-rx</option>
7151 <replaceable class="parameter">expr</replaceable>
7153 <arg choice="plain" rep="repeat">
7154 <option>-addr</option>
7155 <replaceable class="parameter">expr</replaceable>
7163 <command><link linkend="hdr-order">hdr_order</link></command>
7164 <arg choice="plain">
7165 <replaceable class="parameter">header</replaceable>
7167 <arg choice="opt" rep="repeat">
7168 <replaceable class="parameter">header</replaceable>
7175 <command><link linkend="hdr-order">unhdr_order</link></command>
7176 <group choice="req">
7177 <arg choice="plain">
7178 <replaceable>*</replaceable>
7180 <arg choice="plain" rep="repeat">
7181 <replaceable>header</replaceable>
7189 <command><link linkend="ignore">ignore</link></command>
7190 <arg choice="plain">
7191 <replaceable class="parameter">pattern</replaceable>
7193 <arg choice="opt" rep="repeat">
7194 <replaceable class="parameter">pattern</replaceable>
7201 <command><link linkend="ignore">unignore</link></command>
7202 <group choice="req">
7203 <arg choice="plain">
7204 <replaceable>*</replaceable>
7206 <arg choice="plain" rep="repeat">
7207 <replaceable>pattern</replaceable>
7215 <command><link linkend="lists">lists</link></command>
7217 <option>-group</option>
7218 <replaceable class="parameter">name</replaceable>
7220 <arg choice="plain">
7221 <replaceable class="parameter">regexp</replaceable>
7223 <arg choice="opt" rep="repeat">
7224 <replaceable class="parameter">regexp</replaceable>
7231 <command><link linkend="lists">unlists</link></command>
7232 <arg choice="opt" rep="repeat">
7233 <option>-group</option>
7234 <replaceable>name</replaceable>
7236 <group choice="req">
7237 <arg choice="plain">
7238 <replaceable>*</replaceable>
7240 <arg choice="plain" rep="repeat">
7241 <replaceable>regexp</replaceable>
7249 <command><link linkend="macro">macro</link></command>
7250 <arg choice="plain">
7251 <replaceable class="parameter">menu</replaceable>
7253 <arg choice="plain">
7254 <replaceable class="parameter">key</replaceable>
7256 <arg choice="plain">
7257 <replaceable class="parameter">sequence</replaceable>
7260 <replaceable class="parameter">description</replaceable>
7267 <command><link linkend="mailboxes">mailboxes</link></command>
7268 <arg choice="plain">
7269 <replaceable class="parameter">mailbox</replaceable>
7271 <arg choice="opt" rep="repeat">
7272 <replaceable class="parameter">mailbox</replaceable>
7279 <command><link linkend="mailboxes">unmailboxes</link></command>
7280 <group choice="req">
7281 <arg choice="plain">
7282 <replaceable class="parameter">*</replaceable>
7284 <arg choice="plain" rep="repeat">
7285 <replaceable class="parameter">mailbox</replaceable>
7293 <command><link linkend="mbox-hook">mbox-hook</link></command>
7294 <arg choice="plain">
7295 <replaceable class="parameter">[!]pattern</replaceable>
7297 <arg choice="plain">
7298 <replaceable class="parameter">mailbox</replaceable>
7305 <command><link linkend="message-hook">message-hook</link></command>
7306 <arg choice="plain">
7307 <replaceable class="parameter">[!]pattern</replaceable>
7309 <arg choice="plain">
7310 <replaceable class="parameter">command</replaceable>
7317 <command><link linkend="mime-lookup">mime-lookup</link></command>
7318 <arg choice="plain">
7319 <replaceable>mimetype</replaceable>
7321 <arg choice="opt" rep="repeat">
7322 <replaceable>mimetype</replaceable>
7329 <command><link linkend="mime-lookup">unmime-lookup</link></command>
7330 <group choice="req">
7331 <arg choice="plain">
7332 <replaceable>*</replaceable>
7334 <arg choice="plain" rep="repeat">
7335 <replaceable>mimetype</replaceable>
7343 <command><link linkend="mono">mono</link></command>
7344 <arg choice="plain">
7345 <replaceable class="parameter">object</replaceable>
7347 <arg choice="plain">
7348 <replaceable class="parameter">attribute</replaceable>
7352 <command><link linkend="mono">mono</link></command>
7353 <group choice="req">
7354 <arg choice="plain">
7355 <option>header</option>
7357 <arg choice="plain">
7358 <option>body</option>
7361 <arg choice="plain">
7362 <replaceable class="parameter">attribute</replaceable>
7364 <arg choice="plain">
7365 <replaceable class="parameter">regexp</replaceable>
7369 <command><link linkend="mono">mono</link></command>
7370 <arg choice="plain">
7371 <option>index</option>
7373 <arg choice="plain">
7374 <replaceable class="parameter">attribute</replaceable>
7376 <arg choice="plain">
7377 <replaceable class="parameter">pattern</replaceable>
7384 <command><link linkend="mono">unmono</link></command>
7385 <arg choice="plain">
7386 <option>index</option>
7388 <group choice="req">
7389 <arg choice="plain">
7390 <replaceable class="parameter">*</replaceable>
7392 <arg choice="plain" rep="repeat">
7393 <replaceable class="parameter">pattern</replaceable>
7401 <command><link linkend="my-hdr">my_hdr</link></command>
7402 <arg choice="plain">
7403 <replaceable class="parameter">string</replaceable>
7410 <command><link linkend="my-hdr">unmy_hdr</link></command>
7411 <group choice="req">
7412 <arg choice="plain">
7413 <replaceable class="parameter">*</replaceable>
7415 <arg choice="plain" rep="repeat">
7416 <replaceable class="parameter">field</replaceable>
7424 <command><link linkend="crypt-hook">crypt-hook</link></command>
7425 <arg choice="plain">
7426 <replaceable class="parameter">pattern</replaceable>
7428 <arg choice="plain">
7429 <replaceable class="parameter">keyid</replaceable>
7436 <command><link linkend="push">push</link></command>
7437 <arg choice="plain">
7438 <replaceable class="parameter">string</replaceable>
7445 <command><link linkend="set">reset</link></command>
7446 <arg choice="plain">
7447 <replaceable class="parameter">variable</replaceable>
7449 <arg choice="opt" rep="repeat">
7450 <replaceable class="parameter">variable</replaceable>
7457 <command><link linkend="save-hook">save-hook</link></command>
7458 <arg choice="plain">
7459 <replaceable class="parameter">[!]pattern</replaceable>
7461 <arg choice="plain">
7462 <replaceable class="parameter">mailbox</replaceable>
7469 <command><link linkend="score">score</link></command>
7470 <arg choice="plain">
7471 <replaceable class="parameter">pattern</replaceable>
7473 <arg choice="plain">
7474 <replaceable class="parameter">value</replaceable>
7481 <command><link linkend="score">unscore</link></command>
7482 <group choice="req">
7483 <arg choice="plain">
7484 <replaceable class="parameter">*</replaceable>
7486 <arg choice="plain" rep="repeat">
7487 <replaceable class="parameter">pattern</replaceable>
7495 <command><link linkend="reply-hook">reply-hook</link></command>
7496 <arg choice="plain">
7497 <replaceable class="parameter">[!]pattern</replaceable>
7499 <arg choice="plain">
7500 <replaceable class="parameter">command</replaceable>
7507 <command><link linkend="send-hook">send-hook</link></command>
7508 <arg choice="plain">
7509 <replaceable class="parameter">[!]pattern</replaceable>
7511 <arg choice="plain">
7512 <replaceable class="parameter">command</replaceable>
7519 <command><link linkend="send2-hook">send2-hook</link></command>
7520 <arg choice="plain">
7521 <replaceable class="parameter">[!]pattern</replaceable>
7523 <arg choice="plain">
7524 <replaceable class="parameter">command</replaceable>
7531 <command><link linkend="set">set</link></command>
7532 <group choice="req">
7533 <arg choice="plain">
7534 <group choice="opt">
7535 <arg choice="plain"><option>no</option></arg>
7536 <arg choice="plain"><option>inv</option></arg>
7538 <replaceable class="parameter">variable</replaceable>
7540 <arg choice="plain">
7541 <replaceable class="parameter">variable=value</replaceable>
7544 <arg choice="opt" rep="repeat"/>
7550 <command><link linkend="set">unset</link></command>
7551 <arg choice="plain">
7552 <replaceable class="parameter">variable</replaceable>
7554 <arg choice="opt" rep="repeat">
7555 <replaceable class="parameter">variable</replaceable>
7562 <command><link linkend="source">source</link></command>
7563 <arg choice="plain">
7564 <replaceable class="parameter">filename</replaceable>
7571 <command><link linkend="spam">spam</link></command>
7572 <arg choice="plain">
7573 <replaceable class="parameter">pattern</replaceable>
7575 <arg choice="plain">
7576 <replaceable class="parameter">format</replaceable>
7583 <command><link linkend="spam">nospam</link></command>
7584 <group choice="req">
7585 <arg choice="plain">
7586 <replaceable class="parameter">*</replaceable>
7588 <arg choice="plain">
7589 <replaceable class="parameter">pattern</replaceable>
7597 <command><link linkend="subscribe">subscribe</link></command>
7598 <arg choice="opt" rep="repeat">
7599 <option>-group</option>
7600 <replaceable class="parameter">name</replaceable>
7602 <arg choice="plain">
7603 <replaceable class="parameter">regexp</replaceable>
7605 <arg choice="opt" rep="repeat">
7606 <replaceable class="parameter">regexp</replaceable>
7613 <command><link linkend="subscribe">unsubscribe</link></command>
7614 <arg choice="opt" rep="repeat">
7615 <option>-group</option>
7616 <replaceable>name</replaceable>
7618 <group choice="req">
7619 <arg choice="plain">
7620 <replaceable class="parameter">*</replaceable>
7622 <arg choice="plain" rep="repeat">
7623 <replaceable class="parameter">regexp</replaceable>
7631 <command><link linkend="set">toggle</link></command>
7632 <arg choice="plain">
7633 <replaceable class="parameter">variable</replaceable>
7635 <arg choice="opt" rep="repeat">
7636 <replaceable class="parameter">variable</replaceable>
7643 <command><link linkend="unhook">unhook</link></command>
7644 <group choice="req">
7645 <arg choice="plain">
7646 <replaceable class="parameter">*</replaceable>
7648 <arg choice="plain">
7649 <replaceable class="parameter">hook-type</replaceable>
7659 <sect1 id="variables">
7660 <title>Configuration variables</title>