1 <?xml version="1.0" encoding="utf-8" ?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
8 <title>The Mutt Next Generation E-Mail Client</title>
10 <firstname>Andreas</firstname><surname>Krennmair</surname>
11 <email>ak@synflood.at</email>
14 <firstname>Michael</firstname><surname>Elkins</surname>
15 <email>me@cs.hmc.edu</email>
17 <pubdate>version devel-r473</pubdate>
20 Michael Elinks on mutt, circa 1995:
21 ``All mail clients suck. This one just sucks less.''
24 Sven Guckes on mutt, ca. 2003: ``But it still sucks!''
30 <title>Introduction </title>
33 <title>Overview </title>
36 <emphasis role="bold">Mutt-ng</emphasis> is a small but very
37 powerful text-based MIME mail client. Mutt-ng is highly
38 configurable, and is well suited to the mail power user with
39 advanced features like key bindings, keyboard macros, mail
40 threading, regular expression searches and a powerful pattern
41 matching language for selecting groups of messages.
45 This documentation additionally contains documentation to
46 <emphasis role="bold"> Mutt-NG </emphasis> ,a fork from Mutt
47 with the goal to fix all the little annoyances of Mutt, to
48 integrate all the Mutt patches that are floating around in the
49 web, and to add other new features. Features specific to Mutt-ng
50 will be discussed in an extra section. Don't be confused when
51 most of the documentation talk about Mutt and not Mutt-ng,
52 Mutt-ng contains all Mutt features, plus many more.
62 <title>Mutt-ng Home Page </title>
65 <ulink url="http://www.muttng.org/">http://www.muttng.org</ulink>
75 <title>Mailing Lists </title>
83 <email>mutt-ng-users@lists.berlios.de</email>: This is
84 where the mutt-ng user support happens.
90 <email>mutt-ng-devel@lists.berlios.de</email>: The
91 development mailing list for mutt-ng
106 <title>Software Distribution Sites </title>
109 So far, there are no official releases of Mutt-ng, but you can
110 download daily snapshots from <ulink
111 url="http://mutt-ng.berlios.de/snapshots/"
112 >http://mutt-ng.berlios.de/snapshots/</ulink>
125 Visit channel <emphasis>#muttng</emphasis> on <ulink
126 url="http://www.freenode.net/">irc.freenode.net
127 (www.freenode.net) </ulink> to chat with other people
128 interested in Mutt-ng.
134 <title>Weblog </title>
137 If you want to read fresh news about the latest development in
138 Mutt-ng, and get informed about stuff like interesting,
139 Mutt-ng-related articles and packages for your favorite
140 distribution, you can read and/or subscribe to our <ulink
141 url="http://mutt-ng.supersized.org/">Mutt-ng development
148 <title>Copyright </title>
151 Mutt is Copyright (C) 1996-2000 Michael R. Elkins
152 <me@cs.hmc.edu> and others
156 This program is free software; you can redistribute it and/or modify
157 it under the terms of the GNU General Public License as published by
158 the Free Software Foundation; either version 2 of the License, or
159 (at your option) any later version.
163 This program is distributed in the hope that it will be useful,
164 but WITHOUT ANY WARRANTY; without even the implied warranty of
165 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
166 GNU General Public License for more details.
170 You should have received a copy of the GNU General Public License
171 along with this program; if not, write to the Free Software
172 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
181 <title>Getting Started </title>
184 <title>Basic Concepts </title>
187 <title>Screens and Menus </title>
190 mutt-ng offers different screens of which every has its special
200 The <emphasis>index</emphasis> displays the contents of the
209 The <emphasis>pager</emphasis> is responsible for displaying
211 is, the header, the body and all attached parts.
218 The <emphasis>file browser</emphasis> offers operations on and
220 information of all folders mutt-ng should watch for mail.
227 The <emphasis>sidebar</emphasis> offers a permanent view of
229 contain how many total, new and/or flagged mails.
236 The <emphasis>help screen</emphasis> lists for all currently
238 commands how to invoke them as well as a short description.
245 The <emphasis>compose</emphasis> menu is a comfortable
247 actions before sending mail: change subjects, attach files,
256 The <emphasis>attachement</emphasis> menu gives a summary and
258 structure of the attachements of the current message.
265 The <emphasis>alias</emphasis> menu lists all or a fraction of
274 The <emphasis>key</emphasis> menu used in connection with
276 users choose the right key to encrypt with.
286 When mutt-ng is started without any further options, it'll open
287 the users default mailbox and display the index.
298 <title>Configuration </title>
301 Mutt-ng does <emphasis>not</emphasis> feature an internal
303 interface or menu due to the simple fact that this would be too
304 complex to handle (currently there are several <emphasis>hundred</emphasis>
305 variables which fine-tune the behaviour.)
309 Mutt-ng is configured using configuration files which allow
310 users to add comments or manage them via version control systems
315 Also, mutt-ng comes with a shell script named <literal>grml-muttng</literal>
316 kindly contributed by users which really helps and eases the
317 creation of a user's configuration file. When downloading the
318 source code via a snapshot or via subversion, it can be found in
319 the <literal>contrib</literal> directory.
330 <title>Functions </title>
333 Mutt-ng offers great flexibility due to the use of functions:
334 internally, every action a user can make mutt-ng perform is named
335 ``function.'' Those functions are assigned to keys (or even key
336 sequences) and may be completely adjusted to user's needs. The
337 basic idea is that the impatient users get a very intuitive
338 interface to start off with and advanced users virtually get no
339 limits to adjustments.
350 <title>Interaction </title>
353 Mutt-ng has two basic concepts of user interaction:
362 There is one dedicated line on the screen used to query
363 the user for input, issue any command, query variables and
364 display error and informational messages. As for every type of
365 user input, this requires manual action leading to the need of
373 The automatized interface for interaction are the so
374 called <emphasis>hooks</emphasis>. Hooks specify actions the
376 performed at well-defined situations: what to do when entering
377 which folder, what to do when displaying or replying to what
378 kind of message, etc. These are optional, i.e. a user doesn't
379 need to specify them but can do so.
396 <title>Modularization </title>
399 Although mutt-ng has many functionality built-in, many
400 features can be delegated to external tools to increase
401 flexibility: users can define programs to filter a message through
402 before displaying, users can use any program they want for
403 displaying a message, message types (such as PDF or PostScript)
404 for which mutt-ng doesn't have a built-in filter can be rendered
405 by arbitrary tools and so forth. Although mutt-ng has an alias
406 mechanism built-in, it features using external tools to query for
407 nearly every type of addresses from sources like LDAP, databases
408 or just the list of locally known users.
419 <title>Patterns </title>
422 Mutt-ng has a built-in pattern matching ``language'' which is
423 as widely used as possible to present a consistent interface to
424 users. The same ``pattern terms'' can be used for searching,
425 scoring, message selection and much more.
444 <title>Screens and Menus </title>
447 <title>Index </title>
450 The index is the screen that you usually see first when you
451 start mutt-ng. It gives an overview over your emails in the
452 currently opened mailbox. By default, this is your system mailbox.
453 The information you see in the index is a list of emails, each with
454 its number on the left, its flags (new email, important email,
455 email that has been forwarded or replied to, tagged email, ...),
456 the date when email was sent, its sender, the email size, and the
457 subject. Additionally, the index also shows thread hierarchies:
458 when you reply to an email, and the other person replies back, you
459 can see the other's person email in a "sub-tree" below. This is
460 especially useful for personal email between a group of people or
461 when you've subscribed to mailing lists.
471 <title>Pager </title>
474 The pager is responsible for showing the email content. On the
475 top of the pager you have an overview over the most important email
476 headers like the sender, the recipient, the subject, and much more
477 information. How much information you actually see depends on your
478 configuration, which we'll describe below.
482 Below the headers, you see the email body which usually contains
483 the message. If the email contains any attachments, you will see
484 more information about them below the email body, or, if the
485 attachments are text files, you can view them directly in the
490 To give the user a good overview, it is possible to configure
491 mutt-ng to show different things in the pager with different
492 colors. Virtually everything that can be described with a regular
493 expression can be colored, e.g. URLs, email addresses or smileys.
503 <title>File Browser </title>
506 The file browser is the interface to the local or remote
507 file system. When selecting a mailbox to open, the browser allows
508 custom sorting of items, limiting the items shown by a regular
509 expression and a freely adjustable format of what to display in
510 which way. It also allows for easy navigation through the
511 file system when selecting file(s) to attach to a message, select
512 multiple files to attach and many more.
522 <title>Sidebar </title>
525 The sidebar comes in handy to manage mails which are spread
526 over different folders. All folders users setup mutt-ng to watch
527 for new mail will be listed. The listing includes not only the
528 name but also the number of total messages, the number of new and
529 flagged messages. Items with new mail may be colored different
530 from those with flagged mail, items may be shortened or compress
531 if they're they to long to be printed in full form so that by
532 abbreviated names, user still now what the name stands for.
545 The help screen is meant to offer a quick help to the user. It
546 lists the current configuration of key bindings and their
547 associated commands including a short description, and currently
548 unbound functions that still need to be associated with a key
549 binding (or alternatively, they can be called via the mutt-ng
560 <title>Compose Menu </title>
563 The compose menu features a split screen containing the
564 information which really matter before actually sending a
565 message by mail or posting an article to a newsgroup: who gets
566 the message as what (recipient, newsgroup, who gets what kind of
567 copy). Additionally, users may set security options like
568 deciding whether to sign, encrypt or sign and encrypt a message
573 Also, it's used to attach messages, news articles or files to
574 a message, to re-edit any attachment including the message
585 <title>Alias Menu </title>
588 The alias menu is used to help users finding the recipients
589 of messages. For users who need to contact many people, there's
590 no need to remember addresses or names completely because it
591 allows for searching, too. The alias mechanism and thus the
592 alias menu also features grouping several addresses by a shorter
593 nickname, the actual alias, so that users don't have to select
594 each single recipient manually.
604 <title>Attachment Menu </title>
607 As will be later discussed in detail, mutt-ng features a good
608 and stable MIME implementation, that is, is greatly supports
609 sending and receiving messages of arbitrary type. The
610 attachment menu displays a message's structure in detail: what
611 content parts are attached to which parent part (which gives a
612 true tree structure), which type is of what type and what size.
613 Single parts may saved, deleted or modified to offer great and
614 easy access to message's internals.
624 <title>Key Menu </title>
627 <literal>FIXME</literal>
644 <title>Moving Around in Menus </title>
647 Information is presented in menus, very similar to ELM. Here is a
648 tableshowing the common keys used to navigate menus in Mutt-ng.
654 <title>Default Menu Movement Keys</title>
655 <tgroup cols="3" align="left" colsep="1" rowsep="1">
659 <entry>Function</entry>
660 <entry>Description</entry>
665 <entry><literal>j</literal> or <literal>Down</literal></entry>
666 <entry><literal>next-entry</literal></entry>
667 <entry>move to the next entry</entry>
670 <entry><literal>k</literal> or <literal>Up</literal></entry>
671 <entry><literal>previous-entry</literal></entry>
672 <entry>move to the previous entry</entry>
675 <entry><literal>z</literal> or <literal>PageDn</literal></entry>
676 <entry><literal>page-down</literal></entry>
677 <entry>go to the next page</entry>
680 <entry><literal>Z</literal> or <literal>PageUp</literal></entry>
681 <entry><literal>page-up</literal></entry>
682 <entry>go to the previous page</entry>
685 <entry><literal>=</literal> or <literal>Home</literal></entry>
686 <entry><literal>first-entry</literal></entry>
687 <entry>jump to the first entry</entry>
690 <entry><literal>*</literal> or <literal>End</literal></entry>
691 <entry><literal>last-entry</literal></entry>
692 <entry>jump to the last entry</entry>
695 <entry><literal>q</literal></entry>
696 <entry><literal>quit</literal></entry>
697 <entry>exit the current menu</entry>
700 <entry><literal>?</literal></entry>
701 <entry><literal>help</literal></entry>
702 <entry>list all key bindings for the current menu</entry>
718 <sect1 id="editing"> <!--{{{-->
719 <title>Editing Input Fields </title>
722 Mutt-ng has a builtin line editor which is used as the primary way to
724 textual data such as email addresses or filenames. The keys used to
726 around while editing are very similar to those of Emacs.
732 <title>Built-In Editor Functions</title>
733 <tgroup cols="3" align="left" colsep="1" rowsep="1">
737 <entry>Function</entry>
738 <entry>Description</entry>
743 <entry><literal>^A or <Home> </literal></entry>
744 <entry><literal>bol </literal></entry>
745 <entry>move to the start of the line</entry>
748 <entry><literal>^B or <Left> </literal></entry>
749 <entry><literal>backward-char </literal>
750 </entry><entry>move back one char</entry>
753 <entry><literal>Esc B </literal></entry>
754 <entry><literal>backward-word </literal></entry>
755 <entry>move back one word</entry>
758 <entry><literal>^D or <Delete> </literal></entry>
759 <entry><literal>delete-char </literal></entry>
760 <entry>delete the char under the cursor</entry>
763 <entry><literal>^E or <End> </literal></entry>
764 <entry><literal>eol </literal></entry>
765 <entry>move to the end of the line</entry>
768 <entry><literal>^F or <Right> </literal></entry>
769 <entry><literal>forward-char </literal></entry>
770 <entry>move forward one char</entry>
773 <entry><literal>Esc F </literal></entry>
774 <entry><literal>forward-word </literal></entry>
775 <entry>move forward one word</entry>
778 <entry><literal><Tab> </literal></entry>
779 <entry><literal>complete </literal></entry>
780 <entry>complete filename or alias</entry>
783 <entry><literal>^T </literal></entry>
784 <entry><literal>complete-query </literal></entry>
785 <entry>complete address with query</entry>
788 <entry><literal>^K </literal></entry>
789 <entry><literal>kill-eol </literal></entry>
790 <entry>delete to the end of the line</entry>
793 <entry><literal>ESC d </literal></entry>
794 <entry><literal>kill-eow </literal></entry>
795 <entry>delete to the end of the word</entry>
798 <entry><literal>^W </literal></entry>
799 <entry><literal>kill-word </literal></entry>
800 <entry>kill the word in front of the cursor</entry>
803 <entry><literal>^U </literal></entry>
804 <entry><literal>kill-line </literal></entry>
805 <entry>delete entire line</entry>
808 <entry><literal>^V </literal></entry>
809 <entry><literal>quote-char </literal></entry>
810 <entry>quote the next typed key</entry>
813 <entry><literal><Up> </literal></entry>
814 <entry><literal>history-up </literal></entry>
815 <entry>recall previous string from history</entry>
818 <entry><literal><Down> </literal></entry>
819 <entry><literal>history-down </literal></entry>
820 <entry>recall next string from history</entry>
823 <entry><literal><BackSpace> </literal></entry>
824 <entry><literal>backspace </literal></entry>
825 <entry>kill the char in front of the cursor</entry>
828 <entry><literal>Esc u </literal></entry>
829 <entry><literal>upcase-word </literal></entry>
830 <entry>convert word to upper case</entry>
833 <entry><literal>Esc l </literal></entry>
834 <entry><literal>downcase-word </literal></entry>
835 <entry>convert word to lower case</entry>
838 <entry><literal>Esc c </literal></entry>
839 <entry><literal>capitalize-word </literal></entry>
840 <entry>capitalize the word</entry>
843 <entry><literal>^G </literal></entry>
844 <entry><literal>n/a </literal></entry>
848 <entry><literal><Return> </literal></entry>
849 <entry><literal>n/a </literal></entry>
850 <entry>finish editing</entry>
859 You can remap the <emphasis>editor</emphasis> functions using the <link linkend="bind">
862 command. For example, to make the <emphasis>Delete</emphasis> key
863 delete the character in
864 front of the cursor rather than under, you could use
868 <literal>bind editor <delete> backspace</literal>
879 <title>Reading Mail - The Index and Pager </title> <!--{{{-->
882 Similar to many other mail clients, there are two modes in which mail
883 isread in Mutt-ng. The first is the index of messages in the mailbox,
885 called the ``index'' in Mutt-ng. The second mode is the display of the
886 message contents. This is called the ``pager.''
890 The next few sections describe the functions provided in each of these
895 <title>The Message Index</title> <!--{{{-->
900 <title>Default Index Menu Bindings</title>
901 <tgroup cols="3" align="left" colsep="1" rowsep="1">
905 <entry>Function</entry>
906 <entry>Description</entry>
910 <row><entry><literal>c </literal></entry><entry><literal></literal></entry><entry>change to a different mailbox</entry></row>
911 <row><entry><literal>ESC c </literal></entry><entry><literal></literal></entry><entry>change to a folder in read-only mode</entry></row>
912 <row><entry><literal>C </literal></entry><entry><literal></literal></entry><entry>copy the current message to another mailbox</entry></row>
913 <row><entry><literal>ESC C </literal></entry><entry><literal></literal></entry><entry>decode a message and copy it to a folder</entry></row>
914 <row><entry><literal>ESC s </literal></entry><entry><literal></literal></entry><entry>decode a message and save it to a folder</entry></row>
915 <row><entry><literal>D </literal></entry><entry><literal></literal></entry><entry>delete messages matching a pattern</entry></row>
916 <row><entry><literal>d </literal></entry><entry><literal></literal></entry><entry>delete the current message</entry></row>
917 <row><entry><literal>F </literal></entry><entry><literal></literal></entry><entry>mark as important</entry></row>
918 <row><entry><literal>l </literal></entry><entry><literal></literal></entry><entry>show messages matching a pattern</entry></row>
919 <row><entry><literal>N </literal></entry><entry><literal></literal></entry><entry>mark message as new</entry></row>
920 <row><entry><literal>o </literal></entry><entry><literal></literal></entry><entry>change the current sort method</entry></row>
921 <row><entry><literal>O </literal></entry><entry><literal></literal></entry><entry>reverse sort the mailbox</entry></row>
922 <row><entry><literal>q </literal></entry><entry><literal></literal></entry><entry>save changes and exit</entry></row>
923 <row><entry><literal>s </literal></entry><entry><literal></literal></entry><entry>save-message</entry></row>
924 <row><entry><literal>T </literal></entry><entry><literal></literal></entry><entry>tag messages matching a pattern</entry></row>
925 <row><entry><literal>t </literal></entry><entry><literal></literal></entry><entry>toggle the tag on a message</entry></row>
926 <row><entry><literal>ESC t </literal></entry><entry><literal></literal></entry><entry>toggle tag on entire message thread</entry></row>
927 <row><entry><literal>U </literal></entry><entry><literal></literal></entry><entry>undelete messages matching a pattern</entry></row>
928 <row><entry><literal>u </literal></entry><entry><literal></literal></entry><entry>undelete-message</entry></row>
929 <row><entry><literal>v </literal></entry><entry><literal></literal></entry><entry>view-attachments</entry></row>
930 <row><entry><literal>x </literal></entry><entry><literal></literal></entry><entry>abort changes and exit</entry></row>
931 <row><entry><literal><Return> </literal></entry><entry><literal></literal></entry><entry>display-message</entry></row>
932 <row><entry><literal><Tab> </literal></entry><entry><literal></literal></entry><entry>jump to the next new or unread message</entry></row>
933 <row><entry><literal>@ </literal></entry><entry><literal></literal></entry><entry>show the author's full e-mail address</entry></row>
934 <row><entry><literal>$ </literal></entry><entry><literal></literal></entry><entry>save changes to mailbox</entry></row>
935 <row><entry><literal>/ </literal></entry><entry><literal></literal></entry><entry>search</entry></row>
936 <row><entry><literal>ESC / </literal></entry><entry><literal></literal></entry><entry>search-reverse</entry></row>
937 <row><entry><literal>^L </literal></entry><entry><literal></literal></entry><entry>clear and redraw the screen</entry></row>
938 <row><entry><literal>^T </literal></entry><entry><literal></literal></entry><entry>untag messages matching a pattern</entry></row>
946 <title>Status Flags</title> <!--{{{-->
949 In addition to who sent the message and the subject, a short
951 the disposition of each message is printed beside the message
953 Zero or more of the following ``flags'' may appear, which mean:
964 message is deleted (is marked for deletion)
972 message have attachments marked for deletion
980 contains a PGP public key
1004 message is PGP encrypted
1012 message has been replied to
1020 message is signed, and the signature is succesfully
1053 Some of the status flags can be turned on or off using
1059 <emphasis role="bold">set-flag</emphasis> (default: w)
1065 <emphasis role="bold">clear-flag</emphasis> (default: W)
1074 Furthermore, the following flags reflect who the message is
1076 to. They can be customized with the
1077 <link linkend="to-chars">$to_chars</link> variable.
1087 message is to you and you only
1095 message is to you, but also to or cc'ed to others
1103 message is cc'ed to you
1119 message is sent to a subscribed mailing list
1133 <title>The Pager</title> <!--{{{-->
1136 By default, Mutt-ng uses its builtin pager to display the body of
1138 The pager is very similar to the Unix program <emphasis>less</emphasis> though not nearly as
1145 <title>Default Pager Menu Bindings</title>
1146 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1150 <entry>Function</entry>
1151 <entry>Description</entry>
1155 <row><entry><literal><Return> </literal></entry><entry><literal></literal></entry><entry>go down one line</entry></row>
1156 <row><entry><literal><Space> </literal></entry><entry><literal></literal></entry><entry>display the next page (or next message if at the end of a message)</entry></row>
1157 <row><entry><literal>- </literal></entry><entry><literal></literal></entry><entry>go back to the previous page</entry></row>
1158 <row><entry><literal>n </literal></entry><entry><literal></literal></entry><entry>search for next match</entry></row>
1159 <row><entry><literal>S </literal></entry><entry><literal></literal></entry><entry>skip beyond quoted text</entry></row>
1160 <row><entry><literal>T </literal></entry><entry><literal></literal></entry><entry>toggle display of quoted text</entry></row>
1161 <row><entry><literal>? </literal></entry><entry><literal></literal></entry><entry>show key bindings</entry></row>
1162 <row><entry><literal>/ </literal></entry><entry><literal></literal></entry><entry>search for a regular expression (pattern)</entry></row>
1163 <row><entry><literal>ESC / </literal></entry><entry><literal></literal></entry><entry>search backwards for a regular expression</entry></row>
1164 <row><entry><literal>\ </literal></entry><entry><literal></literal></entry><entry>toggle search pattern coloring</entry></row>
1165 <row><entry><literal>^ </literal></entry><entry><literal></literal></entry><entry>jump to the top of the message</entry></row>
1174 In addition, many of the functions from the <emphasis>index</emphasis> are available in
1175 the pager, such as <emphasis>delete-message</emphasis> or <emphasis>
1179 advantage over using an external pager to view messages).
1183 Also, the internal pager supports a couple other advanced features.
1185 one, it will accept and translate the ``standard'' nroff sequences
1186 forbold and underline. These sequences are a series of either the
1188 backspace (ˆH), the letter again for bold or the letter,
1190 ``_'' for denoting underline. Mutt-ng will attempt to display
1192 in bold and underline respectively if your terminal supports them. If
1193 not, you can use the bold and underline <link
1194 linkend="color">color</link>
1195 objects to specify a color or mono attribute for them.
1199 Additionally, the internal pager supports the ANSI escape
1200 sequences for character attributes. Mutt-ng translates them
1201 into the correct color and character settings. The sequences
1202 Mutt-ng supports are: <literal>ESC [ Ps;Ps;Ps;...;Ps
1203 m</literal> (see table below for possible values for
1204 <literal>Ps</literal>).
1210 <title>ANSI Escape Sequences</title>
1211 <tgroup cols="2" align="left" colsep="1" rowsep="1">
1214 <entry>Value</entry>
1215 <entry>Attribute</entry>
1219 <row><entry><literal>0 </literal></entry><entry>All Attributes Off</entry></row>
1220 <row><entry><literal>1 </literal></entry><entry>Bold on</entry></row>
1221 <row><entry><literal>4 </literal></entry><entry>Underline on</entry></row>
1222 <row><entry><literal>5 </literal></entry><entry>Blink on</entry></row>
1223 <row><entry><literal>7 </literal></entry><entry>Reverse video on</entry></row>
1224 <row><entry><literal>3x </literal></entry><entry>Foreground color is x (see table below)</entry></row>
1225 <row><entry><literal>4x </literal></entry><entry>Background color is x (see table below)</entry></row>
1232 <title>ANSI Colors</title>
1233 <tgroup cols="2" align="left" colsep="1" rowsep="1">
1236 <entry>Number</entry>
1237 <entry>Color</entry>
1241 <row><entry><literal>0 </literal></entry><entry>black</entry></row>
1242 <row><entry><literal>1 </literal></entry><entry>red</entry></row>
1243 <row><entry><literal>2 </literal></entry><entry>green</entry></row>
1244 <row><entry><literal>3 </literal></entry><entry>yellow</entry></row>
1245 <row><entry><literal>4 </literal></entry><entry>blue</entry></row>
1246 <row><entry><literal>5 </literal></entry><entry>magenta</entry></row>
1247 <row><entry><literal>6 </literal></entry><entry>cyan</entry></row>
1248 <row><entry><literal>7 </literal></entry><entry>white</entry></row>
1257 Mutt-ng uses these attributes for handling text/enriched messages,
1259 can also be used by an external <link
1260 linkend="auto-view">autoview</link>
1261 script for highlighting purposes. <emphasis role="bold">Note:</emphasis> If you change the colors for your
1262 display, for example by changing the color associated with color2 for
1263 your xterm, then that color will be used instead of green.
1269 <sect2 id="threads">
1270 <title>Threaded Mode</title> <!--{{{-->
1273 When the mailbox is <link linkend="sort">sorted</link> by <emphasis>
1277 a few additional functions available in the <emphasis>index</emphasis> and <emphasis>
1286 <title>Default Thread Function Bindings</title>
1287 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1291 <entry>Function</entry>
1292 <entry>Description</entry>
1296 <row><entry><literal>^D </literal></entry><entry><literal>delete-thread </literal></entry><entry>delete all messages in the current thread</entry></row>
1297 <row><entry><literal>^U </literal></entry><entry><literal>undelete-thread </literal></entry><entry>undelete all messages in the current thread</entry></row>
1298 <row><entry><literal>^N </literal></entry><entry><literal>next-thread </literal></entry><entry>jump to the start of the next thread</entry></row>
1299 <row><entry><literal>^P </literal></entry><entry><literal>previous-thread </literal></entry><entry>jump to the start of the previous thread</entry></row>
1300 <row><entry><literal>^R </literal></entry><entry><literal>read-thread </literal></entry><entry>mark the current thread as read</entry></row>
1301 <row><entry><literal>ESC d </literal></entry><entry><literal>delete-subthread </literal></entry><entry>delete all messages in the current subthread</entry></row>
1302 <row><entry><literal>ESC u </literal></entry><entry><literal>undelete-subthread </literal></entry><entry>undelete all messages in the current subthread</entry></row>
1303 <row><entry><literal>ESC n </literal></entry><entry><literal>next-subthread </literal></entry><entry>jump to the start of the next subthread</entry></row>
1304 <row><entry><literal>ESC p </literal></entry><entry><literal>previous-subthread </literal></entry><entry>jump to the start of the previous subthread</entry></row>
1305 <row><entry><literal>ESC r </literal></entry><entry><literal>read-subthread </literal></entry><entry>mark the current subthread as read </entry></row>
1306 <row><entry><literal>ESC t </literal></entry><entry><literal>tag-thread </literal></entry><entry>toggle the tag on the current thread</entry></row>
1307 <row><entry><literal>ESC v </literal></entry><entry><literal>collapse-thread </literal></entry><entry>toggle collapse for the current thread</entry></row>
1308 <row><entry><literal>ESC V </literal></entry><entry><literal>collapse-all </literal></entry><entry>toggle collapse for all threads</entry></row>
1309 <row><entry><literal>P </literal></entry><entry><literal>parent-message </literal></entry><entry>jump to parent message in thread</entry></row>
1318 <emphasis role="bold">Note:</emphasis> Collapsing a thread displays
1319 only the first message
1320 in the thread and hides the others. This is useful when threads
1321 contain so many messages that you can only see a handful of threads
1322 onthe screen. See %M in <link
1323 linkend="index-format">
1327 For example, you could use
1328 "%?M?(#%03M)&(%4l)?" in <link linkend="index-format">
1332 display the number of hidden messages if the thread is collapsed.
1336 See also: <link linkend="strict-threads">strict-threads</link>.
1343 <title>Miscellaneous Functions</title> <!--{{{-->
1346 <emphasis role="bold">create-alias</emphasis><anchor id="create-alias"/>
1352 Creates a new alias based upon the current message (or prompts for a
1353 new one). Once editing is complete, an <link linkend="alias">alias</link>
1354 command is added to the file specified by the <link linkend="alias-file">
1357 variable for future use. <emphasis role="bold">Note:</emphasis>
1358 Specifying an <link linkend="alias-file">alias-file</link>
1359 does not add the aliases specified there-in, you must also <link linkend="source">
1366 <emphasis role="bold">check-traditional-pgp</emphasis><anchor id="check-traditional-pgp"/>
1372 This function will search the current message for content signed or
1373 encrypted with PGP the "traditional" way, that is, without proper
1374 MIME tagging. Technically, this function will temporarily change
1375 the MIME content types of the body parts containing PGP data; this
1376 is similar to the <link linkend="edit-type">edit-type</link>
1382 <emphasis role="bold">display-toggle-weed</emphasis><anchor id="display-toggle-weed"/>
1388 Toggles the weeding of message header fields specified by <link linkend="ignore">
1395 <emphasis role="bold">edit</emphasis><anchor id="edit"/>
1401 This command (available in the ``index'' and ``pager'') allows you to
1402 edit the raw current message as it's present in the mail folder.
1403 After you have finished editing, the changed message will be
1404 appended to the current folder, and the original message will be
1405 marked for deletion.
1409 <emphasis role="bold">edit-type</emphasis><anchor id="edit-type"/>
1411 (default: ˆE on the attachment menu, and in the pager and index
1412 menus; ˆT on the
1417 This command is used to temporarily edit an attachment's content
1418 type to fix, for instance, bogus character set parameters. When
1419 invoked from the index or from the pager, you'll have the
1420 opportunity to edit the top-level attachment's content type. On the
1421 <link linkend="attach-menu">attach-menu</link>, you can change any
1422 attachment's content type. These changes are not persistent, and get
1423 lost upon changing folders.
1427 Note that this command is also available on the <link linkend="compose-menu">
1430 .There, it's used to
1431 fine-tune the properties of attachments you are going to send.
1435 <emphasis role="bold">enter-command</emphasis><anchor id="enter-command"/>
1441 This command is used to execute any command you would normally put in
1443 configuration file. A common use is to check the settings of
1445 in conjunction with <link linkend="macro">macro</link> to change
1451 <emphasis role="bold">extract-keys</emphasis><anchor id="extract-keys"/>
1457 This command extracts PGP public keys from the current or tagged
1458 message(s) and adds them to your PGP public key ring.
1462 <emphasis role="bold">forget-passphrase</emphasis><anchor id="forget-passphrase"/>
1469 This command wipes the passphrase(s) from memory. It is useful, if
1470 you misspelled the passphrase.
1474 <emphasis role="bold">list-reply</emphasis><anchor id="func-list-reply"/>
1480 Reply to the current or tagged message(s) by extracting any addresses
1482 match the regular expressions given by the <link linkend="lists">
1485 commands, but also honor any <literal>Mail-Followup-To</literal>
1487 <link linkend="honor-followup-to">honor-followup-to</link>
1488 configuration variable is set. Using this when replying to messages
1490 to mailing lists helps avoid duplicate copies being sent to the
1492 the message you are replying to.
1496 <emphasis role="bold">pipe-message</emphasis><anchor id="pipe-message"/>
1502 Asks for an external Unix command and pipes the current or
1503 tagged message(s) to it. The variables <link linkend="pipe-decode">
1506 ,<link linkend="pipe-split">pipe-split</link>, <link linkend="pipe-sep">
1509 and <link linkend="wait-key">wait-key</link> control the exact
1515 <emphasis role="bold">resend-message</emphasis><anchor id="resend-message"/>
1521 With resend-message, mutt takes the current message as a template for
1523 new message. This function is best described as "recall from
1525 folders". It can conveniently be used to forward MIME messages while
1526 preserving the original mail structure. Note that the amount of
1528 included here depends on the value of the <link linkend="weed">weed</link>
1533 This function is also available from the attachment menu. You can use
1535 to easily resend a message which was included with a bounce message
1536 as a message/rfc822 body part.
1540 <emphasis role="bold">shell-escape</emphasis><anchor id="shell-escape"/>
1546 Asks for an external Unix command and executes it. The <link linkend="wait-key">
1549 can be used to control
1550 whether Mutt-ng will wait for a key to be pressed when the command
1552 (presumably to let the user read the output of the command), based on
1553 the return status of the named command.
1557 <emphasis role="bold">toggle-quoted</emphasis><anchor id="toggle-quoted"/>
1563 The <emphasis>pager</emphasis> uses the <link linkend="quote-regexp">
1566 variable to detect quoted text when
1567 displaying the body of the message. This function toggles the
1568 displayof the quoted material in the message. It is particularly
1570 are interested in just the response and there is a large amount of
1571 quoted text in the way.
1575 <emphasis role="bold">skip-quoted</emphasis><anchor id="skip-quoted"/>
1581 This function will go to the next line of non-quoted text which come
1582 after a line of quoted text in the internal pager.
1596 <title>Sending Mail </title> <!--{{{-->
1599 The following bindings are available in the <emphasis>index</emphasis>
1607 <title>Default Mail Composition Bindings</title>
1608 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1612 <entry>Function</entry>
1613 <entry>Description</entry>
1617 <row><entry><literal>m </literal></entry><entry><literal>compose </literal></entry><entry>compose a new message</entry></row>
1618 <row><entry><literal>r </literal></entry><entry><literal>reply </literal></entry><entry>reply to sender</entry></row>
1619 <row><entry><literal>g </literal></entry><entry><literal>group-reply </literal></entry><entry>reply to all recipients</entry></row>
1620 <row><entry><literal>L </literal></entry><entry><literal>list-reply </literal></entry><entry>reply to mailing list address</entry></row>
1621 <row><entry><literal>f </literal></entry><entry><literal>forward </literal></entry><entry>forward message</entry></row>
1622 <row><entry><literal>b </literal></entry><entry><literal>bounce </literal></entry><entry>bounce (remail) message</entry></row>
1623 <row><entry><literal>ESC k </literal></entry><entry><literal>mail-key </literal></entry><entry>mail a PGP public key to someone</entry></row>
1631 Bouncing a message sends the message as is to the recipient you
1632 specify. Forwarding a message allows you to add comments or
1633 modify the message you are forwarding. These items are discussed
1634 in greater detail in the next chapter <link linkend="forwarding-mail">
1641 <title>Composing new messages </title> <!--{{{-->
1644 When you want to send an email using mutt-ng, simply press <literal>m</literal> on
1645 your keyboard. Then, mutt-ng asks for the recipient via a prompt in
1657 After you've finished entering the recipient(s), press return. If you
1658 want to send an email to more than one recipient, separate the email
1659 addresses using the comma "<literal>,</literal>". Mutt-ng then asks
1661 subject. Again, press return after you've entered it. After that,
1663 got the most important information from you, and starts up an editor
1664 where you can then enter your email.
1668 The editor that is called is selected in the following way: you
1669 can e.g. set it in the mutt-ng configuration:
1675 set editor = "vim +/^$/ -c ':set tw=72'"
1677 set editor = "emacs"</screen>
1682 If you don't set your preferred editor in your configuration, mutt-ng
1683 first looks whether the environment variable <literal>$VISUAL</literal> is set, and if
1684 so, it takes its value as editor command. Otherwise, it has a look
1685 at <literal>$EDITOR</literal> and takes its value if it is set. If no
1687 can be found, mutt-ng simply assumes <literal>vi</literal> to be the
1689 since it's the most widespread editor in the Unix world and it's
1691 safe to assume that it is installed and available.
1695 When you've finished entering your message, save it and quit your
1696 editor. Mutt-ng will then present you with a summary screen, the
1698 On the top, you see a summary of the most important available key
1700 Below that, you see the sender, the recipient(s), Cc and/or Bcc
1701 recipient(s), the subject, the reply-to address, and optionally
1702 information where the sent email will be stored and whether it should
1703 be digitally signed and/or encrypted.
1707 Below that, you see a list of "attachments". The mail you've just
1708 entered before is also an attachment, but due to its special type
1709 (it's plain text), it will be displayed as the normal message on
1710 the receiver's side.
1714 At this point, you can add more attachments, pressing <literal>a</literal>, you
1715 can edit the recipient addresses, pressing <literal>t</literal> for
1717 <literal>c</literal> for the "Cc:" field, and <literal>b</literal>
1718 for the "Bcc: field. You can
1719 also edit the subject the subject by simply pressing <literal>s</literal> or the
1720 email message that you've entered before by pressing <literal>e</literal>. You will
1721 then again return to the editor. You can even edit the sender, by
1723 <literal><esc>f</literal>, but this shall only be used with
1728 Alternatively, you can configure mutt-ng in a way that most of the
1729 above settings can be edited using the editor. Therefore, you only
1730 need to add the following to your configuration:
1736 set edit_headers</screen>
1741 Once you have finished editing the body of your mail message, you are
1742 returned to the <emphasis>compose</emphasis> menu. The following
1743 options are available:
1749 <title>Default Compose Menu Bindings</title>
1750 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1754 <entry>Function</entry>
1755 <entry>Description</entry>
1759 <row><entry><literal>a </literal></entry><entry><literal>attach-file </literal></entry><entry>attach a file</entry></row>
1760 <row><entry><literal>A </literal></entry><entry><literal>attach-message </literal></entry><entry>attach message(s) to the message</entry></row>
1761 <row><entry><literal>ESC k </literal></entry><entry><literal>attach-key </literal></entry><entry>attach a PGP public key</entry></row>
1762 <row><entry><literal>d </literal></entry><entry><literal>edit-description </literal></entry><entry>edit description on attachment</entry></row>
1763 <row><entry><literal>D </literal></entry><entry><literal>detach-file </literal></entry><entry>detach a file</entry></row>
1764 <row><entry><literal>t </literal></entry><entry><literal>edit-to </literal></entry><entry>edit the To field</entry></row>
1765 <row><entry><literal>ESC f </literal></entry><entry><literal>edit-from </literal></entry><entry>edit the From field</entry></row>
1766 <row><entry><literal>r </literal></entry><entry><literal>edit-reply-to </literal></entry><entry>edit the Reply-To field</entry></row>
1767 <row><entry><literal>c </literal></entry><entry><literal>edit-cc </literal></entry><entry>edit the Cc field</entry></row>
1768 <row><entry><literal>b </literal></entry><entry><literal>edit-bcc </literal></entry><entry>edit the Bcc field</entry></row>
1769 <row><entry><literal>y </literal></entry><entry><literal>send-message </literal></entry><entry>send the message</entry></row>
1770 <row><entry><literal>s </literal></entry><entry><literal>edit-subject </literal></entry><entry>edit the Subject</entry></row>
1771 <row><entry><literal>S </literal></entry><entry><literal>smime-menu </literal></entry><entry>select S/MIME options</entry></row>
1772 <row><entry><literal>f </literal></entry><entry><literal>edit-fcc </literal></entry><entry>specify an ``Fcc'' mailbox</entry></row>
1773 <row><entry><literal>p </literal></entry><entry><literal>pgp-menu </literal></entry><entry>select PGP options</entry></row>
1774 <row><entry><literal>P </literal></entry><entry><literal>postpone-message </literal></entry><entry>postpone this message until later</entry></row>
1775 <row><entry><literal>q </literal></entry><entry><literal>quit </literal></entry><entry>quit (abort) sending the message</entry></row>
1776 <row><entry><literal>w </literal></entry><entry><literal>write-fcc </literal></entry><entry>write the message to a folder</entry></row>
1777 <row><entry><literal>i </literal></entry><entry><literal>ispell </literal></entry><entry>check spelling (if available on your system)</entry></row>
1778 <row><entry><literal>^F </literal></entry><entry><literal>forget-passphrase </literal></entry><entry>wipe passphrase(s) from memory</entry></row>
1786 <emphasis role="bold">Note:</emphasis> The attach-message function
1787 will prompt you for a folder to
1788 attach messages from. You can now tag messages in that folder and
1789 theywill be attached to the message you are sending. Note that
1790 certainoperations like composing a new mail, replying, forwarding,
1792 not permitted when you are in that folder. The %r in <link linkend="status-format">
1796 a 'A' to indicate that you are in attach-message mode.
1807 <title>Replying </title> <!--{{{-->
1810 <title>Simple Replies </title> <!--{{{-->
1813 When you want to reply to an email message, select it in the index
1814 menu and then press <literal>r</literal>. Mutt-ng's behaviour is
1816 behaviour when you compose a message: first, you will be asked for
1817 the recipient, then for the subject, and then, mutt-ng will start
1818 the editor with the quote attribution and the quoted message. This
1819 can e.g. look like the example below.
1825 On Mon, Mar 07, 2005 at 05:02:12PM +0100, Michael Svensson wrote:
1826 > Bill, can you please send last month's progress report to Mr.
1827 > Morgan? We also urgently need the cost estimation for the new
1828 > production server that we want to set up before our customer's
1829 > project will go live.</screen>
1834 You can start editing the email message. It is strongly
1835 recommended to put your answer <emphasis>below</emphasis> the
1837 only quote what is really necessary and that you refer to. Putting
1838 your answer on top of the quoted message, is, although very
1839 widespread, very often not considered to be a polite way to answer
1844 The quote attribution is configurable, by default it is set to
1847 set attribution = "On %d, %n wrote:"</screen>
1852 It can also be set to something more compact, e.g.
1855 set attribution = "attribution="* %n <%a> [%(%y-%m-%d %H:%M)]:"</screen>
1860 The example above results in the following attribution:
1863 * Michael Svensson <svensson@foobar.com> [05-03-06 17:02]:
1864 > Bill, can you please send last month's progress report to Mr.
1865 > Morgan? We also urgently need the cost estimation for the new
1866 > production server that we want to set up before our customer's
1867 > project will go live.</screen>
1872 Generally, try to keep your attribution short yet
1873 information-rich. It is <emphasis>not</emphasis> the right place
1875 long "attribution" novels or anything like that: the right place
1876 for such things is - if at all - the email signature at the very
1877 bottom of the message.
1881 When you're done with writing your message, save and quit the
1882 editor. As before, you will return to the compose menu, which is
1883 used in the same way as before.
1894 <title>Group Replies </title> <!--{{{-->
1897 In the situation where a group of people uses email as a
1898 discussion, most of the emails will have one or more recipients,
1899 and probably several "Cc:" recipients. The group reply
1900 functionalityensures that when you press <literal>g</literal>
1901 instead of <literal>r</literal> to do a reply,
1902 each and every recipient that is contained in the original message
1903 will receive a copy of the message, either as normal recipient or
1915 <title>List Replies </title> <!--{{{-->
1918 When you use mailing lists, it's generally better to send your
1919 reply to a message only to the list instead of the list and the
1920 original author. To make this easy to use, mutt-ng features list
1925 To do a list reply, simply press <literal>L</literal>. If the email
1927 a <literal>Mail-Followup-To:</literal> header, its value will be
1929 address. Otherwise, mutt-ng searches through all mail addresses in
1930 the original message and tries to match them a list of regular
1931 expressions which can be specified using the <literal>lists</literal> command.
1932 If any of the regular expression matches, a mailing
1933 list address has been found, and it will be used as reply address.
1939 lists linuxevent@luga\.at vuln-dev@ mutt-ng-users@</screen>
1944 Nowadays, most mailing list software like GNU Mailman adds a
1945 <literal>Mail-Followup-To:</literal> header to their emails anyway,
1947 <literal>lists</literal> is hardly ever necessary in practice.
1965 <title>Editing the message header </title>
1968 When editing the header of your outgoing message, there are a couple
1970 special features available.
1976 <literal>Fcc:</literal> <emphasis>filename</emphasis>
1978 Mutt-ng will pick up <emphasis>filename</emphasis>
1979 just as if you had used the <emphasis>edit-fcc</emphasis> function in
1980 the <emphasis>compose</emphasis> menu.
1984 You can also attach files to your message by specifying
1986 <literal>Attach:</literal> <emphasis>filename</emphasis> [ <emphasis>
1991 where <emphasis>filename</emphasis> is the file to attach and <emphasis>
1995 optional string to use as the description of the attached file.
1999 When replying to messages, if you remove the <emphasis>In-Reply-To:</emphasis> field from
2000 the header field, Mutt-ng will not generate a <emphasis>References:</emphasis> field, which
2001 allows you to create a new message thread.
2005 Also see <link linkend="edit-headers">edit-headers</link>.
2015 <title>Using Mutt-ng with PGP </title>
2018 If you want to use PGP, you can specify
2022 <literal>Pgp:</literal> [ <literal>E</literal> | <literal>
2025 | <literal>S</literal><emphasis><id></emphasis> ]
2030 ``E'' encrypts, ``S'' signs and
2031 ``S<id>'' signs with the given key, setting <link linkend="pgp-sign-as">
2038 If you have told mutt to PGP encrypt a message, it will guide you
2039 through a key selection process when you try to send the message.
2040 Mutt-ng will not ask you any questions about keys which have a
2041 certified user ID matching one of the message recipients' mail
2042 addresses. However, there may be situations in which there are
2043 several keys, weakly certified user ID fields, or where no matching
2048 In these cases, you are dropped into a menu with a list of keys from
2049 which you can select one. When you quit this menu, or mutt can't
2050 find any matching keys, you are prompted for a user ID. You can, as
2051 usually, abort this prompt using <literal>ˆG</literal>. When
2052 you do so, mutt will
2053 return to the compose screen.
2057 Once you have successfully finished the key selection, the message
2058 will be encrypted using the selected public keys, and sent out.
2062 Most fields of the entries in the key selection menu (see also <link linkend="pgp-entry-format">
2066 have obvious meanings. But some explanations on the capabilities,
2068 and validity fields are in order.
2072 The flags sequence (%f) will expand to one of the following
2077 <title>PGP Key Menu Flags</title>
2078 <tgroup cols="2" align="left" colsep="1" rowsep="1">
2082 <entry>Description</entry>
2086 <row><entry><literal>R </literal></entry><entry>The key has been revoked and can't be used.</entry></row>
2087 <row><entry><literal>X </literal></entry><entry>The key is expired and can't be used.</entry></row>
2088 <row><entry><literal>d </literal></entry><entry>You have marked the key as disabled.</entry></row>
2089 <row><entry><literal>c </literal></entry><entry>There are unknown critical self-signature packets.</entry></row>
2097 The capabilities field (%c) expands to a two-character
2098 sequencerepresenting a key's capabilities. The first character gives
2099 the key's encryption capabilities: A minus sign (<emphasis role="bold">
2103 that the key cannot be used for encryption. A dot (<emphasis role="bold">
2107 it's marked as a signature key in one of the user IDs, but may
2108 also be used for encryption. The letter <emphasis role="bold">e</emphasis> indicates that
2109 this key can be used for encryption.
2113 The second character indicates the key's signing capabilities. Once
2114 again, a ``<emphasis role="bold">-</emphasis>'' implies ``not for
2115 signing'', ``<emphasis role="bold">.</emphasis>'' implies
2116 that the key is marked as an encryption key in one of the user-ids,
2118 ``<emphasis role="bold">s</emphasis>'' denotes a key which can be
2123 Finally, the validity field (%t) indicates how well-certified
2125 is. A question mark (<emphasis role="bold">?</emphasis>) indicates
2126 undefined validity, a minus
2127 character (<emphasis role="bold">-</emphasis>) marks an untrusted
2128 association, a space character
2129 means a partially trusted association, and a plus character (<emphasis role="bold">
2133 indicates complete validity.
2143 <title>Sending anonymous messages via mixmaster </title>
2146 You may also have configured mutt to co-operate with Mixmaster, an
2147 anonymous remailer. Mixmaster permits you to send your messages
2148 anonymously using a chain of remailers. Mixmaster support in mutt is
2150 mixmaster version 2.04 (beta 45 appears to be the latest) and 2.03.
2151 It does not support earlier versions or the later so-called version 3
2153 of which the latest appears to be called 2.9b23.
2157 To use it, you'll have to obey certain restrictions. Most
2158 important, you cannot use the <literal>Cc</literal> and <literal>Bcc</literal> headers. To tell
2159 Mutt-ng to use mixmaster, you have to select a remailer chain, using
2160 the mix function on the compose menu.
2164 The chain selection screen is divided into two parts. In the
2165 (larger) upper part, you get a list of remailers you may use. In
2166 the lower part, you see the currently selected chain of remailers.
2170 You can navigate in the chain using the <literal>chain-prev</literal>
2172 <literal>chain-next</literal> functions, which are by default bound
2174 and right arrows and to the <literal>h</literal> and <literal>l</literal> keys (think vi
2175 keyboard bindings). To insert a remailer at the current chain
2176 position, use the <literal>insert</literal> function. To append a
2178 the current chain position, use <literal>select-entry</literal> or <literal>
2182 You can also delete entries from the chain, using the corresponding
2183 function. Finally, to abandon your changes, leave the menu, or
2184 <literal>accept</literal> them pressing (by default) the <literal>
2191 Note that different remailers do have different capabilities,
2192 indicated in the %c entry of the remailer menu lines (see
2193 <link linkend="mix-entry-format">mix-entry-format</link>). Most
2195 the ``middleman'' capability, indicated by a capital ``M'': This
2196 means that the remailer in question cannot be used as the final
2197 element of a chain, but will only forward messages to other
2198 mixmaster remailers. For details on the other capabilities, please
2199 have a look at the mixmaster documentation.
2214 <sect1 id="forwarding-mail">
2215 <title>Forwarding and Bouncing Mail </title>
2218 Often, it is necessary to forward mails to other people.
2219 Therefore, mutt-ng supports forwarding messages in two different
2224 The first one is regular forwarding, as you probably know it from
2225 other mail clients. You simply press <literal>f</literal>, enter the
2227 email address, the subject of the forwarded email, and then you can
2228 edit the message to be forwarded in the editor. The forwarded
2229 message is separated from the rest of the message via the two
2236 ----- Forwarded message from Lucas User <luser@example.com> -----
2238 From: Lucas User <luser@example.com>
2239 Date: Thu, 02 Dec 2004 03:08:34 +0100
2240 To: Michael Random <mrandom@example.com>
2241 Subject: Re: blackmail
2243 Pay me EUR 50,000.- cash or your favorite stuffed animal will die
2246 ----- End forwarded message -----</screen>
2251 When you're done with editing the mail, save and quit the editor,
2252 and you will return to the compose menu, the same menu you also
2253 encounter when composing or replying to mails.
2257 The second mode of forwarding emails with mutt-ng is the
2258 so-called <emphasis>bouncing</emphasis>: when you bounce an email to
2260 address, it will be sent in practically the same format you send it
2261 (except for headers that are created during transporting the
2262 message). To bounce a message, press <literal>b</literal> and enter the
2264 email address. By default, you are then asked whether you really
2265 want to bounce the message to the specified recipient. If you answer
2266 with yes, the message will then be bounced.
2270 To the recipient, the bounced email will look as if he got it
2271 like a regular email where he was <literal>Bcc:</literal> recipient.
2273 possibility to find out whether it was a bounced email is to
2274 carefully study the email headers and to find out which host really
2284 <sect1 id="postponing-mail">
2285 <title>Postponing Mail </title>
2288 At times it is desirable to delay sending a message that you have
2289 already begun to compose. When the <emphasis>postpone-message</emphasis> function is
2290 used in the <emphasis>compose</emphasis> menu, the body of your message
2292 are stored in the mailbox specified by the <link linkend="postponed">
2295 variable. This means that you can recall the
2296 message even if you exit Mutt-ng and then restart it at a later time.
2300 Once a message is postponed, there are several ways to resume it. From
2302 command line you can use the ``-p'' option, or if you <emphasis>compose</emphasis> a new
2303 message from the <emphasis>index</emphasis> or <emphasis>pager</emphasis> you will be prompted if postponed
2304 messages exist. If multiple messages are currently postponed, the
2305 <emphasis>postponed</emphasis> menu will pop up and you can select
2306 which message you would
2311 <emphasis role="bold">Note:</emphasis> If you postpone a reply to a
2312 message, the reply setting of
2313 the message is only updated when you actually finish the message and
2314 send it. Also, you must be in the same folder with the message you
2315 replied to for the status of the message to be updated.
2319 See also the <link linkend="postpone">postpone</link> quad-option.
2335 <title>Configuration </title>
2338 <title>Locations of Configuration Files </title>
2341 While the default configuration (or ``preferences'') make Mutt-ng
2343 of the box, it is often desirable to tailor Mutt-ng to suit your own
2345 Mutt-ng is first invoked, it will attempt to read the ``system''
2347 file (defaults set by your local system administrator), unless the
2348 ``-n'' <link linkend="commandline">commandline</link> option is
2349 specified. This file is
2350 typically <literal>/usr/local/share/muttng/Muttngrc</literal> or <literal>
2354 Mutt-ng users will find this file in <literal>
2355 /usr/local/share/muttng/Muttrc
2358 <literal>/etc/Muttngrc</literal>. Mutt will next look for a file named <literal>
2361 in your home directory, Mutt-ng will look for <literal>.muttngrc</literal>. If this file
2362 does not exist and your home directory has a subdirectory named <literal>
2366 mutt try to load a file named <literal>.muttng/muttngrc</literal>.
2370 <literal>.muttrc</literal> (or <literal>.muttngrc</literal> for
2371 Mutt-ng) is the file where you will
2372 usually place your <link linkend="commands">commands</link> to
2382 <sect1 id="muttrc-syntax">
2383 <title>Basic Syntax of Initialization Files </title>
2386 An initialization file consists of a series of <link linkend="commands">
2389 .Each line of the file may contain one or more commands.
2390 When multiple commands are used, they must be separated by a semicolon
2394 set realname='Mutt-ng user' ; ignore x-</screen>
2396 The hash mark, or pound sign
2397 (``#''), is used as a ``comment'' character. You can use it to
2398 annotate your initialization file. All text after the comment character
2399 to the end of the line is ignored. For example,
2405 my_hdr X-Disclaimer: Why are you listening to me? # This is a comment</screen>
2410 Single quotes (') and double quotes (") can be used to quote
2412 which contain spaces or other special characters. The difference
2414 the two types of quotes is similar to that of many popular shell
2416 namely that a single quote is used to specify a literal string (one
2418 not interpreted for shell variables or quoting with a backslash
2420 next paragraph]), while double quotes indicate a string for which
2421 should be evaluated. For example, backtics are evaluated inside of
2423 quotes, but <emphasis role="bold">not</emphasis> for single quotes.
2427 \ quotes the next character, just as in shells such as bash and
2429 For example, if want to put quotes ``"'' inside of a string, you
2431 ``\'' to force the next character to be a literal instead of
2436 set realname="Michael \"MuttDude\" Elkins"</screen>
2441 ``\\'' means to insert a literal ``\'' into the line.
2442 ``\n'' and ``\r'' have their usual C meanings of linefeed and
2443 carriage-return, respectively.
2447 A \ at the end of a line can be used to split commands over
2448 multiple lines, provided that the split points don't appear in the
2449 middle of command names.
2453 Please note that, unlike the various shells, mutt-ng interprets a
2455 at the end of a line also in comments. This allows you to disable a
2457 split over multiple lines with only one ``#''.
2464 set realname="Michael \"MuttDude\" Elkins"</screen>
2469 When testing your config files, beware the following caveat. The
2471 at the end of the commented line extends the current line with the next
2473 - then referred to as a ``continuation line''. As the first line is
2474 commented with a hash (#) all following continuation lines are also
2475 part of a comment and therefore are ignored, too. So take care of
2477 when continuation lines are involved within your setup files!
2496 line1 ``continues'' until line4. however, the part after the # is a
2497 comment which includes line3 and line4. line5 is a new line of its own
2499 thus is interpreted again.
2503 The commands understood by mutt are explained in the next paragraphs.
2504 For a complete list, see the <link linkend="commands">commands</link>.
2514 <title>Expansion within variables </title>
2517 Besides just assign static content to variables, there's plenty of
2518 ways of adding external and more or less dynamic content.
2522 <title>Commands' Output </title>
2525 It is possible to substitute the output of a Unix command in an
2526 initialization file. This is accomplished by enclosing the command
2527 in backquotes (``) as in, for example:
2533 my_hdr X-Operating-System: `uname -a`</screen>
2538 The output of the Unix command ``uname -a'' will be substituted
2539 before the line is parsed. Note that since initialization files are
2540 line oriented, only the first line of output from the Unix command
2541 will be substituted.
2547 <title>Environment Variables </title>
2550 UNIX environments can be accessed like the way it is done in
2551 shells like sh and bash: Prepend the name of the environment by a
2552 ``$'' sign. For example,
2558 set record=+sent_on_$HOSTNAME</screen>
2563 sets the <link linkend="record">record</link> variable to the
2564 string <emphasis>+sent_on_</emphasis> and appends the
2565 value of the evironment
2566 variable <literal>$HOSTNAME</literal>.
2570 <emphasis role="bold">Note:</emphasis> There will be no warning if an
2571 environment variable
2572 is not defined. The result will of the expansion will then be empty.
2578 <title>Configuration Variables </title>
2581 As for environment variables, the values of all configuration
2582 variables as string can be used in the same way, too. For example,
2588 set imap_home_namespace = $folder</screen>
2593 would set the value of <link linkend="imap-home-namespace">
2597 which <link linkend="folder">folder</link> is <emphasis>currently</emphasis> set
2602 <emphasis role="bold">Note:</emphasis> There're no logical links
2603 established in such cases so
2604 that the the value for <link linkend="imap-home-namespace">
2608 if <link linkend="folder">folder</link> gets changed.
2612 <emphasis role="bold">Note:</emphasis> There will be no warning if a
2613 configuration variable
2614 is not defined or is empty. The result will of the expansion will
2621 <title>Self-Defined Variables </title>
2624 Mutt-ng flexibly allows users to define their own variables. To
2625 avoid conflicts with the standard set and to prevent misleading
2626 error messages, there's a reserved namespace for them: all
2627 user-defined variables must be prefixed with <literal>user_</literal> and can be
2628 used just like any ordinary configuration or environment
2633 For example, to view the manual, users can either define two
2634 macros like the following
2640 macro generic <F1> "!less -r /path/to/manual" "Show manual"
2641 macro pager <F1> "!less -r /path/to/manual" "Show manual"</screen>
2646 for <literal>generic</literal>, <literal>pager</literal> and <literal>
2649 .The alternative is to
2650 define a custom variable like so:
2656 set user_manualcmd = "!less -r /path/to_manual"
2657 macro generic <F1> "$user_manualcmd<enter>" "Show manual"
2658 macro pager <F1> "$user_manualcmd<enter>" "Show manual"
2659 macro index <F1> "$user_manualcmd<enter>" "Show manual"</screen>
2664 to re-use the command sequence as in:
2670 macro index <F2> "$user_manualcmd | grep '\^[ ]\\+~. '" "Show Patterns"</screen>
2675 Using this feature, arbitrary sequences can be defined once and
2676 recalled and reused where necessary. More advanced scenarios could
2677 include to save a variable's value at the beginning of macro
2678 sequence and restore it at end.
2682 When the variable is first defined, the first value it gets
2683 assigned is also the initial value to which it can be reset using
2684 the <literal>reset</literal> command.
2688 The complete removal is done via the <literal>unset</literal>
2693 After the following sequence:
2700 set user_foo = 666</screen>
2705 the variable <literal>$user_foo</literal> has a current value
2707 initial of 42. The query
2713 set ?user_foo</screen>
2718 will show 666. After doing the reset via
2724 reset user_foo</screen>
2729 a following query will give 42 as the result. After unsetting it
2736 unset user_foo</screen>
2741 any query or operation (except the noted expansion within other
2742 statements) will lead to an error message.
2748 <title>Pre-Defined Variables </title>
2751 In order to allow users to share one setup over a number of
2752 different machines without having to change its contents, there's a
2753 number of pre-defined variables. These are prefixed with
2754 <literal>muttng_</literal> and are read-only, i.e. they cannot
2756 reset. The reference chapter lists all available variables.
2760 <emphasis> Please consult the local copy of your manual for their
2761 values as they may differ from different manual sources.
2764 the manual is installed in can be queried (already using such a
2765 variable) by running:
2771 muttng -Q muttng_docdir</screen>
2776 To extend the example for viewing the manual via self-defined
2777 variables, it can be made more readable and more portable by
2778 changing the real path in:
2784 set user_manualcmd = '!less -r /path/to_manual'</screen>
2795 set user_manualcmd = "!less -r $muttng_docdir/manual.txt"</screen>
2800 which works everywhere if a manual is installed.
2804 Please note that by the type of quoting, muttng determines when
2805 to expand these values: when it finds double quotes, the value will
2806 be expanded during reading the setup files but when it finds single
2807 quotes, it'll expand it at runtime as needed.
2811 For example, the statement
2817 folder-hook . "set user_current_folder = $muttng_folder_name"</screen>
2822 will be already be translated to the following when reading the
2829 folder-hook . "set user_current_folder = some_folder"</screen>
2834 with <literal>some_folder</literal> being the name of the
2836 opens. On the contrary,
2842 folder-hook . 'set user_current_folder = $muttng_folder_name'</screen>
2847 will be executed at runtime because of the single quotes so that
2848 <literal>user_current_folder</literal> will always have
2849 the value of the currently
2854 A more practical example is:
2860 folder-hook . 'source ~/.mutt/score-$muttng_folder_name'</screen>
2865 which can be used to source files containing score commands
2866 depending on the folder the user enters.
2872 <title>Type Conversions </title>
2875 A note about variable's types during conversion: internally
2876 values are stored in internal types but for any dump/query or set
2877 operation they're converted to and from string. That means that
2878 there's no need to worry about types when referencing any variable.
2879 As an example, the following can be used without harm (besides
2880 makeing muttng very likely behave strange):
2887 set folder = $read_inc
2888 set read_inc = $folder
2889 set user_magic_number = 42
2890 set folder = $user_magic_number</screen>
2899 <title>Defining/Using aliases </title>
2903 Usage: <literal>alias</literal> <emphasis>key</emphasis> <emphasis>address</emphasis>[ , <emphasis>address</emphasis>, ... ]
2908 It's usually very cumbersome to remember or type out the address of
2910 you are communicating with. Mutt-ng allows you to create ``aliases''
2912 a short string to a full address.
2916 <emphasis role="bold">Note:</emphasis> if you want to create an alias
2917 for a group (by specifying more than
2918 one address), you <emphasis role="bold">must</emphasis> separate the
2919 addresses with a comma (``,'').
2923 To remove an alias or aliases (``*'' means all aliases):
2927 <literal>unalias</literal> [ * | <emphasis>key</emphasis> <emphasis>
2936 alias muttdude me@cs.hmc.edu (Michael Elkins)
2937 alias theguys manny, moe, jack</screen>
2942 Unlike other mailers, Mutt-ng doesn't require aliases to be defined
2943 in a special file. The <literal>alias</literal> command can appear
2945 a configuration file, as long as this file is <link linkend="source">
2948 .Consequently, you can have multiple alias files, or
2949 you can have all aliases defined in your muttrc.
2953 On the other hand, the <link linkend="create-alias">create-alias</link>
2954 function can use only one file, the one pointed to by the <link linkend="alias-file">
2958 <literal>˜/.muttrc</literal> by default). This file is not
2960 in the sense that Mutt-ng will happily append aliases to any file, but
2962 order for the new aliases to take effect you need to explicitly <link linkend="source">
2975 source /usr/local/share/Mutt-ng.aliases
2976 source ~/.mail_aliases
2977 set alias_file=~/.mail_aliases</screen>
2982 To use aliases, you merely use the alias at any place in mutt where
2983 muttprompts for addresses, such as the <emphasis>To:</emphasis> or <emphasis>
2987 also enter aliases in your editor at the appropriate headers if you
2989 <link linkend="edit-headers">edit-headers</link> variable set.
2993 In addition, at the various address prompts, you can use the tab
2995 to expand a partial alias to the full alias. If there are multiple
2997 mutt will bring up a menu with the matching aliases. In order to be
2998 presented with the full list of aliases, you must hit tab with out a
3000 alias, such as at the beginning of the prompt or after a comma denoting
3005 In the alias menu, you can select as many aliases as you want with the
3006 <emphasis>select-entry</emphasis> key (default: RET), and use the <emphasis>
3010 (default: q) to return to the address prompt.
3020 <title>Changing the default key bindings </title>
3024 Usage: <literal>bind</literal> <emphasis>map</emphasis> <emphasis>key</emphasis> <emphasis>function</emphasis>
3029 This command allows you to change the default key bindings (operation
3030 invoked when pressing a key).
3034 <emphasis>map</emphasis> specifies in which menu the binding belongs.
3036 be specified by separating them with commas (no additional whitespace
3037 isallowed). The currently defined maps are:
3045 <term>generic</term>
3048 This is not a real menu, but is used as a fallback for all of
3050 menus except for the pager and editor modes. If a key is not
3052 another menu, Mutt-ng will look for a binding to use in this
3054 you to bind a key to a certain function in multiple menus
3056 multiple bind statements to accomplish the same task.
3064 The alias menu is the list of your personal aliases as defined
3066 muttrc. It is the mapping from a short alias name to the full
3068 address(es) of the recipient(s).
3076 The attachment menu is used to access the attachments on
3082 <term>browser</term>
3085 The browser is used for both browsing the local directory
3087 listing all of your incoming mailboxes.
3095 The editor is the line-based editor the user enters text data.
3103 The index is the list of messages contained in a mailbox.
3108 <term>compose</term>
3111 The compose menu is the screen used when sending a new message.
3119 The pager is the mode used to display message/attachment data,
3129 The pgp menu is used to select the OpenPGP keys used for
3136 <term>postpone</term>
3139 The postpone menu is similar to the index menu, except is used
3141 recalling a message the user was composing, but saved until
3150 <emphasis>key</emphasis> is the key (or key sequence) you wish to bind.
3152 control character, use the sequence <emphasis>\Cx</emphasis>,
3153 where <emphasis>x</emphasis> is the
3154 letter of the control character (for example, to specify control-A use
3155 ``\Ca''). Note that the case of <emphasis>x</emphasis> as well as
3156 <emphasis>\C</emphasis> is
3157 ignored, so that <emphasis>\CA</emphasis>, <emphasis>\Ca</emphasis>, <emphasis>
3160 and <emphasis>\ca</emphasis> are all
3161 equivalent. An alternative form is to specify the key as a three digit
3162 octal number prefixed with a ``\'' (for example <emphasis>
3166 equivalent to <emphasis>\c?</emphasis>).
3170 In addition, <emphasis>key</emphasis> may consist of:
3176 <title>Alternative Key Names</title>
3177 <tgroup cols="2" align="left" colsep="1" rowsep="1">
3180 <entry>Sequence</entry>
3181 <entry>Description</entry>
3185 <row><entry><literal>\t </literal></entry><entry>tab</entry></row>
3186 <row><entry><literal><tab> </literal></entry><entry>tab</entry></row>
3187 <row><entry><literal><backtab> </literal></entry><entry>backtab / shift-tab</entry></row>
3188 <row><entry><literal>\r </literal></entry><entry>carriage return</entry></row>
3189 <row><entry><literal>\n </literal></entry><entry>newline</entry></row>
3190 <row><entry><literal>\e </literal></entry><entry>escape</entry></row>
3191 <row><entry><literal><esc> </literal></entry><entry>escape</entry></row>
3192 <row><entry><literal><up> </literal></entry><entry>up arrow</entry></row>
3193 <row><entry><literal><down> </literal></entry><entry>down arrow</entry></row>
3194 <row><entry><literal><left> </literal></entry><entry>left arrow</entry></row>
3195 <row><entry><literal><right> </literal></entry><entry>right arrow</entry></row>
3196 <row><entry><literal><pageup> </literal></entry><entry>Page Up</entry></row>
3197 <row><entry><literal><pagedown> </literal></entry><entry>Page Down</entry></row>
3198 <row><entry><literal><backspace> </literal></entry><entry>Backspace</entry></row>
3199 <row><entry><literal><delete> </literal></entry><entry>Delete</entry></row>
3200 <row><entry><literal><insert> </literal></entry><entry>Insert</entry></row>
3201 <row><entry><literal><enter> </literal></entry><entry>Enter</entry></row>
3202 <row><entry><literal><return> </literal></entry><entry>Return</entry></row>
3203 <row><entry><literal><home> </literal></entry><entry>Home</entry></row>
3204 <row><entry><literal><end> </literal></entry><entry>End</entry></row>
3205 <row><entry><literal><space> </literal></entry><entry>Space bar</entry></row>
3206 <row><entry><literal><f1> </literal></entry><entry>function key 1</entry></row>
3207 <row><entry><literal><f10> </literal></entry><entry>function key 10</entry></row>
3215 <emphasis>key</emphasis> does not need to be enclosed in quotes unless
3221 <emphasis>function</emphasis> specifies which action to take when <emphasis>
3225 For a complete list of functions, see the <link linkend="functions">
3228 .The special function <literal>noop</literal> unbinds the specified key
3238 <sect1 id="charset-hook">
3239 <title>Defining aliases for character sets </title>
3243 Usage: <literal>charset-hook</literal> <emphasis>alias</emphasis> <emphasis> charset</emphasis>
3244 Usage: <literal>iconv-hook</literal> <emphasis>charset</emphasis> <emphasis> local-charset </emphasis>
3249 The <literal>charset-hook</literal> command defines an alias for a
3251 This is useful to properly display messages which are tagged with a
3252 character set name not known to mutt.
3256 The <literal>iconv-hook</literal> command defines a system-specific
3258 character set. This is helpful when your systems character
3259 conversion library insists on using strange, system-specific names
3269 <sect1 id="folder-hook">
3270 <title>Setting variables based upon mailbox </title>
3274 Usage: <literal>folder-hook</literal> [!]<emphasis>regexp</emphasis> <emphasis>command</emphasis>
3280 It is often desirable to change settings based on which mailbox you are
3281 reading. The folder-hook command provides a method by which you can
3283 any configuration command. <emphasis>regexp</emphasis> is a regular
3284 expression specifying
3285 in which mailboxes to execute <emphasis>command</emphasis> before
3286 loading. If a mailbox
3287 matches multiple folder-hook's, they are executed in the order given in
3293 <emphasis role="bold">Note:</emphasis> if you use the ``!'' shortcut
3294 for <link linkend="spoolfile">spoolfile</link> at the beginning of the
3295 pattern, you must place it
3296 inside of double or single quotes in order to distinguish it from the
3297 logical <emphasis>not</emphasis> operator for the expression.
3301 Note that the settings are <emphasis>not</emphasis> restored when you
3303 For example, a command action to perform is to change the sorting
3304 methodbased upon the mailbox being read:
3310 folder-hook mutt set sort=threads</screen>
3315 However, the sorting method is not restored to its previous value when
3316 reading a different mailbox. To specify a <emphasis>default</emphasis>
3324 folder-hook . set sort=date-sent</screen>
3335 <title>Keyboard macros </title>
3339 Usage: <literal>macro</literal> <emphasis>menu</emphasis> <emphasis>key</emphasis> <emphasis>sequence</emphasis> [ <emphasis>description</emphasis> ]
3344 Macros are useful when you would like a single key to perform a series
3346 actions. When you press <emphasis>key</emphasis> in menu <emphasis>
3349 ,Mutt-ng will behave as if
3350 you had typed <emphasis>sequence</emphasis>. So if you have a common
3351 sequence of commands
3352 you type, you can create a macro to execute those commands with a
3357 <emphasis>menu</emphasis> is the <link linkend="maps">maps</link> which
3358 the macro will be bound.
3359 Multiple maps may be specified by separating multiple menu arguments by
3360 commas. Whitespace may not be used in between the menu arguments and
3361 thecommas separating them.
3365 <emphasis>key</emphasis> and <emphasis>sequence</emphasis> are expanded
3366 by the same rules as the <link linkend="bind">bind</link>. There are
3367 some additions however. The
3368 first is that control characters in <emphasis>sequence</emphasis> can
3370 as <emphasis>ˆx</emphasis>. In order to get a caret (`ˆ'')
3372 <emphasis>ˆˆ</emphasis>. Secondly, to specify a certain key
3373 such as <emphasis>up</emphasis>
3374 or to invoke a function directly, you can use the format
3375 <emphasis><key name></emphasis> and <emphasis><function
3378 .For a listing of key
3379 names see the section on <link linkend="bind">bind</link>. Functions
3380 are listed in the <link linkend="functions">functions</link>.
3384 The advantage with using function names directly is that the macros
3385 willwork regardless of the current key bindings, so they are not
3387 the user having particular key definitions. This makes them more
3388 robustand portable, and also facilitates defining of macros in files
3390 than one user (eg. the system Muttngrc).
3394 Optionally you can specify a descriptive text after <emphasis>sequence</emphasis>,
3395 which is shown in the help screens.
3399 <emphasis role="bold">Note:</emphasis> Macro definitions (if any)
3400 listed in the help screen(s), are
3401 silently truncated at the screen width, and are not wrapped.
3411 <title>Using color and mono video attributes </title>
3415 Usage: <literal>color</literal> <emphasis>object</emphasis> <emphasis>foreground</emphasis><emphasis>background</emphasis> [ <emphasis>regexp</emphasis>]
3416 Usage: <literal>color</literal> index <emphasis>foreground</emphasis> <emphasis>background</emphasis><emphasis>pattern</emphasis>
3417 Usage: <literal>uncolor</literal> index <emphasis>pattern</emphasis>[ <emphasis>pattern</emphasis> ... ]
3422 If your terminal supports color, you can spice up Mutt-ng by creating
3424 color scheme. To define the color of an object (type of information),
3426 must specify both a foreground color <emphasis role="bold">and</emphasis> a background color (it is not
3427 possible to only specify one or the other).
3431 <emphasis>object</emphasis> can be one of:
3446 body (match <emphasis>regexp</emphasis> in the body of messages)
3452 bold (highlighting bold patterns in the body of messages)
3458 error (error messages printed by Mutt-ng)
3464 header (match <emphasis>regexp</emphasis> in the message header)
3470 hdrdefault (default color of the message header in the pager)
3476 index (match <emphasis>pattern</emphasis> in the message index)
3482 indicator (arrow or bar used to indicate the current item in a
3489 markers (the ``+'' markers at the beginning of wrapped lines in
3496 message (informational messages)
3508 quoted (text matching <link linkend="quote-regexp">quote-regexp</link> in the body of a message)
3514 quoted1, quoted2, ..., quoted<emphasis role="bold">N</emphasis>
3515 (higher levels of quoting)
3521 search (highlighting of words in the pager)
3533 status (mode lines used to display info about the mailbox or
3540 tilde (the ``˜'' used to pad blank lines in the pager)
3546 tree (thread tree drawn in the message index and attachment menu)
3552 underline (highlighting underlined patterns in the body of
3562 <emphasis>foreground</emphasis> and <emphasis>background</emphasis> can
3563 be one of the following:
3626 color<emphasis>x</emphasis>
3635 <emphasis>foreground</emphasis> can optionally be prefixed with the
3636 keyword <literal>bright</literal> to make
3637 the foreground color boldfaced (e.g., <literal>brightred</literal>).
3641 If your terminal supports it, the special keyword <emphasis>default</emphasis> can be
3642 used as a transparent color. The value <emphasis>brightdefault</emphasis> is also valid.
3643 If Mutt-ng is linked against the <emphasis>S-Lang</emphasis> library,
3644 you also need to set
3645 the <emphasis>COLORFGBG</emphasis> environment variable to the default
3647 terminal for this to work; for example (for Bourne-like shells):
3653 set COLORFGBG="green;black"
3654 export COLORFGBG</screen>
3659 <emphasis role="bold">Note:</emphasis> The <emphasis>S-Lang</emphasis>
3660 library requires you to use the <emphasis>lightgray</emphasis>
3661 and <emphasis>brown</emphasis> keywords instead of <emphasis>white</emphasis> and <emphasis>
3665 setting this variable.
3669 <emphasis role="bold">Note:</emphasis> The uncolor command can be
3670 applied to the index object only. It
3671 removes entries from the list. You <emphasis role="bold">must</emphasis> specify the same pattern
3672 specified in the color command for it to be removed. The pattern ``*''
3674 a special token which means to clear the color index list of all
3679 Mutt-ng also recognizes the keywords <emphasis>color0</emphasis>, <emphasis>
3683 <emphasis>color</emphasis><emphasis role="bold">N-1</emphasis> (<emphasis role="bold">
3686 being the number of colors supported
3687 by your terminal). This is useful when you remap the colors for your
3688 display (for example by changing the color associated with <emphasis>
3691 for your xterm), since color names may then lose their normal meaning.
3695 If your terminal does not support color, it is still possible change
3697 attributes through the use of the ``mono'' command:
3702 Usage: <literal>mono</literal> <emphasis><object> <attribute></emphasis>[ <emphasis>regexp</emphasis> ]
3703 Usage: <literal>mono</literal> index <emphasis>attribute</emphasis> <emphasis>pattern</emphasis>
3704 Usage: <literal>unmono</literal> index <emphasis>pattern</emphasis>[ <emphasis>pattern</emphasis> ... ]
3709 where <emphasis>attribute</emphasis> is one of the following:
3757 <title>Ignoring (weeding) unwanted message headers </title>
3761 Usage: <literal>[un]ignore</literal> <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis>... ]
3766 Messages often have many header fields added by automatic processing
3768 or which may not seem useful to display on the screen. This command
3770 you to specify header fields which you don't normally want to see.
3774 You do not need to specify the full header field name. For example,
3775 ``ignore content-'' will ignore all header fields that begin with the
3777 ``content-''. ``ignore *'' will ignore all headers.
3781 To remove a previously added token from the list, use the ``unignore''
3783 The ``unignore'' command will make Mutt-ng display headers with the
3785 For example, if you do ``ignore x-'' it is possible to ``unignore
3790 ``unignore *'' will remove all tokens from the ignore list.
3797 # Sven's draconian header weeding
3799 unignore from date subject to cc
3800 unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
3801 unignore posted-to:</screen>
3811 <sect1 id="alternates">
3812 <title>Alternative addresses </title>
3815 Usage: <literal>[un]alternates</literal> <emphasis>regexp</emphasis> [ <emphasis>
3823 With various functions, mutt will treat messages differently,
3824 depending on whether you sent them or whether you received them from
3825 someone else. For instance, when replying to a message that you
3826 sent to a different party, mutt will automatically suggest to send
3827 the response to the original message's recipients -- responding to
3828 yourself won't make much sense in many cases. (See <link linkend="reply-to">
3835 Many users receive e-mail under a number of different addresses. To
3836 fully use mutt's features here, the program must be able to
3837 recognize what e-mail addresses you receive mail under. That's the
3838 purpose of the <literal>alternates</literal> command: It takes a list
3840 expressions, each of which can identify an address under which you
3845 The <literal>unalternates</literal> command can be used to write
3847 <literal>alternates</literal> patterns. If an address matches something
3849 <literal>alternates</literal> command, but you nonetheless do not think
3851 from you, you can list a more precise pattern under an <literal>
3858 To remove a regular expression from the <literal>alternates</literal>
3860 <literal>unalternates</literal> command with exactly the same <emphasis>
3864 Likewise, if the <emphasis>regexp</emphasis> for a <literal>alternates</literal> command matches
3865 an entry on the <literal>unalternates</literal> list, that <literal>
3868 entry will be removed. If the <emphasis>regexp</emphasis> for <literal>
3871 is ``*'', <emphasis>all entries</emphasis> on <literal>alternates</literal> will be removed.
3881 <title>Format = Flowed </title>
3884 <title>Introduction </title>
3887 Mutt-ng contains support for so-called <literal>format=flowed</literal> messages.
3888 In the beginning of email, each message had a fixed line width, and
3889 it was enough for displaying them on fixed-size terminals. But times
3890 changed, and nowadays hardly anybody still uses fixed-size terminals:
3891 more people nowaydays use graphical user interfaces, with dynamically
3892 resizable windows. This led to the demand of a new email format that
3893 makes it possible for the email client to make the email look nice
3894 in a resizable window without breaking quoting levels and creating
3895 an incompatible email format that can also be displayed nicely on
3896 old fixed-size terminals.
3900 For introductory information on <literal>format=flowed</literal>
3902 <ulink URL="http://www.joeclark.org/ffaq.html"><http://www.joeclark.org/ffaq.html></ulink>.
3908 <title>Receiving: Display Setup </title>
3911 When you receive emails that are marked as <literal>format=flowed</literal>
3912 messages, and is formatted correctly, mutt-ng will try to reformat
3913 the message to optimally fit on your terminal. If you want a fixed
3914 margin on the right side of your terminal, you can set the
3921 set wrapmargin = 10</screen>
3926 The code above makes the line break 10 columns before the right
3927 side of the terminal.
3931 If your terminal is so wide that the lines are embarrassingly long,
3932 you can also set a maximum line length:
3938 set max_line_length = 120</screen>
3943 The example above will give you lines not longer than 120
3948 When you view at <literal>format=flowed</literal> messages, you will
3950 the quoting hierarchy like in the following example:
3956 >Bill, can you please send last month's progress report to Mr.
3957 >Morgan? We also urgently need the cost estimation for the new
3958 >production server that we want to set up before our customer's
3959 >project will go live.</screen>
3964 This obviously doesn't look very nice, and it makes it very
3965 hard to differentiate between text and quoting character. The
3966 solution is to configure mutt-ng to "stuff" the quoting:
3972 set stuff_quoted</screen>
3977 This will lead to a nicer result that is easier to read:
3983 > Bill, can you please send last month's progress report to Mr.
3984 > Morgan? We also urgently need the cost estimation for the new
3985 > production server that we want to set up before our customer's
3986 > project will go live.</screen>
3993 <title>Sending </title>
3996 If you want mutt-ng to send emails with <literal>format=flowed</literal> set, you
3997 need to explicitly set it:
4003 set text_flowed</screen>
4008 Additionally, you have to use an editor which supports writing
4009 <literal>format=flowed</literal>-conforming emails. For vim, this is
4011 adding <literal>w</literal> to the formatoptions (see <literal>:h
4015 <literal>:h fo-table</literal>) when writing emails.
4019 Also note that <emphasis>format=flowed</emphasis> knows about
4021 that is, when sending messages, some kinds of lines have to be
4022 indented with a single space on the sending side. On the receiving
4023 side, the first space (if any) is removed. As a consequence and in
4024 addition to the above simple setting, please keep this in mind when
4025 making manual formattings within the editor. Also note that mutt-ng
4026 currently violates the standard (RfC 3676) as it does not
4027 space-stuff lines starting with:
4036 <literal>></literal> This is <emphasis>not</emphasis> the
4037 quote character but a right
4038 angle used for other reasons
4045 <literal>From</literal> with a trailing space.
4052 just a space for formatting reasons
4062 Please make sure that you manually prepend a space to each of them.
4068 <title>Additional Notes</title>
4071 For completeness, the <link linkend="delete-space">delete-space</link> variable provides the mechanism
4072 to generate a <literal>DelSp=yes</literal> parameter on <emphasis>
4076 According to the standard, clients receiving a <literal>format=flowed</literal>
4077 messages should delete the last space of a flowed line but still
4078 interpret the line as flowed. Because flowed lines usually contain
4079 only one space at the end, this parameter would make the receiving
4080 client concatenate the last word of the previous with the first of
4081 the current line <emphasis>without</emphasis> a space. This makes
4083 unreadable and is intended for languages rarely using spaces. So
4084 please use this setting only if you're sure what you're doing.
4096 <title>Mailing lists </title>
4100 Usage: <literal>[un]lists</literal> <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis>... ]
4101 Usage: <literal>[un]subscribe</literal> <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis>... ]
4106 Mutt-ng has a few nice features for <link linkend="using-lists">
4109 .In order to take advantage of them, you must
4110 specify which addresses belong to mailing lists, and which mailing
4111 lists you are subscribed to. Once you have done this, the <link linkend="func-list-reply">
4114 function will work for all known lists.
4115 Additionally, when you send a message to a subscribed list, mutt will
4116 add a Mail-Followup-To header to tell other users' mail user agents
4117 not to send copies of replies to your personal address. Note that
4118 the Mail-Followup-To header is a non-standard extension which is not
4119 supported by all mail user agents. Adding it is not bullet-proof
4121 receiving personal CCs of list messages. Also note that the generation
4122 of the Mail-Followup-To header is controlled by the <link linkend="followup-to">
4125 configuration variable.
4129 More precisely, Mutt-ng maintains lists of patterns for the addresses
4130 of known and subscribed mailing lists. Every subscribed mailing
4131 list is known. To mark a mailing list as known, use the ``lists''
4132 command. To mark it as subscribed, use ``subscribe''.
4136 You can use regular expressions with both commands. To mark all
4137 messages sent to a specific bug report's address on mutt's bug
4138 tracking system as list mail, for instance, you could say
4139 ``subscribe [0-9]*@bugs.guug.de''. Often, it's sufficient to just
4140 give a portion of the list's e-mail address.
4144 Specify as much of the address as you need to to remove ambiguity. For
4145 example, if you've subscribed to the Mutt-ng mailing list, you will
4147 addressed to <emphasis>mutt-users@mutt.org</emphasis>. So, to tell
4148 Mutt-ng that this is a
4149 mailing list, you could add ``lists mutt-users'' to your
4150 initialization file. To tell mutt that you are subscribed to it,
4151 add ``subscribe mutt-users'' to your initialization file instead.
4152 If you also happen to get mail from someone whose address is
4153 <emphasis>mutt-users@example.com</emphasis>, you could use ``lists
4154 mutt-users@mutt\\.org''
4155 or ``subscribe mutt-users@mutt\\.org'' to
4156 match only mail from the actual list.
4160 The ``unlists'' command is used to remove a token from the list of
4161 known and subscribed mailing-lists. Use ``unlists *'' to remove all
4166 To remove a mailing list from the list of subscribed mailing lists,
4167 but keep it on the list of known mailing lists, use ``unsubscribe''.
4176 <sect1 id="mbox-hook">
4177 <title>Using Multiple spool mailboxes </title>
4181 Usage: <literal>mbox-hook</literal> [!]<emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
4186 This command is used to move read messages from a specified mailbox to
4187 adifferent mailbox automatically when you quit or change folders.
4188 <emphasis>pattern</emphasis> is a regular expression specifying the
4189 mailbox to treat as a
4190 ``spool'' mailbox and <emphasis>mailbox</emphasis> specifies where mail
4191 should be saved when
4196 Unlike some of the other <emphasis>hook</emphasis> commands, only the <emphasis>
4200 pattern is used (it is not possible to save read mail in more than a
4211 <sect1 id="mailboxes">
4212 <title>Defining mailboxes which receive mail </title>
4216 Usage: <literal>[un]mailboxes</literal> [!]<emphasis>filename</emphasis>[ <emphasis>filename</emphasis> ... ]
4221 This command specifies folders which can receive mail and
4222 which will be checked for new messages. By default, the
4223 main menu status bar displays how many of these folders have
4228 When changing folders, pressing <emphasis>space</emphasis> will cycle
4229 through folders with new mail.
4233 Pressing TAB in the directory browser will bring up a menu showing the
4235 specified by the <literal>mailboxes</literal> command, and indicate
4237 messages. Mutt-ng will automatically enter this mode when invoked from
4239 command line with the <literal>-y</literal> option.
4243 The ``unmailboxes'' command is used to remove a token from the list
4244 of folders which receive mail. Use ``unmailboxes *'' to remove all
4249 <emphasis role="bold">Note:</emphasis> new mail is detected by
4250 comparing the last modification time to
4251 the last access time. Utilities like <literal>biff</literal> or <literal>
4255 program which accesses the mailbox might cause Mutt-ng to never detect
4257 for that mailbox if they do not properly reset the access time. Backup
4258 tools are another common reason for updated access times.
4262 <emphasis role="bold">Note:</emphasis> the filenames in the <literal>
4265 command are resolved when
4266 the command is executed, so if these names contain <link linkend="shortcuts">
4269 (such as ``='' and ``!''), any variable
4270 definition that affect these characters (like <link linkend="folder">
4273 and <link linkend="spoolfile">spoolfile</link>)
4274 should be executed before the <literal>mailboxes</literal> command.
4284 <title>User defined headers </title>
4288 Usage: <literal>my_hdr</literal> <emphasis>string</emphasis>
4289 Usage: <literal>unmy_hdr</literal> <emphasis>field</emphasis> [ <emphasis>field</emphasis>... ]
4294 The ``my_hdr'' command allows you to create your own header
4295 fields which will be added to every message you send.
4299 For example, if you would like to add an ``Organization:'' header field
4301 all of your outgoing messages, you can put the command
4306 my_hdr Organization: A Really Big Company, Anytown, USA</screen>
4310 in your <literal>.muttrc</literal>.
4314 <emphasis role="bold">Note:</emphasis> space characters are <emphasis>
4317 allowed between the keyword and
4318 the colon (``:''). The standard for electronic mail (RFC822) says that
4319 space is illegal there, so Mutt-ng enforces the rule.
4323 If you would like to add a header field to a single message, you should
4324 either set the <link linkend="edit-headers">edit-headers</link>
4326 or use the <emphasis>edit-headers</emphasis> function (default: ``E'')
4328 that you can edit the header of your message along with the body.
4332 To remove user defined header fields, use the ``unmy_hdr''
4333 command. You may specify an asterisk (``*'') to remove all header
4334 fields, or the fields to remove. For example, to remove all ``To'' and
4335 ``Cc'' header fields, you could use:
4340 unmy_hdr to cc</screen>
4349 <sect1 id="hdr-order">
4350 <title>Defining the order of headers when viewing messages </title>
4354 Usage: <literal>hdr_order</literal> <emphasis>header1</emphasis><emphasis>header2</emphasis> <emphasis>header3</emphasis>
4359 With this command, you can specify an order in which mutt will attempt
4360 to present headers to you when viewing messages.
4364 ``unhdr_order *'' will clear all previous headers from the order
4366 thus removing the header order effects set by the system-wide startup
4373 hdr_order From Date: From: To: Cc: Subject:</screen>
4383 <sect1 id="save-hook">
4384 <title>Specify default save filename </title>
4388 Usage: <literal>save-hook</literal> [!]<emphasis>pattern</emphasis> <emphasis>filename</emphasis>
4393 This command is used to override the default filename used when saving
4394 messages. <emphasis>filename</emphasis> will be used as the default
4395 filename if the message is
4396 <emphasis>From:</emphasis> an address matching <emphasis>regexp</emphasis> or if you are the author and the
4397 message is addressed <emphasis>to:</emphasis> something matching <emphasis>
4404 See <link linkend="pattern-hook">pattern-hook</link> for information on
4405 the exact format of <emphasis>pattern</emphasis>.
4415 save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins
4416 save-hook aol\\.com$ +spam</screen>
4421 Also see the <link linkend="fcc-save-hook">fcc-save-hook</link>
4431 <sect1 id="fcc-hook">
4432 <title>Specify default Fcc: mailbox when composing </title>
4436 Usage: <literal>fcc-hook</literal> [!]<emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
4441 This command is used to save outgoing mail in a mailbox other than
4442 <link linkend="record">record</link>. Mutt-ng searches the initial
4444 message recipients for the first matching <emphasis>regexp</emphasis>
4445 and uses <emphasis>mailbox</emphasis>
4446 as the default Fcc: mailbox. If no match is found the message will be
4448 to <link linkend="record">record</link> mailbox.
4452 See <link linkend="pattern-hook">pattern-hook</link> for information on
4453 the exact format of <emphasis>pattern</emphasis>.
4457 Example: <literal>fcc-hook [@.]aol\\.com$
4463 The above will save a copy of all messages going to the aol.com domain
4465 the `+spammers' mailbox by default. Also see the <link linkend="fcc-save-hook">
4477 <sect1 id="fcc-save-hook">
4478 <title>Specify default save filename and default Fcc: mailbox at once </title>
4482 Usage: <literal>fcc-save-hook</literal> [!]<emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
4487 This command is a shortcut, equivalent to doing both a <link linkend="fcc-hook">
4490 and a <link linkend="save-hook">save-hook</link> with its arguments.
4499 <sect1 id="send-hook">
4500 <title>Change settings based upon message recipients </title>
4504 Usage: <literal>reply-hook</literal> [!]<emphasis>pattern</emphasis> <emphasis>command</emphasis>
4505 Usage: <literal>send-hook</literal> [!]<emphasis>pattern</emphasis> <emphasis>command</emphasis>
4506 Usage: <literal>send2-hook</literal> [!]<emphasis>pattern</emphasis> <emphasis>command</emphasis>
4511 These commands can be used to execute arbitrary configuration commands
4513 upon recipients of the message. <emphasis>pattern</emphasis> is a
4515 matching the desired address. <emphasis>command</emphasis> is executed
4516 when <emphasis>regexp</emphasis>
4517 matches recipients of the message.
4521 <literal>reply-hook</literal> is matched against the message you are <emphasis>
4524 <emphasis role="bold">to</emphasis>, instead of the message you are <emphasis>
4527 .<literal>send-hook</literal> is
4528 matched against all messages, both <emphasis>new</emphasis> and <emphasis>
4531 .<emphasis role="bold">Note:</emphasis>
4532 <literal>reply-hook</literal>s are matched <emphasis role="bold">before</emphasis> the <literal>
4535 ,<emphasis role="bold">regardless</emphasis>
4536 of the order specified in the users's configuration file.
4540 <literal>send2-hook</literal> is matched every time a message is
4542 by editing it, or by using the compose menu to change its recipients
4543 or subject. <literal>send2-hook</literal> is executed after <literal>
4547 can, e.g., be used to set parameters such as the <link linkend="sendmail">
4550 variable depending on the message's sender
4555 For each type of <literal>send-hook</literal> or <literal>reply-hook</literal>, when multiple matches
4556 occur, commands are executed in the order they are specified in the
4558 (for that type of hook).
4562 See <link linkend="pattern-hook">pattern-hook</link> for information on
4563 the exact format of <emphasis>pattern</emphasis>.
4567 Example: <literal>send-hook mutt "set mime_forward
4573 Another typical use for this command is to change the values of the
4574 <link linkend="attribution">attribution</link>, <link linkend="signature">
4577 and <link linkend="locale">locale</link>
4578 variables in order to change the language of the attributions and
4579 signatures based upon the recipients.
4583 <emphasis role="bold">Note:</emphasis> the send-hook's are only
4584 executed ONCE after getting the initial
4585 list of recipients. Adding a recipient after replying or editing the
4586 message will NOT cause any send-hook to be executed. Also note that
4587 my_hdr commands which modify recipient headers, or the message's
4588 subject, don't have any effect on the current message when executed
4598 <sect1 id="message-hook">
4599 <title>Change settings before formatting a message </title>
4603 Usage: <literal>message-hook</literal> [!]<emphasis>pattern</emphasis> <emphasis>command</emphasis>
4608 This command can be used to execute arbitrary configuration commands
4609 before viewing or formatting a message based upon information about the
4611 <emphasis>command</emphasis> is executed if the <emphasis>pattern</emphasis> matches the message to be
4612 displayed. When multiple matches occur, commands are executed in the
4614 they are specified in the muttrc.
4618 See <link linkend="pattern-hook">pattern-hook</link> for
4619 information on the exact format of <emphasis>pattern</emphasis>.
4626 message-hook ~A 'set pager=builtin'
4627 message-hook '~f freshmeat-news' 'set pager="less \"+/^ subject:.*\""'</screen>
4637 <sect1 id="crypt-hook">
4638 <title>Choosing the cryptographic key of the recipient </title>
4642 Usage: <literal>crypt-hook</literal> <emphasis>pattern</emphasis> <emphasis>keyid</emphasis>
4647 When encrypting messages with PGP or OpenSSL, you may want to associate
4649 key with a given e-mail address automatically, either because the
4650 recipient's public key can't be deduced from the destination address,
4651 or because, for some reasons, you need to override the key Mutt-ng
4652 wouldnormally use. The crypt-hook command provides a method by which
4654 specify the ID of the public key to be used when encrypting messages to
4655 a certain recipient.
4659 The meaning of "key id" is to be taken broadly in this context: You
4660 can either put a numerical key ID here, an e-mail address, or even
4671 <title>Adding key sequences to the keyboard buffer </title>
4675 Usage: <literal>push</literal> <emphasis>string</emphasis>
4681 This command adds the named string to the keyboard buffer. The
4682 string may contain control characters, key names and function
4683 names like the sequence string in the <link
4684 linkend="macro">macro</link> command. You may use it to
4685 automatically run a sequence of commands at startup, or when
4686 entering certain folders. For example, the following command
4687 will automatically collapse all threads when entering a folder:
4690 folder-hook . 'push <collapse-all>'
4702 <title>Executing functions </title>
4706 Usage: <literal>exec</literal> <emphasis>function</emphasis> [ <emphasis>function</emphasis> ... ]
4711 This command can be used to execute any function. Functions are
4712 listed in the <link linkend="functions">functions</link>.
4713 ``exec function'' is equivalent to ``push <function>''.
4722 <sect1 id="score-command">
4723 <title>Message Scoring </title>
4727 Usage: <literal>score</literal> <emphasis>pattern</emphasis> <emphasis>value</emphasis>
4728 Usage: <literal>unscore</literal> <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis>... ]
4733 In situations where you have to cope with a lot of emails, e.g.
4734 when you read many different mailing lists, and take part in
4735 discussions, it is always useful to have the important messages
4736 marked and the annoying messages or the ones that you aren't
4737 interested in deleted. For this purpose, mutt-ng features a
4738 mechanism called ``scoring''.
4742 When you use scoring, every message has a base score of 0. You
4743 can then use the <literal>score</literal> command to define patterns
4745 positive or negative value associated with it. When a pattern
4746 matches a message, the message's score will be raised or lowered by
4747 the amount of the value associated with the pattern.
4753 score "~f nion@muttng\.org" 50
4754 score "~f @sco\.com" -100</screen>
4759 If the pattern matches, it is also possible to set the score
4760 value of the current message to a certain value and then stop
4767 score "~f santaclaus@northpole\.int" =666</screen>
4772 What is important to note is that negative score values will be
4777 To make scoring actually useful, the score must be applied in
4778 some way. That's what the <emphasis>score thresholds</emphasis> are
4780 there are three score thresholds:
4789 flag threshold: when a message has a score value equal or higher
4790 than the flag threshold, it will be flagged.
4797 read threshold: when a message has a score value equal or lower
4798 than the read threshold, it will be marked as read.
4805 delete threshold: when a message has a score value equal or
4806 lower than the delete threshold, it will be marked as deleted.
4816 These three thresholds can be set via the variables <link linkend="score-threshold-flag">
4817 score-threshold-flag
4819 ,<link linkend="score-threshold-read">score-threshold-read</link>, <link linkend="score-threshold-delete">
4820 score-threshold-delete
4823 default, <link linkend="score-threshold-read">score-threshold-read</link> and <link linkend="score-threshold-delete">
4824 score-threshold-delete
4827 <literal>-1</literal>, which means that in the default threshold
4829 message will ever get marked as read or deleted.
4833 Scoring gets especially interesting when combined with the <literal>
4837 and the <literal>˜n</literal> pattern:
4843 color index black yellow "~n 10-"
4844 color index red yellow "~n 100-"</screen>
4849 The rules above mark all messages with a score between 10 and 99
4850 with black and yellow, and messages with a score greater or equal
4851 100 with red and yellow. This might be unusual to you if you're used
4852 to e.g. slrn's scoring mechanism, but it is more flexible, as it
4853 visually marks different scores.
4863 <title>Spam detection </title>
4867 Usage: <literal>spam</literal> <emphasis>pattern</emphasis> <emphasis>format </emphasis>
4868 Usage: <literal>nospam</literal> <emphasis>pattern</emphasis>
4873 Mutt-ng has generalized support for external spam-scoring filters.
4874 By defining your spam patterns with the <literal>spam</literal> and <literal>
4877 commands, you can <emphasis>limit</emphasis>, <emphasis>search</emphasis>, and <emphasis>
4881 mail based on its spam attributes, as determined by the external
4882 filter. You also can display the spam attributes in your index
4883 display using the <literal>%H</literal> selector in the <link linkend="index-format">
4886 variable. (Tip: try <literal>%?H?[%H] ?</literal>
4887 to display spam tags only when they are defined for a given message.)
4891 Your first step is to define your external filter's spam patterns using
4892 the <literal>spam</literal> command. <emphasis>pattern</emphasis>
4893 should be a regular expression
4894 that matches a header in a mail message. If any message in the mailbox
4895 matches this regular expression, it will receive a ``spam tag'' or
4896 ``spam attribute'' (unless it also matches a <literal>nospam</literal>
4898 below.) The appearance of this attribute is entirely up to you, and is
4899 governed by the <emphasis>format</emphasis> parameter. <emphasis>format</emphasis> can be any static
4900 text, but it also can include back-references from the <emphasis>
4903 expression. (A regular expression ``back-reference'' refers to a
4904 sub-expression contained within parentheses.) <literal>%1</literal> is replaced with
4905 the first back-reference in the regex, <literal>%2</literal>
4906 with the second, etc.
4910 If you're using multiple spam filters, a message can have more than
4911 one spam-related header. You can define <literal>spam</literal>
4913 filter you use. If a message matches two or more of these patterns, and
4914 the $spam_separator variable is set to a string, then the
4915 message's spam tag will consist of all the <emphasis>format</emphasis>
4917 together, with the value of $spam_separator separating
4922 For example, suppose I use DCC, SpamAssassin, and PureMessage. I might
4923 define these spam settings:
4926 spam "X-DCC-.*-Metrics:.*(....)=many" "90+/DCC-%1"
4927 spam "X-Spam-Status: Yes" "90+/SA"
4928 spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM"
4929 set spam_separator=", "</screen>
4934 If I then received a message that DCC registered with ``many'' hits
4935 under the ``Fuz2'' checksum, and that PureMessage registered with a
4936 97% probability of being spam, that message's spam tag would
4937 read<literal>90+/DCC-Fuz2, 97/PM</literal>. (The four characters before
4939 DCC report indicate the checksum used -- in this case, ``Fuz2''.)
4943 If the $spam_separator variable is unset, then each
4944 spam pattern match supersedes the previous one. Instead of getting
4945 joined <emphasis>format</emphasis> strings, you'll get only the last
4950 The spam tag is what will be displayed in the index when you use
4951 <literal>%H</literal> in the <literal>
4952 $index_format
4954 variable. It's also the
4955 string that the <literal>˜H</literal> pattern-matching expression
4957 <emphasis>search</emphasis> and <emphasis>limit</emphasis> functions.
4958 And it's what sorting by spam
4959 attribute will use as a sort key.
4963 That's a pretty complicated example, and most people's actual
4964 environments will have only one spam filter. The simpler your
4965 configuration, the more effective mutt can be, especially when it comes
4970 Generally, when you sort by spam tag, mutt will sort <emphasis>
4974 that is, by ordering strings alphnumerically. However, if a spam tag
4975 begins with a number, mutt will sort numerically first, and lexically
4976 only when two numbers are equal in value. (This is like UNIX's
4977 <literal>sort -n</literal>.) A message with no spam attributes at all
4979 that didn't match <emphasis>any</emphasis> of your <literal>spam</literal> patterns -- is sorted at
4980 lowest priority. Numbers are sorted next, beginning with 0 and ranging
4981 upward. Finally, non-numeric strings are sorted, with ``a'' taking
4982 lowerpriority than ``z''. Clearly, in general, sorting by spam tags is
4984 effective when you can coerce your filter to give you a raw number. But
4985 in case you can't, mutt can still do something useful.
4989 The <literal>nospam</literal> command can be used to write exceptions
4990 to <literal>spam</literal>
4991 patterns. If a header pattern matches something in a <literal>spam</literal> command,
4992 but you nonetheless do not want it to receive a spam tag, you can list
4993 amore precise pattern under a <literal>nospam</literal> command.
4997 If the <emphasis>pattern</emphasis> given to <literal>nospam</literal>
4998 is exactly the same as the
4999 <emphasis>pattern</emphasis> on an existing <literal>spam</literal>
5000 list entry, the effect will be to
5001 remove the entry from the spam list, instead of adding an exception.
5002 Likewise, if the <emphasis>pattern</emphasis> for a <literal>spam</literal> command matches an entry
5003 on the <literal>nospam</literal> list, that <literal>nospam</literal>
5004 entry will be removed. If the
5005 <emphasis>pattern</emphasis> for <literal>nospam</literal> is ``*'', <emphasis>
5006 all entries on both lists
5008 will be removed. This might be the default action if you use <literal>
5011 and <literal>nospam</literal> in conjunction with a <literal>
5018 You can have as many <literal>spam</literal> or <literal>nospam</literal> commands as you like.
5019 You can even do your own primitive spam detection within mutt -- for
5020 example, if you consider all mail from <literal>MAILER-DAEMON</literal>
5022 you can use a <literal>spam</literal> command like this:
5028 spam "^From: .*MAILER-DAEMON" "999"</screen>
5039 <title>Setting variables </title>
5043 Usage: <literal>set</literal> [no|inv]<emphasis>variable</emphasis>[=<emphasis>value</emphasis>] [ <emphasis>variable</emphasis> ... ]
5044 Usage: <literal>toggle</literal> <emphasis>variable</emphasis> [<emphasis>variable</emphasis>... ]
5045 Usage: <literal>unset</literal> <emphasis>variable</emphasis> [<emphasis>variable</emphasis>... ]
5046 Usage: <literal>reset</literal> <emphasis>variable</emphasis> [<emphasis>variable</emphasis>... ]
5052 This command is used to set (and unset) <link linkend="variables">
5055 .There are four basic types of variables:
5056 boolean, number, string and quadoption. <emphasis>boolean</emphasis>
5058 <emphasis>set</emphasis> (true) or <emphasis>unset</emphasis> (false).
5059 <emphasis>number</emphasis> variables can be
5060 assigned a positive integer value.
5064 <emphasis>string</emphasis> variables consist of any number of
5065 printable characters.
5066 <emphasis>strings</emphasis> must be enclosed in quotes if they contain
5068 may also use the ``C'' escape sequences <emphasis role="bold">\n</emphasis> and <emphasis role="bold">
5072 newline and tab, respectively.
5076 <emphasis>quadoption</emphasis> variables are used to control whether
5077 or not to be prompted
5078 for certain actions, or to specify a default action. A value of <emphasis>
5081 will cause the action to be carried out automatically as if you had
5083 yes to the question. Similarly, a value of <emphasis>no</emphasis>
5085 action to be carried out as if you had answered ``no.'' A value of
5086 <emphasis>ask-yes</emphasis> will cause a prompt with a default answer
5088 <emphasis>ask-no</emphasis> will provide a default answer of ``no.''
5092 Prefixing a variable with ``no'' will unset it. Example: <literal>set
5099 For <emphasis>boolean</emphasis> variables, you may optionally prefix
5100 the variable name with
5101 <literal>inv</literal> to toggle the value (on or off). This is useful
5103 macros. Example: <literal>set invsmart_wrap</literal>.
5107 The <literal>toggle</literal> command automatically prepends the <literal>
5111 specified variables.
5115 The <literal>unset</literal> command automatically prepends the <literal>
5119 specified variables.
5123 Using the enter-command function in the <emphasis>index</emphasis>
5124 menu, you can query the
5125 value of a variable by prefixing the name of the variable with a
5133 set ?allow_8bit</screen>
5138 The question mark is actually only required for boolean and quadoption
5143 The <literal>reset</literal> command resets all given variables to the
5145 defaults (hopefully mentioned in this manual). If you use the command
5146 <literal>set</literal> and prefix the variable with ``&'' this has
5148 behavior as the reset command.
5152 With the <literal>reset</literal> command there exists the special
5154 which allows you to reset all variables to their system defaults.
5164 <title>Reading initialization commands from another file </title>
5168 Usage: <literal>source</literal> <emphasis>filename</emphasis> [ <emphasis>filename</emphasis>... ]
5173 This command allows the inclusion of initialization commands
5174 from other files. For example, I place all of my aliases in
5175 <literal>˜/.mail_aliases</literal> so that I can make my
5176 <literal>˜/.muttrc</literal> readable and keep my aliases
5181 If the filename begins with a tilde (``˜''), it will be expanded
5183 path of your home directory.
5187 If the filename ends with a vertical bar (|), then <emphasis>
5191 considered to be an executable program from which to read input (eg.
5192 <literal>source ˜/bin/myscript|</literal>).
5202 <title>Removing hooks </title>
5206 Usage: <literal>unhook</literal> [ * | <emphasis>hook-type</emphasis> ]
5211 This command permits you to flush hooks you have previously defined.
5212 You can either remove all hooks by giving the ``*'' character as an
5213 argument, or you can remove all hooks of a specific type by saying
5214 something like <literal>unhook send-hook</literal>.
5223 <sect1 id="sect:sharingsetups">
5224 <title>Sharing Setups </title>
5227 <title>Character Sets </title>
5230 As users may run mutt-ng on different systems, the configuration
5231 must be maintained because it's likely that people want to use the
5232 setup everywhere they use mutt-ng. And mutt-ng tries to help where it
5237 To not produce conflicts with different character sets, mutt-ng
5238 allows users to specify in which character set their configuration
5239 files are encoded. Please note that while reading the configuration
5240 files, this is only respected after the corresponding declaration
5241 appears. It's advised to put the following at the very beginning of a
5248 set config_charset = "..."</screen>
5253 and replacing the dots with the actual character set. To avoid
5254 problems while maintaining the setup, vim user's may want to use
5255 modelines as show in:
5261 # vim:fileencoding=...:</screen>
5266 while, again, replacing the dots with the appropriate name. This
5267 tells vim as which character set to read and save the file.
5277 <title>Modularization </title>
5280 ``Modularization'' means to divide the setup into several files
5281 while sorting the options or commands by topic. Especially for
5282 longer setups (e.g. with many hooks), this helps maintaining it
5283 and solving trouble.
5287 When using separation, setups may be, as a whole or in
5288 fractions, shared over different systems.
5298 <title>Conditional parts </title>
5301 When using a configuration on different systems, the user may not
5302 always have influence on how mutt-ng is installed and which features
5307 To solve this, mutt-ng contain a feature based on the ``ifdef''
5308 patch written for mutt. Its basic syntax is:
5314 ifdef <item> <command>
5315 ifndef <item> <command></screen>
5320 ...whereby <literal><item></literal> can be one of:
5360 All available functions, variables and menus are documented
5361 elsewhere in this manual but ``features'' is specific to these
5362 two commands. To test for one, prefix one of the following
5363 keywords with <literal>feature_</literal>: ncurses,
5364 slang, iconv, idn, dotlock, standalone, pop, nntp, imap, ssl,
5365 gnutls, sasl, sasl2, libesmtp, compressed, color, classic_pgp,
5366 classic_smime, gpgme, header_cache
5370 As an example, one can use the following in
5371 <literal>˜/.muttngrc</literal>:
5377 ifdef feature_imap 'source ~/.mutt-ng/setup-imap'
5378 ifdef feature_pop 'source ~/.mutt-ng/setup-pop'
5379 ifdef feature_nntp 'source ~/.mutt-ng/setup-nntp'</screen>
5384 ...to only source <literal>˜/.mutt-ng/setup-imap</literal> if
5386 support is built in, only source <literal>˜/.mutt-ng/setup-pop</literal>
5387 if POP support is built in and only source
5388 <literal>˜/.mutt-ng/setup-nntp</literal> if NNTP support is
5393 An example for testing for variable names can be used if users
5394 use different revisions of mutt-ng whereby the older one may not
5395 have a certain variable. To test for the availability of <link linkend="imap-mail-check">
5405 ifdef imap_mail_check 'set imap_mail_check = 300'</screen>
5410 Provided for completeness is the test for menu names. To set <link linkend="pager-index-lines">
5414 menu is available, use:
5420 ifdef pager 'set pager_index_lines = 10'</screen>
5425 For completeness, too, the opposite of <literal>ifdef</literal> is
5427 <literal>ifndef</literal> which only executes the command if the test
5429 example, the following two examples are equivalent:
5435 ifdef feature_ncurses 'source ~/.mutt-ng/setup-ncurses'
5436 ifndef feature_ncurses 'source ~/.mutt-ng/setup-slang'</screen>
5447 ifdef feature_slang 'source ~/.mutt-ng/setup-slang'
5448 ifndef feature_slang 'source ~/.mutt-ng/setup-ncurses'</screen>
5465 <title>Obsolete Variables </title>
5468 In the process of ensuring and creating more consistency, many
5469 variables have been renamed and some of the old names were already
5470 removed. Please see <link linkend="sect-obsolete">sect-obsolete</link>
5471 for a complete list.
5487 <title>Advanced Usage </title>
5490 <title>Regular Expressions </title>
5493 All string patterns in Mutt-ng including those in more complex
5494 <link linkend="patterns">patterns</link> must be specified
5495 using regular expressions (regexp) in the ``POSIX extended'' syntax
5497 is more or less the syntax used by egrep and GNU awk). For your
5498 convenience, we have included below a brief description of this syntax.
5502 The search is case sensitive if the pattern contains at least one upper
5503 case letter, and case insensitive otherwise. Note that ``\''
5504 must be quoted if used for a regular expression in an initialization
5505 command: ``\\''.
5509 A regular expression is a pattern that describes a set of strings.
5510 Regular expressions are constructed analogously to arithmetic
5511 expressions, by using various operators to combine smaller expressions.
5515 Note that the regular expression can be enclosed/delimited by either
5517 or ' which is useful if the regular expression includes a white-space
5518 character. See <link linkend="muttrc-syntax">muttrc-syntax</link>
5519 for more information on " and ' delimiter processing. To match a
5520 literal " or ' you must preface it with \ (backslash).
5524 The fundamental building blocks are the regular expressions that match
5525 a single character. Most characters, including all letters and digits,
5526 are regular expressions that match themselves. Any metacharacter with
5527 special meaning may be quoted by preceding it with a backslash.
5531 The period ``.'' matches any single character. The caret ``ˆ''
5532 andthe dollar sign ``$'' are metacharacters that respectively
5534 the empty string at the beginning and end of a line.
5538 A list of characters enclosed by ``['' and ``]'' matches any
5539 single character in that list; if the first character of the list
5540 is a caret ``ˆ'' then it matches any character <emphasis role="bold">
5544 list. For example, the regular expression <emphasis role="bold">
5545 [0123456789]
5547 matches any single digit. A range of ASCII characters may be specified
5548 by giving the first and last characters, separated by a hyphen
5549 ``-''. Most metacharacters lose their special meaning inside
5550 lists. To include a literal ``]'' place it first in the list.
5551 Similarly, to include a literal ``ˆ'' place it anywhere but first.
5552 Finally, to include a literal hyphen ``-'' place it last.
5556 Certain named classes of characters are predefined. Character classes
5557 consist of ``[:'', a keyword denoting the class, and ``:]''.
5558 The following classes are defined by the POSIX standard:
5565 <term>[:alnum:]</term>
5568 Alphanumeric characters.
5573 <term>[:alpha:]</term>
5576 Alphabetic characters.
5581 <term>[:blank:]</term>
5584 Space or tab characters.
5589 <term>[:cntrl:]</term>
5597 <term>[:digit:]</term>
5605 <term>[:graph:]</term>
5608 Characters that are both printable and visible. (A space is
5610 but not visible, while an ``a'' is both.)
5615 <term>[:lower:]</term>
5618 Lower-case alphabetic characters.
5623 <term>[:print:]</term>
5626 Printable characters (characters that are not control
5632 <term>[:punct:]</term>
5635 Punctuation characters (characters that are not letter, digits,
5637 characters, or space characters).
5642 <term>[:space:]</term>
5645 Space characters (such as space, tab and formfeed, to name a
5651 <term>[:upper:]</term>
5654 Upper-case alphabetic characters.
5659 <term>[:xdigit:]</term>
5662 Characters that are hexadecimal digits.
5670 A character class is only valid in a regular expression inside the
5671 brackets of a character list. Note that the brackets in these
5672 class names are part of the symbolic names, and must be included
5673 in addition to the brackets delimiting the bracket list. For
5674 example, <emphasis role="bold">[[:digit:]]</emphasis> is equivalent to
5675 <emphasis role="bold">[0-9]</emphasis>.
5679 Two additional special sequences can appear in character lists. These
5680 apply to non-ASCII character sets, which can have single symbols
5681 (calledcollating elements) that are represented with more than one
5683 as well as several characters that are equivalent for collating or
5691 <term>Collating Symbols</term>
5694 A collating symbol is a multi-character collating element
5696 ``[.'' and ``.]''. For example, if ``ch'' is a
5698 element, then <emphasis role="bold">
5699 [[.ch.]]
5701 is a regexp that matches
5702 this collating element, while <emphasis role="bold">
5706 matches either ``c'' or ``h''.
5711 <term>Equivalence Classes</term>
5714 An equivalence class is a locale-specific name for a list of
5715 characters that are equivalent. The name is enclosed in
5717 and ``=]''. For example, the name ``e'' might be used to
5718 represent all of ``è'' ``é'' and ``e''. In this
5720 <emphasis role="bold">[[=e=]]</emphasis> is
5721 a regexp that matches any of
5722 ``è'', ``é'' and ``e''.
5730 A regular expression matching a single character may be followed by one
5731 of several repetition operators:
5741 The preceding item is optional and matched at most once.
5749 The preceding item will be matched zero or more times.
5757 The preceding item will be matched one or more times.
5762 <term>{n}</term>
5765 The preceding item is matched exactly <emphasis>n</emphasis>
5771 <term>{n,}</term>
5774 The preceding item is matched <emphasis>n</emphasis> or more
5780 <term>{,m}</term>
5783 The preceding item is matched at most <emphasis>m</emphasis>
5789 <term>{n,m}</term>
5792 The preceding item is matched at least <emphasis>n</emphasis>
5793 times, but no more than
5794 <emphasis>m</emphasis> times.
5802 Two regular expressions may be concatenated; the resulting regular
5803 expression matches any string formed by concatenating two substrings
5804 that respectively match the concatenated subexpressions.
5808 Two regular expressions may be joined by the infix operator
5810 the resulting regular expression matches any string matching either
5815 Repetition takes precedence over concatenation, which in turn takes
5816 precedence over alternation. A whole subexpression may be enclosed in
5817 parentheses to override these precedence rules.
5821 <emphasis role="bold">Note:</emphasis> If you compile Mutt-ng with the
5822 GNU <emphasis>rx</emphasis> package, the
5823 following operators may also be used in regular expressions:
5830 <term>\\y</term>
5833 Matches the empty string at either the beginning or the end of
5839 <term>\\B</term>
5842 Matches the empty string within a word.
5847 <term>\\<</term>
5850 Matches the empty string at the beginning of a word.
5855 <term>\\></term>
5858 Matches the empty string at the end of a word.
5863 <term>\\w</term>
5866 Matches any word-constituent character (letter, digit, or
5872 <term>\\W</term>
5875 Matches any character that is not word-constituent.
5880 <term>\\`</term>
5883 Matches the empty string at the beginning of a buffer (string).
5888 <term>\\'</term>
5891 Matches the empty string at the end of a buffer.
5899 Please note however that these operators are not defined by POSIX, so
5900 they may or may not be available in stock libraries on various systems.
5910 <title>Patterns </title>
5913 Mutt-ng's pattern language provides a simple yet effective way to
5914 set up rules to match messages, e.g. for operations like tagging and
5915 scoring. A pattern consists of one or more sub-pattern, which can be
5916 logically grouped, ORed, and negated. For a complete listing of
5917 these patterns, please refer to table <link linkend="patterns">patterns</link> in the Reference chapter.
5921 It must be noted that in this table, <literal>EXPR</literal> is
5922 a regular expression. For ranges, the forms
5923 <literal><[MAX]</literal>, <literal>>>[MIN]</literal>,
5924 <literal> [MIN]- </literal> and <literal>-[MAX]</literal> are
5929 <title>Complex Patterns </title>
5932 It is possible to combine several sub-patterns to a more complex
5933 pattern. The most simple possibility is to logically AND several
5934 patterns by stringing them together:
5940 ~s 'SPAM' ~U</screen>
5945 The pattern above matches all messages that contain ``SPAM'' in
5946 the subject and are unread.
5950 To logical OR patterns, simply use the <literal>|</literal>
5952 especially useful when using local groups:
5958 ~f ("nion@muttng\.org"|"ak@muttng\.org"|"pdmef@muttng\.org")
5959 (~b mutt-ng|~s Mutt-ng)
5960 !~x '@synflood\.at'</screen>
5965 The first pattern matches all messages that were sent by one of
5966 the mutt-ng maintainers, while the seconds pattern matches all
5967 messages that contain ``mutt-ng'' in the message body or ``Mutt-ng''
5968 in the subject. The third pattern matches all messages that do not
5969 contain ``@synflood\.at'' in the <literal>References:</literal>
5971 messages that are not an (indirect) reply to one of my messages. A
5972 pattern can be logicall negated using the <literal>!</literal>
5979 <title>Patterns and Dates </title>
5982 When using dates in patterns, the dates must be specified in a
5983 special format, i.e. <literal>DD/MM/YYYY</literal>. If you don't
5985 month or year, they default to the current month or year. When using
5986 date ranges, and you specify only the minimum or the maximum, the
5987 specified date will be excluded, e.g. <literal>01/06/2005-</literal>
5989 against all messages <emphasis>after</emphasis> Juni 1st, 2005.
5993 It is also possible to use so-called ``error margins'' when
5994 specifying date ranges. You simply specify a date, and then the
5995 error margin. This margin needs to contain the information whether
5996 it goes ``forth'' or ``back'' in time, by using <literal>+</literal>
5997 and <literal>-</literal>.
5998 Then follows a number and a unit, i.e. <literal>y</literal> for
5999 years, <literal>m</literal> for
6000 months, <literal>w</literal> for weeks and <literal>d</literal> for
6001 days. If you use the special
6002 <literal>*</literal> sign, it means that the error margin goes to
6003 both``directions'' in time.
6011 ~d 28/12/2004*1d</screen>
6016 The first pattern matches all dates between January 1st, 2005 and
6017 January 1st 2006. The second pattern matches all dates between
6018 October 18th, 2004 and October 4th 2004 (2 weeks before 18/10/2004),
6019 while the third pattern matches all dates 1 day around December
6020 28th, 2004 (i.e. Dec 27th, 28th and 29th).
6024 Relative dates are also very important, as they make it possible
6025 to specify date ranges between a fixed number of units and the
6026 current date. How this works can be seen in the following example:
6032 ~d >2w # messages older than two weeks
6033 ~d <3d # messages newer than 3 days
6034 ~d =1m # messages that are exactly one month old</screen>
6047 <title>Format Strings </title>
6050 <title>Introduction </title>
6053 The so called <emphasis>Format Strings</emphasis> offer great
6055 configuring mutt-ng. In short, they describe what items to print
6056 out how in menus and status messages.
6060 Basically, they work as this: for different menus and bars,
6061 there's a variable specifying the layout. For every item
6062 available, there is a so called <emphasis>expando</emphasis>.
6066 For example, when running mutt-ng on different machines or
6067 different versions for testing purposes, it may be interesting to
6068 have the following information always printed on screen when one
6078 the current hostname
6085 the current mutt-ng version number
6095 The setting for the status bar of the index is controlled via the
6096 <link linkend="status-format">status-format</link>
6097 variable. For the hostname and version string, there's an expando
6098 for <literal>$status_format</literal>: <literal>
6102 hostname and <literal>%v</literal> to the version string. When
6109 set status_format = "%v on %h: ..."</screen>
6114 mutt-ng will replace the sequence <literal>%v</literal> with
6116 and <literal>%h</literal> with the host's name. When you are,
6117 for example, running
6118 mutt-ng version <literal>1.5.9i</literal> on host <literal>mailhost</literal>, you'll see the
6119 following when you're in the index:
6125 Mutt-ng 1.5.9i on mailhost: ...</screen>
6130 In the index, there're more useful information one could want to
6140 which mailbox is open
6147 how man new, flagged or postponed messages
6164 To include the mailbox' name is as easy as:
6170 set status_format = "%v on %h: %B: ...</screen>
6175 When the currently opened mailbox is <literal>Inbox</literal>, this
6183 Mutt-ng 1.5.9i on mailhost: Inbox: ...</screen>
6188 For the number of certain types of messages, one more feature of the
6190 strings is extremely useful. If there aren't messages of a certain
6192 may not be desired to print just that there aren't any but instead
6194 print something if there are any.
6204 <title>Conditional Expansion </title>
6207 To only print the number of messages if there are new messages in
6208 the current mailbox, further extend
6209 <literal>$status_format</literal> to:
6215 set status_format = "%v on %h: %B %?n?%n new? ...</screen>
6220 This feature is called <emphasis>nonzero-printing</emphasis> and
6222 some expandos may be optionally printed nonzero, i.e. a portion
6223 of the format string is only evaluated if the value of the expando
6224 is different from zero. The basic syntax is:
6230 %?<item>?<string if nonzero>?</screen>
6235 which tells mutt-ng to only look at <literal><string if
6238 if the value of the <literal>%<item%gt;</literal>
6239 expando is different from zero. In our example, we used <literal>n</literal> as
6240 the expando to check for and <literal>%n new</literal> as the
6246 But this is not all: this feature only offers one alternative:
6247 ``print something if not zero.'' Mutt-ng does, as you might guess,
6248 also provide a logically complete version: ``if zero, print
6249 something and else print something else.'' This is achieved by the
6250 following syntax for those expandos which may be printed nonzero:
6256 %?<item>?<string if nonzero>&<string if zero>?</screen>
6261 Using this we can make mutt-ng to do the following:
6270 make it print ``<emphasis>n</emphasis> new messages'' whereby <emphasis>
6274 count but only if there new ones
6281 and make it print ``no new messages'' if there aren't any
6291 The corresponding configuration is:
6297 set status_format = "%v on %h: %B: %?n?%n new messages&no new messages? ...</screen>
6302 This doubles the use of the ``new messages'' string because it'll get
6303 always printed. Thus, it can be shortened to:
6309 set status_format = "%v on %h: %B: %?n?%n&no? new messages ...</screen>
6314 As you might see from this rather simple example, one can create
6315 very complex but fancy status messages. Please see the reference
6316 chapter for expandos and those which may be printed nonzero.
6326 <title>Modifications and Padding </title>
6329 Besides the information given so far, there're even more features of
6339 When specifying <literal>%_<item></literal>
6341 just <literal>%<item></literal>, mutt-ng will
6343 characters in the expansion of <literal><item></literal>
6352 When specifying <literal>%:<item></literal>
6354 <literal>%<item></literal>, mutt-ng will convert
6356 expansion of <literal><item></literal> to underscores
6357 (<literal>_</literal>).
6367 Also, there's a feature called <emphasis>Padding</emphasis> supplied
6369 following two expandos: <literal>%|X</literal> and <literal>
6380 <literal>%|X</literal>
6384 When this occurs, mutt-ng will fill the
6385 rest of the line with the character <literal>X</literal>. In
6387 filling the rest of the line with dashes is done by setting:
6393 set status_format = "%v on %h: %B: %?n?%n&no? new messages %|-"</screen>
6400 <literal>%>X</literal>
6404 Since the previous expando stops at
6405 the end of line, there must be a way to fill the gap between
6406 two items via the <literal>%>X</literal> expando:
6408 characters <literal>X</literal> in between two items so that
6410 the line will be right-justified. For example, to not put the
6411 version string and hostname of our example on the left but on
6412 the right and fill the gap with spaces, one might use (note
6413 the space after <literal>%></literal>):
6419 set status_format = "%B: %?n?%n&no? new messages %> (%v on %h)"</screen>
6440 <title>Using Tags </title>
6443 Sometimes it is desirable to perform an operation on a group of
6444 messages all at once rather than one at a time. An example might be
6445 to save messages to a mailing list to a separate folder, or to
6446 delete all messages with a given subject. To tag all messages
6447 matching a pattern, use the tag-pattern function, which is bound to
6448 ``shift-T'' by default. Or you can select individual messages by
6449 hand using the ``tag-message'' function, which is bound to ``t'' by
6450 default. See <link linkend="patterns">patterns</link> for Mutt-ng's
6456 Once you have tagged the desired messages, you can use the
6457 ``tag-prefix'' operator, which is the ``;'' (semicolon) key by default.
6458 When the ``tag-prefix'' operator is used, the <emphasis role="bold">
6462 be applied to all tagged messages if that operation can be used in that
6463 manner. If the <link linkend="auto-tag">auto-tag</link>
6464 variable is set, the next operation applies to the tagged messages
6465 automatically, without requiring the ``tag-prefix''.
6469 In <link linkend="macro">macro</link> or <link linkend="push">push</link> commands,
6470 you can use the ``tag-prefix-cond'' operator. If there are no tagged
6471 messages, mutt will "eat" the rest of the macro to abort it's
6472 execution.Mutt-ng will stop "eating" the macro when it encounters the
6474 operator; after this operator the rest of the macro will be executed
6485 <title>Using Hooks </title>
6488 A <emphasis>hook</emphasis> is a concept borrowed from the EMACS editor
6490 execute arbitrary commands before performing some operation. For
6492 you may wish to tailor your configuration based upon which mailbox you
6494 reading, or to whom you are sending mail. In the Mutt-ng world, a <emphasis>
6497 consists of a <link linkend="regexp">regexp</link> or
6498 <link linkend="patterns">patterns</link> along with a
6499 configuration option/command. See
6505 <link linkend="folder-hook">folder-hook</link>
6511 <link linkend="send-hook">send-hook</link>
6517 <link linkend="message-hook">message-hook</link>
6523 <link linkend="save-hook">save-hook</link>
6529 <link linkend="mbox-hook">mbox-hook</link>
6535 <link linkend="fcc-hook">fcc-hook</link>
6541 <link linkend="fcc-save-hook">fcc-save-hook</link>
6547 for specific details on each type of <emphasis>hook</emphasis>
6552 <emphasis role="bold">Note:</emphasis> if a hook changes configuration
6553 settings, these changes remain
6554 effective until the end of the current mutt session. As this is
6556 not desired, a default hook needs to be added before all other hooks to
6557 restore configuration defaults. Here is an example with send-hook and
6559 my_hdr directive:
6565 send-hook . 'unmy_hdr From:'
6566 send-hook ~C'^b@b\.b$' my_hdr from: c@c.c</screen>
6570 <sect2 id="pattern-hook">
6571 <title>Message Matching in Hooks</title>
6574 Hooks that act upon messages (<literal>send-hook, save-hook,
6575 fcc-hook,message-hook
6577 )are evaluated in a slightly different manner. For the other
6578 types of hooks, a <link linkend="regexp">regexp</link> is
6579 sufficient. But in dealing with messages a finer grain of control is
6580 needed for matching since for different purposes you want to match
6585 Mutt-ng allows the use of the <link linkend="patterns">patterns</link>
6586 language for matching messages in hook commands. This works in
6587 exactly the same way as it would when <emphasis>limiting</emphasis>
6588 or<emphasis>searching</emphasis> the mailbox, except that you are
6590 operators which match information mutt extracts from the header of
6591 the message (i.e. from, to, cc, date, subject, etc.).
6595 For example, if you wanted to set your return address based upon
6597 mail to a specific address, you could do something like:
6600 send-hook '~t ^me@cs\.hmc\.edu$' 'my_hdr From: Mutt-ng User <user@host>'</screen>
6602 which would execute the given command when sending mail to
6603 <emphasis>me@cs.hmc.edu</emphasis>.
6607 However, it is not required that you write the pattern to match using
6609 full searching language. You can still specify a simple <emphasis>
6613 like the other hooks, in which case Mutt-ng will translate your
6614 pattern into the full language, using the translation specified by
6616 <link linkend="default-hook">default-hook</link> variable. The
6617 pattern is translated at the time the hook is declared, so the value
6619 <link linkend="default-hook">default-hook</link> that is in effect
6620 at that time will be used.
6631 <sect1 id="sidebar">
6632 <title>Using the sidebar </title>
6635 The sidebar, a feature specific to Mutt-ng, allows you to use a mailbox
6637 which looks very similar to the ones you probably know from GUI mail
6639 The sidebar lists all specified mailboxes, shows the number in each
6640 and highlights the ones with new email
6641 Use the following configuration commands:
6644 set sidebar_visible="yes"
6645 set sidebar_width=25</screen>
6650 If you want to specify the mailboxes you can do so with:
6662 You can also specify the colors for mailboxes with new mails by using:
6665 color sidebar_new red black
6666 color sidebar white black</screen>
6671 The available functions are:
6674 <title>Default Sidebar Function Bindings</title>
6675 <tgroup cols="3" align="left" colsep="1" rowsep="1">
6679 <entry>Function</entry>
6680 <entry>Description</entry>
6684 <row><entry><literal>none</literal></entry><entry><literal>sidebar-scroll-up </literal></entry><entry>Scrolls the mailbox list up 1 page</entry></row>
6685 <row><entry><literal>none</literal></entry><entry><literal>sidebar-scroll-down </literal></entry><entry>Scrolls the mailbox list down 1 page</entry></row>
6686 <row><entry><literal>none</literal></entry><entry><literal>sidebar-next </literal></entry><entry>Highlights the next mailbox</entry></row>
6687 <row><entry><literal>none</literal></entry><entry><literal>sidebar-next-new </literal></entry><entry>Highlights the next mailbox with new mail</entry></row>
6688 <row><entry><literal>none</literal></entry><entry><literal>sidebar-previous </literal></entry><entry>Highlights the previous mailbox</entry></row>
6689 <row><entry><literal>none</literal></entry><entry><literal>sidebar-open </literal></entry><entry>Opens the currently highlighted mailbox</entry></row>
6697 Reasonable key bindings look e.g. like this:
6700 bind index \Cp sidebar-prev
6701 bind index \Cn sidebar-next
6702 bind index \Cb sidebar-open
6703 bind pager \Cp sidebar-prev
6704 bind pager \Cn sidebar-next
6705 bind pager \Cb sidebar-open
6707 macro index B ':toggle sidebar_visible^M'
6708 macro pager B ':toggle sidebar_visible^M'</screen>
6713 You can then go up and down by pressing Ctrl-P and Ctrl-N, and
6714 switch on and off the sidebar simply by pressing 'B'.
6724 <title>External Address Queries </title>
6727 Mutt-ng supports connecting to external directory databases such as
6729 ph/qi, bbdb, or NIS through a wrapper script which connects to mutt
6730 using a simple interface. Using the <link linkend="query-command">
6733 variable, you specify the wrapper
6734 command to use. For example:
6740 set query_command = "mutt_ldap_query.pl '%s'"</screen>
6745 The wrapper script should accept the query on the command-line. It
6746 should return a one line message, then each matching response on a
6747 single line, each line containing a tab separated address then name
6748 thensome other optional information. On error, or if there are no
6750 addresses, return a non-zero exit code and a one line error message.
6754 An example multiple response output:
6757 Searching database ... 20 entries ... 3 matching:
6758 me@cs.hmc.edu Michael Elkins mutt dude
6759 blong@fiction.net Brandon Long mutt and more
6760 roessler@guug.de Thomas Roessler mutt pgp</screen>
6765 There are two mechanisms for accessing the query function of mutt. One
6766 is to do a query from the index menu using the query function (default:
6768 This will prompt for a query, then bring up the query menu which will
6769 list the matching responses. From the query menu, you can select
6770 addresses to create aliases, or to mail. You can tag multiple
6771 addressesto mail, start a new query, or have a new query appended to
6777 The other mechanism for accessing the query function is for address
6778 completion, similar to the alias completion. In any prompt for address
6779 entry, you can use the complete-query function (default: ˆT) to
6781 query based on the current address you have typed. Like aliases, mutt
6782 will look for what you have typed back to the last space or comma. If
6783 there is a single response for that query, mutt will expand the address
6784 in place. If there are multiple responses, mutt will activate the
6785 querymenu. At the query menu, you can select one or more addresses to
6787 added to the prompt.
6797 <title>Mailbox Formats </title>
6800 Mutt-ng supports reading and writing of four different mailbox formats:
6801 mbox, MMDF, MH and Maildir. The mailbox type is autodetected, so there
6802 is no need to use a flag for different mailbox types. When creating
6803 newmailboxes, Mutt-ng uses the default specified with the <link linkend="mbox-type">
6810 <emphasis role="bold">mbox</emphasis>. This is the most widely used
6811 mailbox format for UNIX. All
6812 messages are stored in a single file. Each message has a line of the
6819 From me@cs.hmc.edu Fri, 11 Apr 1997 11:44:56 PST</screen>
6824 to denote the start of a new message (this is often referred to as the
6825 ``From_'' line).
6829 <emphasis role="bold">MMDF</emphasis>. This is a variant of the <emphasis>
6832 format. Each message is
6833 surrounded by lines containing ``ˆAˆAˆAˆA'' (four
6838 <emphasis role="bold">MH</emphasis>. A radical departure from <emphasis>
6841 and <emphasis>MMDF</emphasis>, a mailbox
6842 consists of a directory and each message is stored in a separate file.
6843 The filename indicates the message number (however, this is may not
6844 correspond to the message number Mutt-ng displays). Deleted messages
6845 arerenamed with a comma (,) prepended to the filename. <emphasis role="bold">
6849 detects this type of mailbox by looking for either <literal>
6850 .mh_sequences
6852 or <literal>.xmhcache</literal> (needed to distinguish normal
6858 <emphasis role="bold">Maildir</emphasis>. The newest of the mailbox
6859 formats, used by the Qmail MTA (a
6860 replacement for sendmail). Similar to <emphasis>MH</emphasis>, except
6862 subdirectories of the mailbox: <emphasis>tmp</emphasis>, <emphasis>new</emphasis> and <emphasis>
6866 for the messages are chosen in such a way they are unique, even when
6867 twoprograms are writing the mailbox over NFS, which means that no file
6878 <sect1 id="shortcuts">
6879 <title>Mailbox Shortcuts </title>
6882 There are a number of built in shortcuts which refer to specific
6884 These shortcuts can be used anywhere you are prompted for a file or
6895 ! -- refers to your <link linkend="spoolfile">spoolfile</link>
6902 > -- refers to your <link linkend="mbox">mbox</link> file
6908 < -- refers to your <link linkend="record">record</link> file
6914 ˆ -- refers to the current mailbox
6920 - or !! -- refers to the file you've last visited
6926 ˜ -- refers to your home directory
6932 = or + -- refers to your <link linkend="folder">folder</link>
6939 @<emphasis>alias</emphasis> -- refers to the <link linkend="save-hook">
6942 as determined by the address of the alias
6956 <sect1 id="using-lists">
6957 <title>Handling Mailing Lists </title>
6960 Mutt-ng has a few configuration options that make dealing with large
6961 amounts of mail easier. The first thing you must do is to let Mutt
6962 know what addresses you consider to be mailing lists (technically
6963 this does not have to be a mailing list, but that is what it is most
6964 often used for), and what lists you are subscribed to. This is
6965 accomplished through the use of the <link linkend="lists">lists</link>
6966 commands in your muttrc.
6970 Now that Mutt-ng knows what your mailing lists are, it can do several
6971 things, the first of which is the ability to show the name of a list
6972 through which you received a message (i.e., of a subscribed list) in
6973 the <emphasis>index</emphasis> menu display. This is useful to
6975 personal and list mail in the same mailbox. In the <link linkend="index-format">
6978 variable, the escape ``%L''
6979 will return the string ``To <list>'' when ``list'' appears in the
6980 ``To'' field, and ``Cc <list>'' when it appears in the ``Cc''
6981 field (otherwise it returns the name of the author).
6985 Often times the ``To'' and ``Cc'' fields in mailing list messages
6986 tend to get quite large. Most people do not bother to remove the
6987 author of the message they are reply to from the list, resulting in
6988 two or more copies being sent to that person. The ``list-reply''
6989 function, which by default is bound to ``L'' in the <emphasis>index</emphasis> menu
6990 and <emphasis>pager</emphasis>, helps reduce the clutter by only
6992 known mailing list addresses instead of all recipients (except as
6993 specified by <literal>Mail-Followup-To</literal>, see below).
6997 Mutt-ng also supports the <literal>Mail-Followup-To</literal> header.
6999 a message to a list of recipients which includes one or several
7000 subscribed mailing lists, and if the <link linkend="followup-to">
7003 option is set, mutt will generate
7004 a Mail-Followup-To header which contains all the recipients to whom
7005 you send this message, but not your address. This indicates that
7006 group-replies or list-replies (also known as ``followups'') to this
7007 message should only be sent to the original recipients of the
7008 message, and not separately to you - you'll receive your copy through
7009 one of the mailing lists you are subscribed to.
7013 Conversely, when group-replying or list-replying to a message which
7014 has a <literal>Mail-Followup-To</literal> header, mutt will respect
7016 the <link linkend="honor-followup-to">honor-followup-to</link>
7018 variable is set. Using list-reply will in this case also make sure
7019 that the reply goes to the mailing list, even if it's not specified
7020 in the list of recipients in the <literal>Mail-Followup-To</literal>.
7024 Note that, when header editing is enabled, you can create a
7025 <literal>Mail-Followup-To</literal> header manually. Mutt-ng will only
7027 this header if it doesn't exist when you send the message.
7031 The other method some mailing list admins use is to generate a
7032 ``Reply-To'' field which points back to the mailing list address rather
7033 than the author of the message. This can create problems when trying
7034 to reply directly to the author in private, since most mail clients
7035 will automatically reply to the address given in the ``Reply-To''
7036 field. Mutt-ng uses the <link linkend="reply-to">reply-to</link>
7037 variable to help decide which address to use. If set to <emphasis>
7041 <emphasis>ask-no</emphasis>, you will be
7042 prompted as to whether or not you would like to use the address given
7043 inthe ``Reply-To'' field, or reply directly to the address given in the
7044 ``From'' field. When set to <emphasis>yes</emphasis>, the ``Reply-To''
7045 field will be used when
7050 The ``X-Label:'' header field can be used to further identify mailing
7051 lists or list subject matter (or just to annotate messages
7052 individually). The <link linkend="index-format">index-format</link>
7053 variable's ``%y'' and
7054 ``%Y'' escapes can be used to expand ``X-Label:'' fields in the
7055 index, and Mutt-ng's pattern-matcher can match regular expressions to
7056 ``X-Label:'' fields with the ``˜y'' selector. ``X-Label:'' is
7058 standard message header field, but it can easily be inserted by
7059 procmailand other mail filtering agents.
7063 Lastly, Mutt-ng has the ability to <link linkend="sort">sort</link> the
7065 <link linkend="threads">threads</link>. A thread is a group of
7066 messages which all relate to the same
7067 subject. This is usually organized into a tree-like structure where a
7068 message and all of its replies are represented graphically. If you've
7070 used a threaded news client, this is the same concept. It makes
7071 dealingwith large volume mailing lists easier because you can easily
7073 uninteresting threads and quickly find topics of value.
7083 <title>Editing threads </title>
7086 Mutt-ng has the ability to dynamically restructure threads that are
7088 either by misconfigured software or bad behavior from some
7089 correspondents. This allows to clean your mailboxes formats) from these
7090 annoyances which make it hard to follow a discussion.
7094 <title>Linking threads</title>
7097 Some mailers tend to "forget" to correctly set the "In-Reply-To:" and
7098 "References:" headers when replying to a message. This results in
7100 discussions because Mutt-ng has not enough information to guess the
7103 You can fix this by tagging the reply, then moving to the parent
7105 and using the ``link-threads'' function (bound to & by default).
7107 reply will then be connected to this "parent" message.
7111 You can also connect multiple children at once, tagging them and
7113 tag-prefix command (';') or the auto_tag option.
7119 <title>Breaking threads</title>
7122 On mailing lists, some people are in the bad habit of starting a new
7123 discussion by hitting "reply" to any message from the list and
7125 the subject to a totally unrelated one.
7126 You can fix such threads by using the ``break-thread'' function
7127 (boundby default to #), which will turn the subthread starting
7129 current message into a whole different thread.
7141 <title>Delivery Status Notification (DSN) Support </title>
7144 RFC1894 defines a set of MIME content types for relaying information
7145 about the status of electronic mail messages. These can be thought of
7147 ``return receipts.''
7151 Users can make use of it in one of the following two ways:
7160 Berkeley sendmail 8.8.x currently has some command line options
7161 in which the mail client can make requests as to what type of
7163 messages should be returned.
7169 The SMTP support via libESMTP supports it, too.
7178 To support this, there are two variables:
7187 <link linkend="dsn-notify">dsn-notify</link> is used
7188 to request receipts for different results (such as failed
7189 message,message delivered, etc.).
7196 <link linkend="dsn-return">dsn-return</link> requests
7197 how much of your message should be returned with the receipt
7198 (headers or full message).
7208 Please see the reference chapter for possible values.
7218 <title>POP3 Support (OPTIONAL) </title>
7221 If Mutt-ng was compiled with POP3 support (by running the <emphasis>
7224 script with the <emphasis>--enable-pop</emphasis> flag), it has the
7226 with mailboxes located on a remote POP3 server and fetch mail for local
7231 You can access the remote POP3 mailbox by selecting the folder
7232 <literal>pop://popserver/</literal>.
7236 You can select an alternative port by specifying it with the server,
7238 <literal>pop://popserver:port/</literal>.
7242 You can also specify different username for each folder, i.e.:
7243 <literal>pop://username@popserver[:port]/</literal>.
7247 Polling for new mail is more expensive over POP3 than locally. For this
7248 reason the frequency at which Mutt-ng will check for mail remotely can
7251 <link linkend="pop-mail-check">pop-mail-check</link>
7252 variable, which defaults to every 60 seconds.
7256 If Mutt-ng was compiled with SSL support (by running the <emphasis>
7259 script with the <emphasis>--with-ssl</emphasis> flag), connections to
7261 can be encrypted. This naturally requires that the server supports
7262 SSL encrypted connections. To access a folder with POP3/SSL, you should
7263 use pops: prefix, ie:
7264 <literal>pops://[username@]popserver[:port]/</literal>.
7268 Another way to access your POP3 mail is the <emphasis>fetch-mail</emphasis> function
7269 (default: G). It allows to connect to <link linkend="pop-host">
7272 ,fetch all your new mail and place it in the
7273 local <link linkend="spoolfile">spoolfile</link>. After this
7274 point, Mutt-ng runs exactly as if the mail had always been local.
7278 <emphasis role="bold">Note:</emphasis> If you only need to fetch all
7279 messages to local mailbox
7280 you should consider using a specialized program, such as
7282 URL="http://www.ccil.org/~esr/fetchmail">fetchmail</ulink>
7292 <title>IMAP Support (OPTIONAL) </title>
7295 If Mutt-ng was compiled with IMAP support (by running the <emphasis>
7298 script with the <emphasis>--enable-imap</emphasis> flag), it has the
7300 with folders located on a remote IMAP server.
7304 You can access the remote inbox by selecting the folder
7305 <literal>imap://imapserver/INBOX</literal>, where <literal>imapserver</literal> is the name of the
7306 IMAP server and <literal>INBOX</literal> is the special name for your
7308 the IMAP server. If you want to access another mail folder at the IMAP
7309 server, you should use <literal>imap://imapserver/path/to/folder</literal> where
7310 <literal>path/to/folder</literal> is the path of the folder you want to
7315 You can select an alternative port by specifying it with the server,
7317 <literal>imap://imapserver:port/INBOX</literal>.
7321 You can also specify different username for each folder, i.e.:
7322 <literal>imap://username@imapserver[:port]/INBOX</literal>.
7326 If Mutt-ng was compiled with SSL support (by running the <emphasis>
7329 script with the <emphasis>--with-ssl</emphasis> flag), connections to
7331 can be encrypted. This naturally requires that the server supports
7332 SSL encrypted connections. To access a folder with IMAP/SSL, you should
7333 use <literal>imaps://[username@]imapserver[:port]/path/to/folder</literal> as your
7338 Pine-compatible notation is also supported, i.e.
7339 <literal>{[username@]imapserver[:port][/ssl]}path/to/folder</literal>
7343 Note that not all servers use / as the hierarchy separator. Mutt-ng
7345 correctly notice which separator is being used by the server and
7346 convertpaths accordingly.
7350 When browsing folders on an IMAP server, you can toggle whether to look
7351 at only the folders you are subscribed to, or all folders with the
7352 <emphasis>toggle-subscribed</emphasis> command. See also the
7353 <link linkend="imap-list-subscribed">imap-list-subscribed</link>
7358 Polling for new mail on an IMAP server can cause noticeable delays. So,
7360 want to carefully tune the
7361 <link linkend="imap-mail-check">imap-mail-check</link>
7363 <link linkend="timeout">timeout</link>
7368 Note that if you are using mbox as the mail store on UW servers prior
7369 tov12.250, the server has been reported to disconnect a client if
7371 selects the same folder.
7375 <title>The Folder Browser</title>
7378 As of version 1.2, mutt supports browsing mailboxes on an IMAP
7379 server. This is mostly the same as the local file browser, with the
7380 following differences:
7386 Instead of file permissions, mutt displays the string "IMAP",
7387 possibly followed by the symbol "+", indicating
7388 that the entry contains both messages and subfolders. On
7389 Cyrus-like servers folders will often contain both messages and
7396 For the case where an entry can contain both messages and
7397 subfolders, the selection key (bound to <literal>enter</literal> by default)
7398 will choose to descend into the subfolder view. If you wish to
7400 the messages in that folder, you must use <literal>view-file</literal> instead
7401 (bound to <literal>space</literal> by default).
7407 You can create, delete and rename mailboxes with the
7408 <literal>create-mailbox</literal>, <literal>delete-mailbox</literal>, and
7409 <literal>rename-mailbox</literal> commands (default bindings: <literal>
7413 <literal>d</literal> and <literal>r</literal>, respectively).
7415 <literal>subscribe</literal> and <literal>unsubscribe</literal>
7416 to mailboxes (normally
7417 these are bound to <literal>s</literal> and <literal>u</literal>, respectively).
7428 <title>Authentication</title>
7431 Mutt-ng supports four authentication methods with IMAP servers: SASL,
7432 GSSAPI, CRAM-MD5, and LOGIN (there is a patch by Grant Edwards to add
7433 NTLM authentication for you poor exchange users out there, but it has
7434 yet to be integrated into the main tree). There is also support for
7435 the pseudo-protocol ANONYMOUS, which allows you to log in to a public
7436 IMAP server without having an account. To use ANONYMOUS, simply make
7437 your username blank or "anonymous".
7441 SASL is a special super-authenticator, which selects among several
7443 (including GSSAPI, CRAM-MD5, ANONYMOUS, and DIGEST-MD5) the most
7445 method available on your host and the server. Using some of these
7447 (including DIGEST-MD5 and possibly GSSAPI), your entire session will
7449 encrypted and invisible to those teeming network snoops. It is the
7451 option if you have it. To use it, you must have the Cyrus SASL
7452 libraryinstalled on your system and compile mutt with the <emphasis>
7459 Mutt-ng will try whichever methods are compiled in and available on
7461 in the following order: SASL, ANONYMOUS, GSSAPI, CRAM-MD5, LOGIN.
7465 There are a few variables which control authentication:
7471 <link linkend="imap-user">imap-user</link> - controls
7472 the username under which you request authentication on the IMAP
7474 for all authenticators. This is overridden by an explicit
7476 the mailbox path (i.e. by using a mailbox name of the form
7477 <literal>{user@host}</literal>).
7483 <link linkend="imap-pass">imap-pass</link> - a
7484 password which you may preset, used by all authentication
7486 a password is needed.
7492 <link linkend="imap-authenticators">imap-authenticators</link>
7493 - a colon-delimited list of IMAP
7494 authentication methods to try, in the order you wish to try
7496 specified, this overrides mutt's default (attempt everything,
7514 <sect1 id="reading-news">
7515 <title>NNTP Support (OPTIONAL) </title>
7518 If compiled with ``--enable-nntp'' option, Mutt-ng can read news from
7519 a newsserver via NNTP. You can open a newsgroup with the
7520 ``change-newsgroup'' function from the index/pager which is by default
7521 bound to <literal>i</literal>.
7525 The Default newsserver can be obtained from the
7526 <literal>$NNTPSERVER</literal> environment variable. Like other
7528 info about subscribed newsgroups is saved in a file as specified by the
7529 <link linkend="nntp-newsrc">nntp-newsrc</link> variable.
7530 Article headers are cached and can be loaded from a file when a
7531 newsgroup is entered instead loading from newsserver; currently, this
7532 caching mechanism still is different from the header caching for
7537 <title>Again: Scoring </title>
7540 Especially for Usenet, people often ask for advanced filtering
7541 and scoring functionality. Of course, mutt-ng has scoring and
7542 allows a killfile, too. How to use a killfile has been discussed
7543 in <link linkend="score-command">score-command</link>.
7547 What has not been discusses in detail is mutt-ng's built-in
7548 realname filter. For may newsreaders including those for
7549 ``advanced users'' like <emphasis>slrn</emphasis> or <emphasis>tin</emphasis>, there are frequent
7550 request for such functionality. The solutions offered often are
7551 complicated regular expressions.
7555 In mutt-ng this is as easy as
7561 score ~* =42</screen>
7566 This tells mutt-ng to apply a score of 42 to all messages whose
7567 sender specified a valid realname and a valid email address. Using
7573 score !~* =42</screen>
7578 on the contrary applies a score of 42 to all messages <emphasis>not</emphasis>
7579 matching those criteria which are very strict:
7588 Email addresses must be valid according to RFC 2822, see
7590 URL="ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt"><ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt>
7597 the name must consist of at least 2 fields whereby a field
7598 must not end in a dot. This means that ``Joe User'' and ``Joe
7599 A.User'' are valid while ``J. User'' and ``J. A. User'' aren't.
7606 it's assumed that users are interested in reading their
7607 own mail and mail from people who they have defined an alias
7608 forso that those 2 groups of messages are excluded from the
7632 <title>SMTP Support (OPTIONAL) </title>
7635 Mutt-ng can be built using a library called ``libESMTP'' which
7636 provides SMTP functionality. When <literal>configure</literal> was
7638 <literal>--with-libesmtp</literal> or the output <literal>muttng -v</literal> contains
7639 <literal>+USE_LIBESMTP</literal>, this will be or is the case
7641 support includes support for Delivery Status Notification (see <link linkend="dsn">
7645 handling the <literal>8BITMIME</literal> flag controlled via <link linkend="use-8bitmime">
7652 To enable sending mail directly via SMTP without an MTA such as
7653 Postfix or SSMTP and the like, simply set the <link linkend="smtp-host">
7656 variable pointing to your SMTP server.
7660 Authentication mechanisms are available via the <link linkend="smtp-user">
7663 and <link linkend="smtp-pass">smtp-pass</link> variables.
7667 Transport Encryption via the StartTLS command is also available. For
7668 this to work, first of all Mutt-ng must be built with SSL or GNUTLS.
7669 Secondly, the <link linkend="smtp-use-tls">smtp-use-tls</link> variable
7671 to ``enabled'' or ``required.'' In both cases, StartTLS will be used if
7672 the server supports it: for the second case, the connection will fail
7673 ifit doesn't while switching back to unencrypted communication for the
7678 Some mail providers require user's to set a particular envelope
7679 sender, i.e. they allow for only one value which may not be what the
7680 user wants to send as the <literal>From:</literal> header. In this
7682 <link linkend="smtp-envelope">smtp-envelope</link> may be used
7683 to set the envelope different from the <literal>From:</literal> header.
7688 <sect1 id="account-hook">
7689 <title>Managing multiple IMAP/POP/NNTP accounts (OPTIONAL) </title>
7692 If you happen to have accounts on multiple IMAP and/or POP servers,
7693 you may find managing all the authentication settings inconvenient and
7694 error-prone. The account-hook command may help. This hook works like
7695 folder-hook but is invoked whenever you access a remote mailbox
7696 (including inside the folder browser), not just when you open the
7707 account-hook . 'unset imap_user; unset imap_pass; unset tunnel'
7708 account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo'
7709 account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'</screen>
7719 <sect1 id="urlview">
7720 <title>Start a WWW Browser on URLs (EXTERNAL) </title>
7723 If a message contains URLs (<emphasis>unified resource locator</emphasis> = address in the
7724 WWW space like <emphasis>http://www.mutt.org/</emphasis>), it is
7726 a menu with all the URLs and start a WWW browser on one of them. This
7727 functionality is provided by the external urlview program which can be
7728 retrieved at <ulink URL="ftp://ftp.mutt.org/mutt/contrib/">ftp://ftp.mutt.org/mutt/contrib/</ulink>
7730 and the configuration commands:
7733 macro index \cb |urlview\n
7734 macro pager \cb |urlview\n</screen>
7745 <title>Compressed folders Support (OPTIONAL) </title>
7748 If Mutt-ng was compiled with compressed folders support (by running the
7749 <emphasis>configure</emphasis> script with the <emphasis>
7753 can open folders stored in an arbitrary format, provided that the user
7754 has a script to convert from/to this format to one of the accepted.
7758 The most common use is to open compressed archived folders e.g. with
7763 In addition, the user can provide a script that gets a folder in an
7764 accepted format and appends its context to the folder in the
7765 user-defined format, which may be faster than converting the entire
7766 folder to the accepted format, appending to it and converting back to
7767 the user-defined format.
7771 There are three hooks defined (<link linkend="open-hook">open-hook</link>,
7772 <link linkend="close-hook">close-hook</link> and <link linkend="append-hook">
7775 )which define commands to uncompress and compress
7776 a folder and to append messages to an existing compressed folder
7787 open-hook \\.gz$ "gzip -cd %f > %t"
7788 close-hook \\.gz$ "gzip -c %t > %f"
7789 append-hook \\.gz$ "gzip -c %t >> %f" </screen>
7794 You do not have to specify all of the commands. If you omit <link linkend="append-hook">
7797 ,the folder will be open and
7798 closed again each time you will add to it. If you omit <link linkend="close-hook">
7801 (or give empty command) , the
7802 folder will be open in the mode. If you specify <link linkend="append-hook">
7805 though you'll be able to append
7810 Note that Mutt-ng will only try to use hooks if the file is not in one
7812 the accepted formats. In particular, if the file is empty, mutt
7813 supposes it is not compressed. This is important because it allows the
7814 use of programs that do not have well defined extensions. Just use
7815 "." as a regexp. But this may be surprising if your
7816 compressing script produces empty files. In this situation, unset <link linkend="save-empty">
7819 ,so that the compressed file
7820 will be removed if you delete all of the messages.
7823 <sect2 id="open-hook">
7824 <title>Open a compressed mailbox for reading</title>
7828 Usage: <literal>open-hook</literal> <emphasis>regexp</emphasis> "<emphasis>command</emphasis>"
7833 The <emphasis>command</emphasis> is the command that can be used for
7835 folders whose names match <emphasis>regexp</emphasis>.
7839 The <emphasis>command</emphasis> string is the printf-like format
7841 should accept two parameters: %f, which is replaced with the
7842 (compressed) folder name, and %t which is replaced with the
7843 name of the temporary folder to which to write.
7847 %f and %t can be repeated any number of times in the
7848 command string, and all of the entries are replaced with the
7849 appropriate folder name. In addition, %% is replaced by
7850 %, as in printf, and any other %anything is left as is.
7854 The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis> remove the original compressed file.
7855 The <emphasis>command</emphasis> should return non-zero exit status
7857 mutt knows something's wrong.
7867 open-hook \\.gz$ "gzip -cd %f > %t"
7873 If the <emphasis>command</emphasis> is empty, this operation is
7874 disabled for this file
7880 <sect2 id="close-hook">
7881 <title>Write a compressed mailbox</title>
7885 Usage: <literal>close-hook</literal> <emphasis>regexp</emphasis>"<emphasis>command</emphasis>"
7890 This is used to close the folder that was open with the <link linkend="open-hook">
7893 command after some changes were made to it.
7897 The <emphasis>command</emphasis> string is the command that can be
7898 used for closing the
7899 folders whose names match <emphasis>regexp</emphasis>. It has the
7901 the <link linkend="open-hook">open-hook</link> command. Temporary
7903 in this case is the folder previously produced by the <<link linkend="open-hook">
7910 The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis> remove the decompressed file. The
7911 <emphasis>command</emphasis> should return non-zero exit status if it
7913 knows something's wrong.
7923 close-hook \\.gz$ "gzip -c %t > %f"</screen>
7928 If the <emphasis>command</emphasis> is empty, this operation is
7929 disabled for this file
7930 type, and the file can only be open in the readonly mode.
7934 <link linkend="close-hook">close-hook</link> is not called when you
7936 from the folder if the folder was not changed.
7941 <sect2 id="append-hook">
7942 <title>Append a message to a compressed mailbox</title>
7946 Usage: <literal>append-hook</literal> <emphasis>regexp</emphasis>"<emphasis>command</emphasis>"
7951 This command is used for saving to an existing compressed folder.
7952 The <emphasis>command</emphasis> is the command that can be used for
7954 folders whose names match <emphasis>regexp</emphasis>. It has the
7956 the <link linkend="open-hook">open-hook</link> command.
7957 The temporary folder in this case contains the messages that are
7962 The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis> remove the decompressed file. The
7963 <emphasis>command</emphasis> should return non-zero exit status if it
7965 knows something's wrong.
7975 append-hook \\.gz$ "gzip -c %t >> %f" </screen>
7980 When <link linkend="append-hook">append-hook</link> is used, the
7982 not opened, which saves time, but this means that we can not find out
7983 what the folder type is. Thus the default (<link linkend="mbox-type">
7986 )type is always supposed (i.e.
7987 this is the format used for the temporary folder).
7991 If the file does not exist when you save to it, <link linkend="close-hook">
7994 is called, and not <link linkend="append-hook">append-hook</link>. <link linkend="append-hook">
7998 for appending to existing folders.
8002 If the <emphasis>command</emphasis> is empty, this operation is
8003 disabled for this file
8004 type. In this case, the folder will be open and closed again (using
8005 <link linkend="open-hook">open-hook</link> and <link linkend="close-hook">
8008 respectively) each time you will add to it.
8014 <title>Encrypted folders</title>
8017 The compressed folders support can also be used to handle encrypted
8018 folders. If you want to encrypt a folder with PGP, you may want to
8019 usethe following hooks:
8025 open-hook \\.pgp$ "pgp -f < %f > %t"
8026 close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
8032 Please note, that PGP does not support appending to an encrypted
8033 folder, so there is no append-hook defined.
8037 <emphasis role="bold">Note:</emphasis> the folder is temporary stored
8038 decrypted in the /tmp
8039 directory, where it can be read by your system administrator. So
8040 thinkabout the security aspects of this.
8058 <title>Mutt-ng's MIME Support </title>
8061 Quite a bit of effort has been made to make Mutt-ng the premier text-mode
8062 MIME MUA. Every effort has been made to provide the functionality that
8063 the discerning MIME user requires, and the conformance to the standards
8064 wherever possible. When configuring Mutt-ng for MIME, there are two
8065 extratypes of configuration files which Mutt-ng uses. One is the
8066 <literal>mime.types</literal> file, which contains the mapping of file
8068 IANA MIME types. The other is the <literal>mailcap</literal> file, which
8070 the external commands to use for handling specific MIME types.
8074 <title>Using MIME in Mutt </title>
8077 There are three areas/menus in Mutt-ng which deal with MIME, they are
8079 pager (while viewing a message), the attachment menu and the compose
8084 <title>Viewing MIME messages in the pager</title>
8087 When you select a message from the index and view it in the pager,
8089 decodes the message to a text representation. Mutt-ng internally
8091 a number of MIME types, including <literal>text/plain, text/enriched,
8092 message/rfc822, and message/news
8094 .In addition, the export
8095 controlled version of Mutt-ng recognizes a variety of PGP MIME types,
8096 including PGP/MIME and application/pgp.
8100 Mutt-ng will denote attachments with a couple lines describing them.
8101 These lines are of the form:
8104 [-- Attachment #1: Description --]
8105 [-- Type: text/plain, Encoding: 7bit, Size: 10000 --]</screen>
8107 Where the <literal>Description</literal> is the description or
8108 filename given for the
8109 attachment, and the <literal>Encoding</literal> is one of
8110 <literal>7bit/8bit/quoted-printable/base64/binary</literal>.
8114 If Mutt-ng cannot deal with a MIME type, it will display a message
8118 [-- image/gif is unsupported (use 'v' to view this part) --]</screen>
8124 <sect2 id="attach-menu">
8125 <title>The Attachment Menu</title>
8128 The default binding for <literal>view-attachments</literal> is `v',
8130 attachment menu for a message. The attachment menu displays a list
8131 ofthe attachments in a message. From the attachment menu, you can
8133 print, pipe, delete, and view attachments. You can apply these
8134 operations to a group of attachments at once, by tagging the
8136 and by using the ``tag-prefix'' operator. You can also reply to the
8137 current message from this menu, and only the current attachment (or
8139 attachments tagged) will be quoted in your reply. You can view
8140 attachments as text, or view them using the mailcap viewer
8145 Finally, you can apply the usual message-related functions (like
8146 <link linkend="resend-message">resend-message</link>, and the reply
8147 and forward functions) to attachments of type <literal>message/rfc822</literal>.
8151 See the help on the attachment menu for more information.
8156 <sect2 id="compose-menu">
8157 <title>The Compose Menu</title>
8160 The compose menu is the menu you see before you send a message. It
8161 allows you to edit the recipient list, the subject, and other aspects
8162 of your message. It also contains a list of the attachments of your
8163 message, including the main body. From this menu, you can print,
8165 filter, pipe, edit, compose, review, and rename an attachment or a
8166 list of tagged attachments. You can also modifying the attachment
8167 information, notably the type, encoding and description.
8171 Attachments appear as follows:
8174 1 [text/plain, 7bit, 1K] /tmp/mutt-euler-8082-0 <no description>
8175 2 [applica/x-gunzip, base64, 422K] ~/src/mutt-0.85.tar.gz <no description></screen>
8180 The '-' denotes that Mutt-ng will delete the file after sending (or
8181 postponing, or canceling) the message. It can be toggled with the
8182 <literal>toggle-unlink</literal> command (default: u). The next
8184 content-type, and can be changed with the <literal>edit-type</literal> command
8185 (default: ˆT). The next field is the encoding for the
8187 which allows a binary message to be encoded for transmission on 7bit
8188 links. It can be changed with the <literal>edit-encoding</literal>
8190 (default: ˆE). The next field is the size of the attachment,
8191 rounded to kilobytes or megabytes. The next field is the filename,
8192 which can be changed with the <literal>rename-file</literal> command
8194 The final field is the description of the attachment, and can be
8195 changed with the <literal>edit-description</literal> command
8209 MIME Type configuration with <literal>mime.types</literal>
8213 When you add an attachment to your mail message, Mutt-ng searches your
8214 personal mime.types file at <literal>
8215 ${HOME}/.mime.types
8218 the system mime.types file at <literal>/usr/local/share/mutt/mime.types</literal> or
8219 <literal>/etc/mime.types</literal>
8223 The mime.types file consist of lines containing a MIME type and a space
8224 separated list of extensions. For example:
8227 application/postscript ps eps
8229 audio/x-aiff aif aifc aiff</screen>
8231 A sample <literal>mime.types</literal> file comes with the Mutt-ng
8233 should contain most of the MIME types you are likely to use.
8237 If Mutt-ng can not determine the mime type by the extension of the file
8239 attach, it will look at the file. If the file is free of binary
8240 information, Mutt-ng will assume that the file is plain text, and mark
8242 as <literal>text/plain</literal>. If the file contains binary
8243 information, then Mutt-ng will
8244 mark it as <literal>application/octet-stream</literal>. You can change
8246 type that Mutt-ng assigns to an attachment by using the <literal>
8249 command from the compose menu (default: ˆT). The MIME type is
8251 major mime type followed by the sub-type, separated by a '/'. 6 major
8252 types: application, text, image, video, audio, and model have been
8254 after various internet discussions. Mutt-ng recognises all of these if
8256 appropriate entry is found in the mime.types file. It also recognises
8258 major mime types, such as the chemical type that is widely used in the
8259 molecular modelling community to pass molecular data in various forms
8261 various molecular viewers. Non-recognised mime types should only be
8263 if the recipient of the message is likely to be expecting such
8275 MIME Viewer configuration with <literal>mailcap</literal>
8279 Mutt-ng supports RFC 1524 MIME Configuration, in particular the Unix
8280 specific format specified in Appendix A of RFC 1524. This file format
8281 is commonly referred to as the mailcap format. Many MIME compliant
8282 programs utilize the mailcap format, allowing you to specify handling
8283 for all MIME types in one place for all programs. Programs known to
8284 use this format include Netscape, XMosaic, lynx and metamail.
8288 In order to handle various MIME types that Mutt-ng can not handle
8289 internally, Mutt-ng parses a series of external configuration files to
8290 find an external handler. The default search string for these files
8291 is a colon delimited list set to
8294 ${HOME}/.mailcap:/usr/local/share/mutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap</screen>
8296 where <literal>$HOME</literal> is your home directory.
8300 In particular, the metamail distribution will install a mailcap file,
8301 usually as <literal>/usr/local/etc/mailcap</literal>, which contains
8307 <title>The Basics of the mailcap file</title>
8310 A mailcap file consists of a series of lines which are comments,
8316 A comment line consists of a # character followed by anything you
8321 A blank line is blank.
8325 A definition line consists of a content type, a view command, and any
8326 number of optional fields. Each field of a definition line is
8327 dividedby a semicolon ';' character.
8331 The content type is specified in the MIME standard type/subtype
8334 <literal>text/plain, text/html, image/gif, </literal>
8335 etc. In addition, the mailcap format includes two formats for
8336 wildcards, one using the special '*' subtype, the other is the
8338 wild, where you only include the major type. For example, <literal>
8342 <literal>video,</literal> will match all image types and video types,
8347 The view command is a Unix command for viewing the type specified.
8349 are two different types of commands supported. The default is to send
8350 the body of the MIME message to the command on stdin. You can change
8351 this behavior by using %s as a parameter to your view command.
8352 This will cause Mutt-ng to save the body of the MIME message to a
8354 file, and then call the view command with the %s replaced by
8355 the name of the temporary file. In both cases, Mutt-ng will turn over
8357 terminal to the view program until the program quits, at which time
8359 will remove the temporary file if it exists.
8363 So, in the simplest form, you can send a text/plain message to the
8364 external pager more on stdin:
8367 text/plain; more</screen>
8369 Or, you could send the message as a file:
8372 text/plain; more %s</screen>
8374 Perhaps you would like to use lynx to interactively view a text/html
8378 text/html; lynx %s</screen>
8380 In this case, lynx does not support viewing a file from stdin, so you
8381 must use the %s syntax.
8382 <emphasis role="bold">Note:</emphasis> <emphasis>Some older versions
8383 of lynx contain a bug where they
8384 will check the mailcap file for a viewer for text/html. They will
8386 the line which calls lynx, and run it. This causes lynx to
8388 spawn itself to view the object.
8393 On the other hand, maybe you don't want to use lynx interactively,
8394 youjust want to have it convert the text/html to text/plain, then you
8399 text/html; lynx -dump %s | more</screen>
8404 Perhaps you wish to use lynx to view text/html files, and a pager on
8405 all other text formats, then you would use the following:
8409 text/*; more</screen>
8411 This is the simplest form of a mailcap file.
8417 <title>Secure use of mailcap</title>
8420 The interpretation of shell meta-characters embedded in MIME
8422 can lead to security problems in general. Mutt-ng tries to quote
8424 in expansion of %s syntaxes properly, and avoids risky
8426 substituting them, see the <link linkend="mailcap-sanitize">
8433 Although mutt's procedures to invoke programs with mailcap seem to be
8434 safe, there are other applications parsing mailcap, maybe taking less
8436 of it. Therefore you should pay attention to the following rules:
8440 <emphasis>Keep the %-expandos away from shell quoting.</emphasis>
8441 Don't quote them with single or double quotes. Mutt-ng does this for
8442 you, the right way, as should any other program which interprets
8443 mailcap. Don't put them into backtick expansions. Be highly careful
8444 with eval statements, and avoid them if possible at all. Trying to
8446 broken behaviour with quotes introduces new leaks - there is no
8447 alternative to correct quoting in the first place.
8451 If you have to use the %-expandos' values in context where you
8453 quoting or backtick expansions, put that value into a shell variable
8454 and reference the shell variable where necessary, as in the following
8455 example (using <literal>$charset</literal> inside the backtick
8457 since it is not itself subject to any further expansion):
8463 text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \
8464 && test "`echo $charset | tr '[A-Z]' '[a-z]'`" != iso-8859-1</screen>
8471 <title>Advanced mailcap Usage</title>
8474 <title>Optional Fields</title>
8477 In addition to the required content-type and view command fields,
8479 can add semi-colon ';' separated fields to set flags and other
8481 Mutt-ng recognizes the following optional fields:
8485 <term>copiousoutput</term>
8488 This flag tells Mutt-ng that the command passes possibly
8490 text on stdout. This causes Mutt-ng to invoke a pager
8491 (either the internal
8492 pager or the external pager defined by the pager variable)
8494 of the view command. Without this flag, Mutt-ng assumes
8496 is interactive. One could use this to replace the pipe to <literal>
8499 in the <literal>lynx -dump</literal> example in the Basic
8503 text/html; lynx -dump %s ; copiousoutput</screen>
8505 This will cause lynx to format the text/html output as
8507 and Mutt-ng will use your standard pager to display the
8513 <term>needsterminal</term>
8516 Mutt-ng uses this flag when viewing attachments with <link linkend="auto-view">
8519 ,in order to decide whether it should honor the setting
8520 of the <link linkend="wait-key">wait-key</link> variable or
8521 not. When an attachment is viewed using an interactive
8523 corresponding mailcap entry has a <emphasis>needsterminal</emphasis> flag, Mutt-ng will use
8524 <link linkend="wait-key">wait-key</link> and the exit
8525 statusof the program to decide if it will ask you to press
8527 external program has exited. In all other situations it
8534 <term>compose=<command></term>
8537 This flag specifies the command to use to create a new
8539 specific MIME type. Mutt-ng supports this from the compose
8545 <term>composetyped=<command></term>
8548 This flag specifies the command to use to create a new
8550 specific MIME type. This command differs from the compose
8552 that mutt will expect standard MIME headers on the data.
8554 used to specify parameters, filename, description, etc. for
8556 attachment. Mutt-ng supports this from the compose menu.
8561 <term>print=<command></term>
8564 This flag specifies the command to use to print a specific
8566 Mutt-ng supports this from the attachment and compose
8572 <term>edit=<command></term>
8575 This flag specifies the command to use to edit a specific
8577 Mutt-ng supports this from the compose menu, and also uses
8579 new attachments. Mutt-ng will default to the defined
8586 <term>nametemplate=<template></term>
8589 This field specifies the format for the file denoted by
8591 command fields. Certain programs will require a certain
8593 for instance, to correctly view a file. For instance, lynx
8595 interpret a file as <literal>text/html</literal> if the
8596 file ends in <literal>.html</literal>.
8597 So, you would specify lynx as a <literal>text/html</literal> viewer with a line in
8598 the mailcap file like:
8601 text/html; lynx %s; nametemplate=%s.html</screen>
8607 <term>test=<command></term>
8610 This field specifies a command to run to test whether this
8612 entry should be used. The command is defined with the
8614 rules defined in the next section. If the command returns
8616 test passed, and Mutt-ng uses this entry. If the command
8618 then the test failed, and Mutt-ng continues searching for
8620 <emphasis role="bold">Note:</emphasis> <emphasis>the
8621 content-type must match before Mutt-ng performs the test.
8626 text/html; netscape -remote 'openURL(%s)' ; test=RunningX
8627 text/html; lynx %s</screen>
8629 In this example, Mutt-ng will run the program RunningX
8631 if the X Window manager is running, and non-zero if it
8633 RunningX returns 0, then Mutt-ng will call netscape to
8635 text/html object. If RunningX doesn't return 0, then
8637 to the next entry and use lynx to display the text/html
8648 <title>Search Order</title>
8651 When searching for an entry in the mailcap file, Mutt-ng will
8653 the most useful entry for its purpose. For instance, if you are
8654 attempting to print an <literal>image/gif</literal>, and you have
8656 entries in your mailcap file, Mutt-ng will search for an entry with
8662 image/gif; ; print= anytopnm %s | pnmtops | lpr; \
8663 nametemplate=%s.gif</screen>
8665 Mutt-ng will skip the <literal>image/*</literal> entry and use the <literal>
8668 entry with the print command.
8672 In addition, you can use this with <link linkend="auto-view">
8675 to denote two commands for viewing an attachment, one to be viewed
8676 automatically, the other to be viewed interactively from the
8678 menu. In addition, you can then use the test feature to determine
8680 viewer to use interactively depending on your environment.
8683 text/html; netscape -remote 'openURL(%s)' ; test=RunningX
8684 text/html; lynx %s; nametemplate=%s.html
8685 text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput</screen>
8687 For <link linkend="auto-view">auto-view</link>, Mutt-ng will choose
8689 entry because of the copiousoutput tag. For interactive viewing,
8691 will run the program RunningX to determine if it should use the
8693 entry. If the program returns non-zero, Mutt-ng will use the
8695 for interactive viewing.
8701 <title>Command Expansion</title>
8704 The various commands defined in the mailcap files are passed to the
8705 <literal>/bin/sh</literal> shell using the system() function.
8707 command is passed to <literal>/bin/sh -c</literal>, it is parsed to
8709 various special parameters with information from Mutt-ng. The
8711 Mutt-ng expands are:
8715 <term>%s</term>
8718 As seen in the basic mailcap section, this variable is
8720 to a filename specified by the calling program. This file
8722 the body of the message to view/print/edit or where the
8724 program should place the results of composition. In
8726 use of this keyword causes Mutt-ng to not pass the body of
8728 to the view/print/edit program on stdin.
8733 <term>%t</term>
8736 Mutt-ng will expand %t to the text representation of
8738 type of the message in the same form as the first parameter
8740 mailcap definition line, ie <literal>text/html</literal> or
8741 <literal>image/gif</literal>.
8746 <term>%{<parameter>}</term>
8749 Mutt-ng will expand this to the value of the specified
8751 from the Content-Type: line of the mail message. For
8753 Your mail message contains:
8756 Content-Type: text/plain; charset=iso-8859-1</screen>
8758 then Mutt-ng will expand %{charset} to
8759 iso-8859-1. The default metamail
8760 mailcap file uses this feature to test the charset to spawn
8762 using the right charset to view the message.
8767 <term>\%</term>
8770 This will be replaced by a %
8775 Mutt-ng does not currently support the %F and %n
8777 specified in RFC 1524. The main purpose of these parameters is for
8778 multipart messages, which is handled internally by Mutt-ng.
8786 <title>Example mailcap files</title>
8789 This mailcap file is fairly simple and standard:
8792 # I'm always running X :)
8793 video/*; xanim %s > /dev/null
8794 image/*; xv %s > /dev/null
8796 # I'm always running netscape (if my computer had more memory, maybe)
8797 text/html; netscape -remote 'openURL(%s)'</screen>
8802 This mailcap file shows quite a number of examples:
8808 # Use xanim to view all videos Xanim produces a header on startup,
8809 # send that to /dev/null so I don't see it
8810 video/*; xanim %s > /dev/null
8812 # Send html to a running netscape by remote
8813 text/html; netscape -remote 'openURL(%s)'; test=RunningNetscape
8814 # If I'm not running netscape but I am running X, start netscape on the
8816 text/html; netscape %s; test=RunningX
8818 # Else use lynx to view it as text
8821 # This version would convert the text/html to text/plain
8822 text/html; lynx -dump %s; copiousoutput
8824 # I use enscript to print text in two columns to a page
8825 text/*; more %s; print=enscript -2Gr %s
8827 # Netscape adds a flag to tell itself to view jpegs internally
8828 image/jpeg;xv %s; x-mozilla-flags=internal
8830 # Use xv to view images if I'm running X
8831 # In addition, this uses the \ to extend the line and set my editor
8833 image/*;xv %s; test=RunningX; edit=xpaint %s
8835 # Convert images to text using the netpbm tools
8836 image/*; (anytopnm %s | pnmscale -xysize 80 46 | ppmtopgm | pgmtopbm |
8837 pbmtoascii -1x2 ) 2>&1 ; copiousoutput
8839 # Send excel spreadsheets to my NT box
8840 application/ms-excel; open.pl %s</screen>
8852 <sect1 id="auto-view">
8853 <title>MIME Autoview </title>
8856 In addition to explicitly telling Mutt-ng to view an attachment with
8857 theMIME viewer defined in the mailcap file, Mutt-ng has support for
8858 automatically viewing MIME attachments while in the pager.
8862 To work, you must define a viewer in the mailcap file which uses the
8863 <literal>copiousoutput</literal> option to denote that it is
8865 Usually, you also use the entry to convert the attachment to a text
8866 representation which you can view in the pager.
8870 You then use the <literal>auto_view</literal> muttrc command to
8872 content-types that you wish to view automatically.
8876 For instance, if you set auto_view to:
8879 auto_view text/html application/x-gunzip application/postscript
8880 image/gif application/x-tar-gz</screen>
8885 Mutt-ng could use the following mailcap entries to automatically view
8886 attachments of these types.
8889 text/html; lynx -dump %s; copiousoutput; nametemplate=%s.html
8890 image/*; anytopnm %s | pnmscale -xsize 80 -ysize 50 | ppmtopgm | pgmtopbm | pbmtoascii ; copiousoutput
8891 application/x-gunzip; gzcat; copiousoutput
8892 application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput
8893 application/postscript; ps2ascii %s; copiousoutput</screen>
8898 ``unauto_view'' can be used to remove previous entries from the
8900 This can be used with message-hook to autoview messages based on size,
8902 ``unauto_view *'' will remove all previous entries.
8911 <sect1 id="alternative-order">
8912 <title>MIME Multipart/Alternative </title>
8915 Mutt-ng has some heuristics for determining which attachment of a
8916 multipart/alternative type to display. First, mutt will check the
8917 alternative_order list to determine if one of the available
8918 typesis preferred. The alternative_order list consists of a
8920 MIME types in order, including support for implicit and explicit
8921 wildcards, for example:
8924 alternative_order text/enriched text/plain text
8925 application/postscript image/*</screen>
8930 Next, mutt will check if any of the types have a defined
8931 <link linkend="auto-view">auto-view</link>, and use that. Failing
8932 that, Mutt-ng will look for any text type. As a last attempt, mutt
8933 willlook for any type it knows how to handle.
8937 To remove a MIME type from the <literal>alternative_order</literal> list, use the
8938 <literal>unalternative_order</literal> command.
8947 <sect1 id="mime-lookup">
8948 <title>MIME Lookup </title>
8951 Mutt-ng's mime_lookup list specifies a list of mime-types that
8953 be treated according to their mailcap entry. This option is designed
8954 todeal with binary types such as application/octet-stream. When an
8956 mime-type is listed in mime_lookup, then the extension of the
8958 be compared to the list of extensions in the mime.types file. The
8960 associated with this extension will then be used to process the
8962 according to the rules in the mailcap file and according to any other
8964 options (such as auto_view) specified. Common usage would be:
8967 mime_lookup application/octet-stream application/X-Lotus-Manuscript</screen>
8972 In addition, the unmime_lookup command may be used to disable
8974 for any particular mime-type if it had been set, for example, in a
8992 <title>Security Considerations </title>
8995 First of all, mutt-ng contains no security holes included by
8996 intention but may contain unknown security holes. As a consequence,
8997 please run mutt-ng only with as few permissions as possible.
9001 Please do not run mutt-ng as the super user.
9005 When configuring mutt-ng, there're some points to note about secure
9010 In practice, mutt-ng can be easily made as vulnerable as even the
9011 most insecure mail user agents (in their default configuration) just
9012 by changing mutt-ng's configuration files: it then can execute
9013 arbitrary programs and scripts attached to messages, send out private
9014 data on its own, etc. Although this is not believed to the common type
9015 of setup, please read this chapter carefully.
9019 <title>Passwords </title>
9022 Although mutt-ng can be told the various passwords for accounts,
9023 please never store passwords in configuration files. Besides the
9024 fact that the system's operator can always read them, you could
9025 forget to replace the actual password with asterisks when reporting
9026 a bug or asking for help via, for example, a mailing list so that
9027 your mail including your password could be archived by internet
9028 search engines, etc. Please never store passwords on disk.
9034 <title>Temporary Files </title>
9037 Mutt-ng uses many temporary files for viewing messages, verifying
9038 digital signatures, etc. The <link linkend="umask">umask</link>
9039 variable can be used to change the default permissions of these
9040 files. Please only change it if you really know what you are doing.
9041 Also, a different location for these files may be desired which can
9042 be changed via the <link linkend="tmpdir">tmpdir</link> variable.
9048 <title>Information Leaks </title>
9051 <title>Message-ID: headers </title>
9054 In the default configuration, mutt-ng will leak some information
9055 to the outside world when sending messages: the generation of
9056 <literal>Message-ID:</literal> headers includes a step counter which
9058 (and rotated) with every message sent. If you'd like to hide this
9059 information probably telling others how many mail you sent in which
9060 time, you at least need to remove the <literal>%P</literal>
9062 default setting of the <link linkend="msgid-format">msgid-format</link> variable. Please make sure that
9063 you really know how local parts of these <literal>Message-ID:</literal> headers
9070 <title>mailto:-style links </title>
9073 As mutt-ng be can be set up to be the mail client to handle
9074 <literal>mailto:</literal> style links in websites, there're security
9075 considerations, too. To keep the old behavior by default, mutt-ng
9076 will be strict in interpreting them which means that arbitrary
9077 header fields can be embedded in these links which could override
9078 existing header fields or attach arbitrary files. This may be
9079 problematic if the <link linkend="edit-headers">edit-headers</link>
9080 variable is <emphasis>unset</emphasis>, i.e. the
9081 user doesn't want to see header fields while editing the message.
9085 For example, following a link like
9091 mailto:joe@host?Attach=~/.gnupg/secring.gpg</screen>
9096 will send out the user's private gnupg keyring to <literal>joe@host</literal> if
9097 the user doesn't follow the information on screen carefully
9102 When <emphasis>unsetting</emphasis> the <link linkend="strict-mailto">
9105 variable, mutt-ng will
9114 be less strict when interpreting these links by
9115 prepending a <literal>X-Mailto-</literal> string to all header
9117 embedded in such a link <emphasis>and</emphasis>
9124 turn on the <link linkend="edit-headers">edit-headers</link>
9126 force to let the user see all the headers
9127 (because they still may leak information.)
9141 <title>External applications </title>
9144 Mutt-ng in many places has to rely on external applications or
9145 for convenience supports mechanisms involving external
9150 <title>mailcap </title>
9153 One of these is the <literal>mailcap</literal> mechanism as defined
9155 1524. Mutt-ng can be set up to <emphasis>automatically</emphasis>
9157 given utility as listed in one of the mailcap files (see the
9158 <link linkend="mailcap-path">mailcap-path</link>
9159 variable for details.)
9163 These utilities may have a variety of security vulnerabilities,
9164 including overwriting of arbitrary files, information leaks or
9165 other exploitable bugs. These vulnerabilities may go unnoticed by
9166 the user, especially when they are called automatically (and
9167 without interactive prompting) from the mailcap file(s). When
9168 using mutt-ng's autoview mechanism in combination with mailcap
9169 files, please be sure to...
9178 manually select trustworth applications with a reasonable
9186 periodically check the contents of mailcap files,
9187 especially after software installations or upgrades
9194 keep the software packages referenced in the mailcap file up to
9202 leave the <link linkend="mailcap-sanitize">mailcap-sanitize</link> variable in its default
9203 state to restrict mailcap expandos to a safe set of characters
9215 <title>Other </title>
9218 Besides the mailcap mechanism, mutt-ng uses a number of other
9219 external utilities for operation.
9223 The same security considerations apply for these as for tools
9224 involved via mailcap (for example, mutt-ng is vulnerable to Denial
9225 of Service Attacks with compressed folders support if the
9226 uncompressed mailbox is too large for the disk it is saved to.)
9230 As already noted, most of these problems are not built in but
9231 caused by wrong configuration, so please check your configuration.
9241 <title>Reference </title>
9243 <sect1 id="commandline">
9244 <title>Command line options </title>
9247 Running <literal>mutt</literal> with no arguments will make Mutt-ng
9248 attempt to read your spool
9249 mailbox. However, it is possible to read other mailboxes and
9250 to send messages from the command line as well.
9256 <title>Mutt-NG Command Line Options</title>
9257 <tgroup cols="2" align="left" colsep="1" rowsep="1">
9260 <entry>Option</entry>
9261 <entry>Description</entry>
9265 <row><entry><literal>-A </literal></entry><entry>expand an alias</entry></row>
9266 <row><entry><literal>-a </literal></entry><entry>attach a file to a message</entry></row>
9267 <row><entry><literal>-b </literal></entry><entry>specify a blind carbon-copy (BCC) address</entry></row>
9268 <row><entry><literal>-c </literal></entry><entry>specify a carbon-copy (Cc) address</entry></row>
9269 <row><entry><literal>-e </literal></entry><entry>specify a config command to be run after initialization files are read</entry></row>
9270 <row><entry><literal>-f </literal></entry><entry>specify a mailbox to load</entry></row>
9271 <row><entry><literal>-F </literal></entry><entry>specify an alternate file to read initialization commands</entry></row>
9272 <row><entry><literal>-h </literal></entry><entry>print help on command line options</entry></row>
9273 <row><entry><literal>-H </literal></entry><entry>specify a draft file from which to read a header and body</entry></row>
9274 <row><entry><literal>-i </literal></entry><entry>specify a file to include in a message composition</entry></row>
9275 <row><entry><literal>-m </literal></entry><entry>specify a default mailbox type</entry></row>
9276 <row><entry><literal>-n </literal></entry><entry>do not read the system Muttngrc</entry></row>
9277 <row><entry><literal>-p </literal></entry><entry>recall a postponed message</entry></row>
9278 <row><entry><literal>-Q </literal></entry><entry>query a configuration variable</entry></row>
9279 <row><entry><literal>-R </literal></entry><entry>open mailbox in read-only mode</entry></row>
9280 <row><entry><literal>-s </literal></entry><entry>specify a subject (enclose in quotes if it contains spaces)</entry></row>
9281 <row><entry><literal>-t </literal></entry><entry>dump the value of all variables to stdout</entry></row>
9282 <row><entry><literal>-T </literal></entry><entry>dump the value of all changed variables to stdout</entry></row>
9283 <row><entry><literal>-v </literal></entry><entry>show version number and compile-time definitions</entry></row>
9284 <row><entry><literal>-x </literal></entry><entry>simulate the mailx(1) compose mode</entry></row>
9285 <row><entry><literal>-y </literal></entry><entry>show a menu containing the files specified by the mailboxes command</entry></row>
9286 <row><entry><literal>-z </literal></entry><entry>exit immediately if there are no messages in the mailbox</entry></row>
9287 <row><entry><literal>-Z </literal></entry><entry>open the first folder with new message,exit immediately if none</entry></row>
9295 To read messages in a mailbox
9299 <literal>mutt</literal> [ -nz ] [ -F <emphasis>muttrc</emphasis> ] [ -m <emphasis>
9302 ] [ -f <emphasis>mailbox</emphasis> ]
9306 To compose a new message
9310 <literal>mutt</literal> [ -n ] [ -F <emphasis>muttrc</emphasis> ] [ -a <emphasis>
9313 ] [ -c <emphasis>address</emphasis> ] [ -i <emphasis>
9316 ] [ -s <emphasis>subject</emphasis> ] <emphasis>address</emphasis> [ <emphasis>
9323 Mutt-ng also supports a ``batch'' mode to send prepared messages.
9325 input from the file you wish to send. For example,
9329 <literal>mutt -s "data set for run #2"
9330 professor@bigschool.edu
9331 < ˜/run2.dat
9336 This command will send a message to ``professor@bigschool.edu'' with a
9338 of ``data set for run #2''. In the body of the message will be the
9340 of the file ``˜/run2.dat''.
9349 <sect1 id="patterns">
9350 <title>Patterns </title>
9355 <title>Patterns</title>
9356 <tgroup cols="2" align="left" colsep="1" rowsep="1">
9359 <entry>Pattern Modifier</entry>
9360 <entry>Argument</entry>
9361 <entry>Description</entry>
9365 <row><entry><literal>~A </literal></entry><entry><literal></literal></entry><entry>all messages</entry></row>
9366 <row><entry><literal>~b </literal></entry><entry><literal>EXPR </literal></entry><entry>messages which contain EXPR in the message body</entry></row>
9367 <row><entry><literal>~B </literal></entry><entry><literal>EXPR </literal></entry><entry>messages which contain EXPR in the whole message</entry></row>
9368 <row><entry><literal>~c </literal></entry><entry><literal>EXPR </literal></entry><entry>messages carbon-copied to EXPR</entry></row>
9369 <row><entry><literal>~C </literal></entry><entry><literal>EXPR </literal></entry><entry>message is either to: or cc: EXPR</entry></row>
9370 <row><entry><literal>~D </literal></entry><entry><literal></literal></entry><entry>deleted messages</entry></row>
9371 <row><entry><literal>~d </literal></entry><entry><literal>[MIN]-[MAX] </literal></entry><entry>messages with ``date-sent'' in a Date range</entry></row>
9372 <row><entry><literal>~E </literal></entry><entry><literal></literal></entry><entry>expired messages</entry></row>
9373 <row><entry><literal>~e </literal></entry><entry><literal>EXPR </literal></entry><entry>message which contains EXPR in the ``Sender'' field</entry></row>
9374 <row><entry><literal>~F </literal></entry><entry><literal></literal></entry><entry>flagged messages</entry></row>
9375 <row><entry><literal>~f </literal></entry><entry><literal>EXPR </literal></entry><entry>messages originating from EXPR</entry></row>
9376 <row><entry><literal>~g </literal></entry><entry><literal></literal></entry><entry>cryptographically signed messages</entry></row>
9377 <row><entry><literal>~G </literal></entry><entry><literal></literal></entry><entry>cryptographically encrypted messages</entry></row>
9378 <row><entry><literal>~H </literal></entry><entry><literal>EXPR </literal></entry><entry>messages with a spam attribute matching EXPR</entry></row>
9379 <row><entry><literal>~h </literal></entry><entry><literal>EXPR </literal></entry><entry>messages which contain EXPR in the message header</entry></row>
9380 <row><entry><literal>~k </literal></entry><entry><literal></literal></entry><entry>message contains PGP key material</entry></row>
9381 <row><entry><literal>~i </literal></entry><entry><literal>EXPR </literal></entry><entry>message which match ID in the ``Message-ID'' field</entry></row>
9382 <row><entry><literal>~L </literal></entry><entry><literal>EXPR </literal></entry><entry>message is either originated or received by EXPR</entry></row>
9383 <row><entry><literal>~l </literal></entry><entry><literal></literal></entry><entry>message is addressed to a known mailing list</entry></row>
9384 <row><entry><literal>~m </literal></entry><entry><literal>[MIN]-[MAX] </literal></entry><entry>message in the range MIN to MAX *)</entry></row>
9385 <row><entry><literal>~M </literal></entry><entry><literal></literal></entry><entry>multipart messages</entry></row>
9386 <row><entry><literal>~n </literal></entry><entry><literal>[MIN]-[MAX] </literal></entry><entry>messages with a score in the range MIN to MAX *)</entry></row>
9387 <row><entry><literal>~N </literal></entry><entry><literal></literal></entry><entry>new messages</entry></row>
9388 <row><entry><literal>~O </literal></entry><entry><literal></literal></entry><entry>old messages</entry></row>
9389 <row><entry><literal>~p </literal></entry><entry><literal></literal></entry><entry>message is addressed to you (consults alternates)</entry></row>
9390 <row><entry><literal>~P </literal></entry><entry><literal></literal></entry><entry>message is from you (consults alternates)</entry></row>
9391 <row><entry><literal>~Q </literal></entry><entry><literal></literal></entry><entry>messages which have been replied to</entry></row>
9392 <row><entry><literal>~R </literal></entry><entry><literal></literal></entry><entry>read messages</entry></row>
9393 <row><entry><literal>~r </literal></entry><entry><literal>[MIN]-[MAX] </literal></entry><entry>messages with ``date-received'' in a Date range</entry></row>
9394 <row><entry><literal>~S </literal></entry><entry><literal></literal></entry><entry>superseded messages</entry></row>
9395 <row><entry><literal>~s </literal></entry><entry><literal>EXPR </literal></entry><entry>messages having EXPR in the ``Subject'' field.</entry></row>
9396 <row><entry><literal>~T </literal></entry><entry><literal></literal></entry><entry>tagged messages</entry></row>
9397 <row><entry><literal>~t </literal></entry><entry><literal>EXPR </literal></entry><entry>messages addressed to EXPR</entry></row>
9398 <row><entry><literal>~U </literal></entry><entry><literal></literal></entry><entry>unread messages</entry></row>
9399 <row><entry><literal>~u </literal></entry><entry><literal></literal></entry><entry>message is addressed to a subscribed mailing list</entry></row>
9400 <row><entry><literal>~v </literal></entry><entry><literal></literal></entry><entry>message is part of a collapsed thread.</entry></row>
9401 <row><entry><literal>~V </literal></entry><entry><literal></literal></entry><entry>cryptographically verified messages</entry></row>
9402 <row><entry><literal>~w </literal></entry><entry><literal>EXPR </literal></entry><entry>messages which contain EXPR in the `Newsgroups' field (if compiled with NNTP support)</entry></row>
9403 <row><entry><literal>~x </literal></entry><entry><literal>EXPR </literal></entry><entry>messages which contain EXPR in the `References' field</entry></row>
9404 <row><entry><literal>~y </literal></entry><entry><literal>EXPR </literal></entry><entry>messages which contain EXPR in the `X-Label' field</entry></row>
9405 <row><entry><literal>~z </literal></entry><entry><literal>[MIN]-[MAX] </literal></entry><entry>messages with a size in the range MIN to MAX *)</entry></row>
9406 <row><entry><literal>~= </literal></entry><entry><literal></literal></entry><entry>duplicated messages (see $duplicate_threads)</entry></row>
9407 <row><entry><literal>~$ </literal></entry><entry><literal></literal></entry><entry>unreferenced messages (requires threaded view)</entry></row>
9408 <row><entry><literal>~* </literal></entry><entry><literal></literal></entry><entry>``From'' contains realname and (syntactically) valid address (excluded are addresses matching against alternates or any alias)</entry></row>
9416 <link linkend="regexp">regexp</link>. Special attention has to be
9417 made when using regular expressions inside of patterns. Specifically,
9418 Mutt-ng's parser for these patterns will strip one level of backslash
9420 which is normally used for quoting. If it is your intention to use a
9421 backslash in the regular expression, you will need to use two
9427 *) The forms <literal><[MAX]</literal>, <literal>
9431 <literal>[MIN]-</literal> and <literal>-[MAX]</literal>
9441 <sect1 id="commands">
9442 <title>Configuration Commands </title>
9445 The following are the commands understood by mutt.
9455 <link linkend="account-hook">account-hook</link>
9457 <emphasis>pattern</emphasis> <emphasis>command</emphasis>
9464 <link linkend="alias">alias</link>
9466 <emphasis>key</emphasis> <emphasis>address</emphasis> [ , <emphasis>
9476 <link linkend="alias">alias</link>
9478 [ * | <emphasis>key</emphasis> ... ]
9485 <link linkend="alternates">alternates</link>
9487 <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis>
9495 <link linkend="alternates">alternates</link>
9497 [ * | <emphasis>regexp</emphasis> ... ]
9504 <link linkend="alternative-order">alternative-order</link>
9506 <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
9513 <link linkend="alternative-order">alternative-order</link>
9515 <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
9522 <link linkend="append-hook">append-hook</link>
9524 <emphasis>regexp</emphasis> <emphasis>command</emphasis>
9531 <link linkend="auto-view">auto-view</link>
9533 <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
9540 <link linkend="auto-view">auto-view</link>
9542 <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
9549 <link linkend="bind">bind</link>
9551 <emphasis>map</emphasis> <emphasis>key</emphasis> <emphasis>
9560 <link linkend="charset-hook">charset-hook</link>
9562 <emphasis>alias</emphasis> <emphasis>charset</emphasis>
9569 <link linkend="close-hook">close-hook</link>
9571 <emphasis>regexp</emphasis> <emphasis>command</emphasis>
9578 <link linkend="color">color</link>
9580 <emphasis>object</emphasis> <emphasis>foreground</emphasis> <emphasis>
9583 [ <emphasis>regexp</emphasis> ]
9590 <link linkend="color">color</link>
9592 <emphasis>index</emphasis> <emphasis>pattern</emphasis> [ <emphasis>
9602 <link linkend="exec">exec</link>
9604 <emphasis>function</emphasis> [ <emphasis>function</emphasis> ... ]
9611 <link linkend="fcc-hook">fcc-hook</link>
9613 <emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
9620 <link linkend="fcc-save-hook">fcc-save-hook</link>
9622 <emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
9629 <link linkend="folder-hook">folder-hook</link>
9631 <emphasis>pattern</emphasis> <emphasis>command</emphasis>
9638 <link linkend="hdr-order">hdr-order</link>
9640 <emphasis>header</emphasis> [ <emphasis>header</emphasis>
9648 <link linkend="hdr-order">hdr-order</link>
9650 <emphasis>header</emphasis> [ <emphasis>header</emphasis>
9658 <link linkend="charset-hook">charset-hook</link>
9660 <emphasis>charset</emphasis> <emphasis>local-charset</emphasis>
9667 <link linkend="ignore">ignore</link>
9669 <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis>
9677 <link linkend="ignore">ignore</link>
9679 <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis>
9687 <link linkend="lists">lists</link>
9689 <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis>
9697 <link linkend="lists">lists</link>
9699 <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis>
9707 <link linkend="macro">macro</link>
9709 <emphasis>menu</emphasis> <emphasis>key</emphasis> <emphasis>
9712 [ <emphasis>description</emphasis> ]
9719 <link linkend="mailboxes">mailboxes</link>
9721 <emphasis>filename</emphasis> [ <emphasis>filename</emphasis> ... ]
9728 <link linkend="mbox-hook">mbox-hook</link>
9730 <emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
9737 <link linkend="message-hook">message-hook</link>
9739 <emphasis>pattern</emphasis> <emphasis>command</emphasis>
9746 <link linkend="mime-lookup">mime-lookup</link>
9748 <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
9755 <link linkend="mime-lookup">mime-lookup</link>
9757 <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
9764 <link linkend="color">color</link>
9766 <emphasis>object attribute</emphasis> [ <emphasis>regexp</emphasis> ]
9773 <link linkend="color">color</link>
9775 <emphasis>index</emphasis> <emphasis>pattern</emphasis> [ <emphasis>
9785 <link linkend="my-hdr">my-hdr</link>
9787 <emphasis>string</emphasis>
9794 <link linkend="my-hdr">my-hdr</link>
9796 <emphasis>field</emphasis> [ <emphasis>field</emphasis> ...
9804 <link linkend="open-hook">open-hook</link>
9806 <emphasis>regexp</emphasis> <emphasis>command</emphasis>
9813 <link linkend="crypt-hook">crypt-hook</link>
9815 <emphasis>pattern</emphasis> <emphasis>key-id</emphasis>
9822 <link linkend="push">push</link>
9824 <emphasis>string</emphasis>
9831 <link linkend="set">set</link>
9833 <emphasis>variable</emphasis> [<emphasis>variable</emphasis>
9841 <link linkend="save-hook">save-hook</link>
9843 <emphasis>regexp</emphasis> <emphasis>filename</emphasis>
9850 <link linkend="score-command">score-command</link>
9852 <emphasis>pattern</emphasis> <emphasis>value</emphasis>
9859 <link linkend="score-command">score-command</link>
9861 <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis>
9869 <link linkend="send-hook">send-hook</link>
9871 <emphasis>regexp</emphasis> <emphasis>command</emphasis>
9878 <link linkend="reply-hook">reply-hook</link>
9880 <emphasis>regexp</emphasis> <emphasis>command</emphasis>
9887 <link linkend="set">set</link>
9889 [no|inv]<emphasis>variable</emphasis>[=<emphasis>
9892 ] [ <emphasis>variable</emphasis> ... ]
9899 <link linkend="set">set</link>
9901 <emphasis>variable</emphasis> [<emphasis>variable</emphasis>
9909 <link linkend="source">source</link>
9911 <emphasis>filename</emphasis>
9918 <link linkend="spam">spam</link>
9920 <emphasis>pattern</emphasis> <emphasis>format</emphasis>
9927 <link linkend="spam">spam</link>
9929 <emphasis>pattern</emphasis>
9936 <link linkend="lists">lists</link>
9938 <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis>
9946 <link linkend="lists">lists</link>
9948 <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis>
9956 <link linkend="set">set</link>
9958 <emphasis>variable</emphasis> [<emphasis>variable</emphasis>
9966 <link linkend="unhook">unhook</link>
9968 <emphasis>hook-type</emphasis>
9978 <sect1 id="variables">
9979 <title>Configuration variables</title>
9982 The following list contains all variables which, in the process of
9983 providing more consistency, have been renamed and are partially even
9984 removed already. The left column contains the old synonym variables,
9985 the right column the full/new name:
9989 <anchor id="sect-obsolete"/>
9992 <title>Obsolete Variables</title>
9993 <tgroup cols="2" align="left" colsep="1" rowsep="1">
9996 <entry>Old Name</entry>
9997 <entry>New Name</entry>
10001 <row><entry><literal>edit_hdrs</literal></entry><entry><literal>edit_headers</literal></entry></row>
10002 <row><entry><literal>forw_decode</literal></entry><entry><literal>forward_decode</literal></entry></row>
10003 <row><entry><literal>forw_format</literal></entry><entry><literal>forward_format</literal></entry></row>
10004 <row><entry><literal>forw_quote</literal></entry><entry><literal>forward_quote</literal></entry></row>
10005 <row><entry><literal>hdr_format</literal></entry><entry><literal>index_format</literal></entry></row>
10006 <row><entry><literal>indent_str</literal></entry><entry><literal>indent_string</literal></entry></row>
10007 <row><entry><literal>mime_fwd</literal></entry><entry><literal>mime_forward</literal></entry></row>
10008 <row><entry><literal>msg_format</literal></entry><entry><literal>message_format</literal></entry></row>
10009 <row><entry><literal>pgp_autosign</literal></entry><entry><literal>crypt_autosign</literal></entry></row>
10010 <row><entry><literal>pgp_autoencrypt</literal></entry><entry><literal>crypt_autoencrypt</literal></entry></row>
10011 <row><entry><literal>pgp_replyencrypt</literal></entry><entry><literal>crypt_replyencrypt</literal></entry></row>
10012 <row><entry><literal>pgp_replysign</literal></entry><entry><literal>crypt_replysign</literal></entry></row>
10013 <row><entry><literal>pgp_replysignencrypted</literal></entry><entry><literal>crypt_replysignencrypted</literal></entry></row>
10014 <row><entry><literal>pgp_verify_sig</literal></entry><entry><literal>crypt_verify_sig</literal></entry></row>
10015 <row><entry><literal>pgp_create_traditional</literal></entry><entry><literal>pgp_autoinline</literal></entry></row>
10016 <row><entry><literal>pgp_auto_traditional</literal></entry><entry><literal>pgp_replyinline</literal></entry></row>
10017 <row><entry><literal>forw_decrypt</literal></entry><entry><literal>forward_decrypt</literal></entry></row>
10018 <row><entry><literal>smime_sign_as</literal></entry><entry><literal>smime_default_key</literal></entry></row>
10019 <row><entry><literal>post_indent_str</literal></entry><entry><literal>post_indent_string</literal></entry></row>
10020 <row><entry><literal>print_cmd</literal></entry><entry><literal>print_command</literal></entry></row>
10021 <row><entry><literal>shorten_hierarchy</literal></entry><entry><literal>sidebar_shorten_hierarchy</literal></entry></row>
10022 <row><entry><literal>ask_followup_to</literal></entry><entry><literal>nntp_ask_followup_to</literal></entry></row>
10023 <row><entry><literal>ask_x_comment_to</literal></entry><entry><literal>nntp_ask_x_comment_to</literal></entry></row>
10024 <row><entry><literal>catchup_newsgroup</literal></entry><entry><literal>nntp_catchup</literal></entry></row>
10025 <row><entry><literal>followup_to_poster</literal></entry><entry><literal>nntp_followup_to_poster</literal></entry></row>
10026 <row><entry><literal>group_index_format</literal></entry><entry><literal>nntp_group_index_format</literal></entry></row>
10027 <row><entry><literal>inews</literal></entry><entry><literal>nntp_inews</literal></entry></row>
10028 <row><entry><literal>mime_subject</literal></entry><entry><literal>nntp_mime_subject</literal></entry></row>
10029 <row><entry><literal>news_cache_dir</literal></entry><entry><literal>nntp_cache_dir</literal></entry></row>
10030 <row><entry><literal>news_server</literal></entry><entry><literal>nntp_host</literal></entry></row>
10031 <row><entry><literal>newsrc</literal></entry><entry><literal>nntp_newsrc</literal></entry></row>
10032 <row><entry><literal>nntp_poll</literal></entry><entry><literal>nntp_mail_check</literal></entry></row>
10033 <row><entry><literal>pop_checkinterval</literal></entry><entry><literal>pop_mail_check</literal></entry></row>
10034 <row><entry><literal>post_moderated</literal></entry><entry><literal>nntp_post_moderated</literal></entry></row>
10035 <row><entry><literal>save_unsubscribed</literal></entry><entry><literal>nntp_save_unsubscribed</literal></entry></row>
10036 <row><entry><literal>show_new_news</literal></entry><entry><literal>nntp_show_new_news</literal></entry></row>
10037 <row><entry><literal>show_only_unread</literal></entry><entry><literal>nntp_show_only_unread</literal></entry></row>
10038 <row><entry><literal>x_comment_to</literal></entry><entry><literal>nntp_x_comment_to</literal></entry></row>
10039 <row><entry><literal>smtp_auth_username</literal></entry><entry><literal>smtp_user</literal></entry></row>
10040 <row><entry><literal>smtp_auth_password</literal></entry><entry><literal>smtp_pass</literal></entry></row>
10041 <row><entry><literal>user_agent</literal></entry><entry><literal>agent_string</literal></entry></row>
10049 The <literal>contrib</literal> subdirectory contains a script named
10050 <literal>update-config.pl</literal> which eases migration.
10054 A complete list of current variables follows.