1 <?xml version="1.0" encoding="utf-8"?>
2 <!-- THIS FILE IST NOT VALID DOCBOOK ! DTD REMOVED -->
3 <!-- Please don't use html entities like [, ] ^ -->
4 <!-- etc. they don't work with xml! -->
5 <book xmlns:muttng-doc="http://mutt-ng.berlios.de/doc/#NS">
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 @VERSION@</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!''
27 </bookinfo> <!--}}}-->
29 <chapter id="introduction"> <!--{{{-->
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 <muttng-doc:web url="http://www.muttng.org/"/>
74 <sect1 id="mailinglists">
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
105 <sect1 id="distrib-sites">
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 <muttng-doc:web url="http://mutt-ng.berlios.de/snapshots/"/>
123 Visit channel <emphasis>#muttng</emphasis> on <ulink
124 url="http://www.freenode.net/">irc.freenode.net
125 (www.freenode.net) </ulink> to chat with other people
126 interested in Mutt-ng.
132 <title>Weblog</title>
135 If you want to read fresh news about the latest development in
136 Mutt-ng, and get informed about stuff like interesting,
137 Mutt-ng-related articles and packages for your favorite
138 distribution, you can read and/or subscribe to our <ulink
139 url="http://mutt-ng.supersized.org/">Mutt-ng development
145 <sect1 id="copyright">
146 <title>Copyright</title>
149 Mutt is Copyright (C) 1996-2000 Michael R. Elkins
150 <me@cs.hmc.edu> and others
154 This program is free software; you can redistribute it and/or modify
155 it under the terms of the GNU General Public License as published by
156 the Free Software Foundation; either version 2 of the License, or
157 (at your option) any later version.
161 This program is distributed in the hope that it will be useful,
162 but WITHOUT ANY WARRANTY; without even the implied warranty of
163 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
164 GNU General Public License for more details.
168 You should have received a copy of the GNU General Public License
169 along with this program; if not, write to the Free Software
170 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
175 <sect1 id="conventions">
176 <title>Manual Conventions</title>
179 This manual contains several (hopefully consistent) conventions to
180 specially layout different items in different fashions.
186 <para>Configuration and environment variables will be printed
187 in a typewriter font and both prefixed with a dollar sign as
188 it's common for UNIX-like environments. Configuration
189 variables are lower-case only while environment variables
190 are upper-case only. <muttng-doc:varref
191 name="imap-mail-check"/> is a configuration variable while
192 <muttng-doc:envvar name="EDITOR"/> is an environment
196 <para>Muttng-specific functions are enclosed in
197 <literal><></literal> and printed in a typewriter font,
198 too, as in <muttng-doc:funcref name="sync-mailbox"/>.</para>
201 <para>As common for UNIX-like environments, references to
202 manual pages are printed with the section enclosed in
203 braces, as in <muttng-doc:man name="vi"/> or <muttng-doc:man
204 name="muttngrc" sect="5"/>. Execute <literal>man [section]
205 [name]</literal> to view the manual page.</para>
208 <para>Keys are presented in the following way: ordinary keys
209 are just given as-is, e.g.
210 <muttng-doc:key>q</muttng-doc:key>. Control characters are
211 prefixed with <literal>C-</literal> (e.g. the screen can be
212 redraw by pressing <muttng-doc:key
213 mod="C">L</muttng-doc:key>) and <literal>E-</literal> for
214 Escape, e.g. a folder can be opened read-only with
215 <muttng-doc:key mod="E">c</muttng-doc:key>.
222 If, while reading this fine manual, you find any inconsistencies
223 of whatever kind, please contact the developers via
224 <email>mutt-ng-devel@lists.berlios.de</email> to report it.
232 <chapter id="getting-started"> <!--{{{-->
233 <title>Getting Started</title>
235 <sect1 id="basic-concepts"> <!--{{{-->
236 <title>Basic Concepts</title>
238 <sect2 id="concept-screens-and-menus"> <!--{{{-->
239 <title>Screens and Menus</title>
242 mutt-ng offers different screens of which every has its special
252 The <emphasis>index</emphasis> displays the contents of the
261 The <emphasis>pager</emphasis> is responsible for displaying
263 is, the header, the body and all attached parts.
270 The <emphasis>file browser</emphasis> offers operations on and
272 information of all folders mutt-ng should watch for mail.
279 The <emphasis>sidebar</emphasis> offers a permanent view of
281 contain how many total, new and/or flagged mails.
288 The <emphasis>help screen</emphasis> lists for all currently
290 commands how to invoke them as well as a short description.
297 The <emphasis>compose</emphasis> menu is a comfortable
299 actions before sending mail: change subjects, attach files,
308 The <emphasis>attachement</emphasis> menu gives a summary and
310 structure of the attachements of the current message.
317 The <emphasis>alias</emphasis> menu lists all or a fraction of
326 The <emphasis>key</emphasis> menu used in connection with
328 users choose the right key to encrypt with.
338 When mutt-ng is started without any further options, it'll open
339 the users default mailbox and display the index.
349 <sect2 id="concept-configuration"> <!--{{{-->
350 <title>Configuration</title>
353 Mutt-ng does <emphasis>not</emphasis> feature an internal
355 interface or menu due to the simple fact that this would be too
356 complex to handle (currently there are several <emphasis>hundred</emphasis>
357 variables which fine-tune the behaviour.)
361 Mutt-ng is configured using configuration files which allow
362 users to add comments or manage them via version control systems
367 Also, mutt-ng comes with a shell script named <literal>grml-muttng</literal>
368 kindly contributed by users which really helps and eases the
369 creation of a user's configuration file. When downloading the
370 source code via a snapshot or via subversion, it can be found in
371 the <literal>contrib</literal> directory.
381 <sect2 id="concept-functions"> <!--{{{-->
382 <title>Functions</title>
385 Mutt-ng offers great flexibility due to the use of functions:
386 internally, every action a user can make mutt-ng perform is named
387 ``function.'' Those functions are assigned to keys (or even key
388 sequences) and may be completely adjusted to user's needs. The
389 basic idea is that the impatient users get a very intuitive
390 interface to start off with and advanced users virtually get no
391 limits to adjustments.
401 <sect2 id="concept-interaction"> <!--{{{-->
402 <title>Interaction</title>
405 Mutt-ng has two basic concepts of user interaction:
414 There is one dedicated line on the screen used to query
415 the user for input, issue any command, query variables and
416 display error and informational messages. As for every type of
417 user input, this requires manual action leading to the need of
425 The automatized interface for interaction are the so
426 called <emphasis>hooks</emphasis>. Hooks specify actions the
428 performed at well-defined situations: what to do when entering
429 which folder, what to do when displaying or replying to what
430 kind of message, etc. These are optional, i.e. a user doesn't
431 need to specify them but can do so.
447 <sect2 id="concept-modularization"> <!--{{{-->
448 <title>Modularization</title>
451 Although mutt-ng has many functionality built-in, many
452 features can be delegated to external tools to increase
453 flexibility: users can define programs to filter a message through
454 before displaying, users can use any program they want for
455 displaying a message, message types (such as PDF or PostScript)
456 for which mutt-ng doesn't have a built-in filter can be rendered
457 by arbitrary tools and so forth. Although mutt-ng has an alias
458 mechanism built-in, it features using external tools to query for
459 nearly every type of addresses from sources like LDAP, databases
460 or just the list of locally known users.
470 <sect2 id="concept-patterns"> <!--{{{-->
471 <title>Patterns</title>
474 Mutt-ng has a built-in pattern matching ``language'' which is
475 as widely used as possible to present a consistent interface to
476 users. The same ``pattern terms'' can be used for searching,
477 scoring, message selection and much more.
495 <sect1 id="screens-and-menus"> <!--{{{-->
496 <title>Screens and Menus</title>
498 <sect2 id="intro-index">
502 The index is the screen that you usually see first when you
503 start mutt-ng. It gives an overview over your emails in the
504 currently opened mailbox. By default, this is your system mailbox.
505 The information you see in the index is a list of emails, each with
506 its number on the left, its flags (new email, important email,
507 email that has been forwarded or replied to, tagged email, ...),
508 the date when email was sent, its sender, the email size, and the
509 subject. Additionally, the index also shows thread hierarchies:
510 when you reply to an email, and the other person replies back, you
511 can see the other's person email in a "sub-tree" below. This is
512 especially useful for personal email between a group of people or
513 when you've subscribed to mailing lists.
522 <sect2 id="intro-pager">
526 The pager is responsible for showing the email content. On the
527 top of the pager you have an overview over the most important email
528 headers like the sender, the recipient, the subject, and much more
529 information. How much information you actually see depends on your
530 configuration, which we'll describe below.
534 Below the headers, you see the email body which usually contains
535 the message. If the email contains any attachments, you will see
536 more information about them below the email body, or, if the
537 attachments are text files, you can view them directly in the
542 To give the user a good overview, it is possible to configure
543 mutt-ng to show different things in the pager with different
544 colors. Virtually everything that can be described with a regular
545 expression can be colored, e.g. URLs, email addresses or smileys.
554 <sect2 id="intro-browser">
555 <title>File Browser</title>
558 The file browser is the interface to the local or remote
559 file system. When selecting a mailbox to open, the browser allows
560 custom sorting of items, limiting the items shown by a regular
561 expression and a freely adjustable format of what to display in
562 which way. It also allows for easy navigation through the
563 file system when selecting file(s) to attach to a message, select
564 multiple files to attach and many more.
573 <sect2 id="intro-sidebar">
574 <title>Sidebar</title>
577 The sidebar comes in handy to manage mails which are spread
578 over different folders. All folders users setup mutt-ng to watch
579 for new mail will be listed. The listing includes not only the
580 name but also the number of total messages, the number of new and
581 flagged messages. Items with new mail may be colored different
582 from those with flagged mail, items may be shortened or compress
583 if they're they to long to be printed in full form so that by
584 abbreviated names, user still now what the name stands for.
593 <sect2 id="intro-help">
597 The help screen is meant to offer a quick help to the user. It
598 lists the current configuration of key bindings and their
599 associated commands including a short description, and currently
600 unbound functions that still need to be associated with a key
601 binding (or alternatively, they can be called via the mutt-ng
611 <sect2 id="intro-compose">
612 <title>Compose Menu</title>
615 The compose menu features a split screen containing the
616 information which really matter before actually sending a
617 message by mail or posting an article to a newsgroup: who gets
618 the message as what (recipient, newsgroup, who gets what kind of
619 copy). Additionally, users may set security options like
620 deciding whether to sign, encrypt or sign and encrypt a message
625 Also, it's used to attach messages, news articles or files to
626 a message, to re-edit any attachment including the message
636 <sect2 id="intro-alias">
637 <title>Alias Menu</title>
640 The alias menu is used to help users finding the recipients
641 of messages. For users who need to contact many people, there's
642 no need to remember addresses or names completely because it
643 allows for searching, too. The alias mechanism and thus the
644 alias menu also features grouping several addresses by a shorter
645 nickname, the actual alias, so that users don't have to select
646 each single recipient manually.
655 <sect2 id="intro-attach">
656 <title>Attachment Menu</title>
659 As will be later discussed in detail, mutt-ng features a good
660 and stable MIME implementation, that is, is greatly supports
661 sending and receiving messages of arbitrary type. The
662 attachment menu displays a message's structure in detail: what
663 content parts are attached to which parent part (which gives a
664 true tree structure), which type is of what type and what size.
665 Single parts may saved, deleted or modified to offer great and
666 easy access to message's internals.
675 <sect2 id="intro-keysel">
676 <title>Key Menu</title>
679 <literal>FIXME</literal>
695 <sect1 id="moving"> <!--{{{-->
696 <title>Moving Around in Menus</title>
699 Information is presented in menus, very similar to ELM. Here is a
700 tableshowing the common keys used to navigate menus in Mutt-ng.
705 <table frame="none" rowsep="1" texstr="l|l|l">
706 <title>Most commonly used movement bindings</title>
707 <tgroup cols="3" align="left" colsep="1" rowsep="1">
711 <entry>Function</entry>
712 <entry>Description</entry>
717 <entry><muttng-doc:key>j</muttng-doc:key> or <muttng-doc:key>Down</muttng-doc:key></entry>
718 <entry><muttng-doc:funcref name="next-entry"/></entry>
719 <entry>move to the next entry</entry>
722 <entry><muttng-doc:key>k</muttng-doc:key> or <muttng-doc:key>Up</muttng-doc:key></entry>
723 <entry><muttng-doc:funcref name="previous-entry"/></entry>
724 <entry>move to the previous entry</entry>
727 <entry><muttng-doc:key>z</muttng-doc:key> or <muttng-doc:key>PageDn</muttng-doc:key></entry>
728 <entry><muttng-doc:funcref name="page-down"/></entry>
729 <entry>go to the next page</entry>
732 <entry><muttng-doc:key>Z</muttng-doc:key> or <muttng-doc:key>PageUp</muttng-doc:key></entry>
733 <entry><muttng-doc:funcref name="page-up"/></entry>
734 <entry>go to the previous page</entry>
737 <entry><muttng-doc:key>=</muttng-doc:key> or <muttng-doc:key>Home</muttng-doc:key></entry>
738 <entry><muttng-doc:funcref name="first-entry"/></entry>
739 <entry>jump to the first entry</entry>
742 <entry><muttng-doc:key>*</muttng-doc:key> or <muttng-doc:key>End</muttng-doc:key></entry>
743 <entry><muttng-doc:funcref name="last-entry"/></entry>
744 <entry>jump to the last entry</entry>
747 <entry><muttng-doc:key>q</muttng-doc:key></entry>
748 <entry><muttng-doc:funcref name="quit"/></entry>
749 <entry>exit the current menu</entry>
752 <entry><muttng-doc:key>?</muttng-doc:key></entry>
753 <entry><muttng-doc:funcref name="help"/></entry>
754 <entry>list all key bindings for the current menu</entry>
770 <sect1 id="editing"> <!--{{{-->
771 <title>Editing Input Fields</title>
774 Mutt-ng has a builtin line editor which is used as the primary way to
776 textual data such as email addresses or filenames. The keys used to
778 around while editing are very similar to those of Emacs.
783 <table frame="none" rowsep="1" texstr="l|l|l">
784 <title>Line Editor Functions</title>
785 <tgroup cols="3" align="left" colsep="1" rowsep="1">
789 <entry>Function</entry>
790 <entry>Description</entry>
795 <entry><muttng-doc:key mod="C">A</muttng-doc:key> or <muttng-doc:key>Home</muttng-doc:key></entry>
796 <entry><muttng-doc:funcref name="bol"/></entry>
797 <entry>move to the start of the line</entry>
800 <entry><muttng-doc:key mod="C">B</muttng-doc:key> or <muttng-doc:key>Left</muttng-doc:key></entry>
801 <entry><muttng-doc:funcref name="backward-char"/>
802 </entry><entry>move back one char</entry>
805 <entry><muttng-doc:key mod="E">B</muttng-doc:key></entry>
806 <entry><muttng-doc:funcref name="backward-word"/></entry>
807 <entry>move back one word</entry>
810 <entry><muttng-doc:key mod="C">D</muttng-doc:key> or <muttng-doc:key>Delete</muttng-doc:key></entry>
811 <entry><muttng-doc:funcref name="delete-char"/></entry>
812 <entry>delete the char under the cursor</entry>
815 <entry><muttng-doc:key mod="C">E</muttng-doc:key> or <muttng-doc:key>End</muttng-doc:key></entry>
816 <entry><muttng-doc:funcref name="eol"/></entry>
817 <entry>move to the end of the line</entry>
820 <entry><muttng-doc:key mod="C">F</muttng-doc:key> or <muttng-doc:key>Right</muttng-doc:key></entry>
821 <entry><muttng-doc:funcref name="forward-char"/></entry>
822 <entry>move forward one char</entry>
825 <entry><muttng-doc:key mod="E">F</muttng-doc:key></entry>
826 <entry><muttng-doc:funcref name="forward-word"/></entry>
827 <entry>move forward one word</entry>
830 <entry><muttng-doc:key>Tab</muttng-doc:key></entry>
831 <entry><muttng-doc:funcref name="complete"/></entry>
832 <entry>complete filename or alias</entry>
835 <entry><muttng-doc:key mod="C">T</muttng-doc:key></entry>
836 <entry><muttng-doc:funcref name="complete-query"/></entry>
837 <entry>complete address with query</entry>
840 <entry><muttng-doc:key mod="C">K</muttng-doc:key></entry>
841 <entry><muttng-doc:funcref name="kill-eol"/></entry>
842 <entry>delete to the end of the line</entry>
845 <entry><muttng-doc:key mod="E">d</muttng-doc:key></entry>
846 <entry><muttng-doc:funcref name="kill-eow"/></entry>
847 <entry>delete to the end of the word</entry>
850 <entry><muttng-doc:key mod="C">W</muttng-doc:key></entry>
851 <entry><muttng-doc:funcref name="kill-word"/></entry>
852 <entry>kill the word in front of the cursor</entry>
855 <entry><muttng-doc:key mod="C">U</muttng-doc:key></entry>
856 <entry><muttng-doc:funcref name="kill-line"/></entry>
857 <entry>delete entire line</entry>
860 <entry><muttng-doc:key mod="C">V</muttng-doc:key></entry>
861 <entry><muttng-doc:funcref name="quote-char"/></entry>
862 <entry>quote the next typed key</entry>
865 <entry><muttng-doc:key>Up</muttng-doc:key></entry>
866 <entry><muttng-doc:funcref name="history-up"/></entry>
867 <entry>recall previous string from history</entry>
870 <entry><muttng-doc:key>Down</muttng-doc:key></entry>
871 <entry><muttng-doc:funcref name="history-down"/></entry>
872 <entry>recall next string from history</entry>
875 <entry><muttng-doc:key>BackSpace</muttng-doc:key></entry>
876 <entry><muttng-doc:funcref name="backspace"/></entry>
877 <entry>kill the char in front of the cursor</entry>
880 <entry><muttng-doc:key mod="E">u</muttng-doc:key></entry>
881 <entry><muttng-doc:funcref name="upcase-word"/></entry>
882 <entry>convert word to upper case</entry>
885 <entry><muttng-doc:key mod="E">l</muttng-doc:key></entry>
886 <entry><muttng-doc:funcref name="downcase-word"/></entry>
887 <entry>convert word to lower case</entry>
890 <entry><muttng-doc:key mod="E">c</muttng-doc:key></entry>
891 <entry><muttng-doc:funcref name="capitalize-word"/></entry>
892 <entry>capitalize the word</entry>
895 <entry><muttng-doc:key mod="C">G</muttng-doc:key></entry>
900 <entry><muttng-doc:key>Return</muttng-doc:key></entry>
902 <entry>finish editing</entry>
911 You can remap the <emphasis>editor</emphasis> functions using the
912 <muttng-doc:cmdref name="bind"/> command. For example, to make
913 the <emphasis>Delete</emphasis> key delete the character in front
914 of the cursor rather than under, you could use
918 <literal>bind editor <delete> backspace</literal>
924 <sect1 id="reading"> <!--{{{-->
925 <title>Reading Mail - The Index and Pager</title>
928 Similar to many other mail clients, there are two modes in which mail
929 isread in Mutt-ng. The first is the index of messages in the mailbox,
931 called the ``index'' in Mutt-ng. The second mode is the display of the
932 message contents. This is called the ``pager.''
936 The next few sections describe the functions provided in each of these
940 <sect2 id="reading-index">
941 <title>The Message Index</title>
945 <table frame="none" rowsep="1" texstr="l|l|l">
946 <title>Most commonly used Index Bindings</title>
947 <tgroup cols="3" align="left" colsep="1" rowsep="1">
951 <entry>Function</entry>
952 <entry>Description</entry>
957 <entry><muttng-doc:key>c</muttng-doc:key></entry>
958 <entry><literal></literal></entry>
959 <entry>change to a different mailbox</entry>
962 <entry><muttng-doc:key mod="E">c</muttng-doc:key></entry>
963 <entry><literal></literal></entry>
964 <entry>change to a folder in read-only mode</entry>
967 <entry><muttng-doc:key>C</muttng-doc:key></entry>
968 <entry><literal></literal></entry>
969 <entry>copy the current message to another mailbox</entry>
972 <entry><muttng-doc:key mod="E">C</muttng-doc:key></entry>
973 <entry><literal></literal></entry>
974 <entry>decode a message and copy it to a folder</entry>
977 <entry><muttng-doc:key mod="E">s</muttng-doc:key></entry>
978 <entry><literal></literal></entry>
979 <entry>decode a message and save it to a folder</entry>
982 <entry><muttng-doc:key>D</muttng-doc:key></entry>
983 <entry><literal></literal></entry>
984 <entry>delete messages matching a pattern</entry>
987 <entry><muttng-doc:key>d</muttng-doc:key></entry>
988 <entry><literal></literal></entry>
989 <entry>delete the current message</entry>
992 <entry><muttng-doc:key>F</muttng-doc:key></entry>
993 <entry><literal></literal></entry>
994 <entry>mark as important</entry>
997 <entry><muttng-doc:key>l</muttng-doc:key></entry>
998 <entry><literal></literal></entry>
999 <entry>show messages matching a pattern</entry>
1002 <entry><muttng-doc:key>N</muttng-doc:key></entry>
1003 <entry><literal></literal></entry>
1004 <entry>mark message as new</entry>
1007 <entry><muttng-doc:key>o</muttng-doc:key></entry>
1008 <entry><literal></literal></entry>
1009 <entry>change the current sort method</entry>
1012 <entry><muttng-doc:key>O</muttng-doc:key></entry>
1013 <entry><literal></literal></entry>
1014 <entry>reverse sort the mailbox</entry>
1017 <entry><muttng-doc:key>q</muttng-doc:key></entry>
1018 <entry><literal></literal></entry>
1019 <entry>save changes and exit</entry>
1022 <entry><muttng-doc:key>s</muttng-doc:key></entry>
1023 <entry><literal></literal></entry>
1024 <entry>save-message</entry>
1027 <entry><muttng-doc:key>T</muttng-doc:key></entry>
1028 <entry><literal></literal></entry>
1029 <entry>tag messages matching a pattern</entry>
1032 <entry><muttng-doc:key>t</muttng-doc:key></entry>
1033 <entry><literal></literal></entry>
1034 <entry>toggle the tag on a message</entry>
1037 <entry><muttng-doc:key mod="E">t</muttng-doc:key></entry>
1038 <entry><literal></literal></entry>
1039 <entry>toggle tag on entire message thread</entry>
1042 <entry><muttng-doc:key>U</muttng-doc:key></entry>
1043 <entry><literal></literal></entry>
1044 <entry>undelete messages matching a pattern</entry>
1047 <entry><muttng-doc:key>u</muttng-doc:key></entry>
1048 <entry><literal></literal></entry>
1049 <entry>undelete-message</entry>
1052 <entry><muttng-doc:key>v</muttng-doc:key></entry>
1053 <entry><literal></literal></entry>
1054 <entry>view-attachments</entry>
1057 <entry><muttng-doc:key>x</muttng-doc:key></entry>
1058 <entry><literal></literal></entry>
1059 <entry>abort changes and exit</entry>
1062 <entry><muttng-doc:key>Return</muttng-doc:key></entry>
1063 <entry><literal></literal></entry>
1064 <entry>display-message</entry>
1067 <entry><muttng-doc:key>Tab</muttng-doc:key></entry>
1068 <entry><literal></literal></entry>
1069 <entry>jump to the next new or unread message</entry>
1072 <entry><muttng-doc:key>@</muttng-doc:key></entry>
1073 <entry><literal></literal></entry>
1074 <entry>show the author's full e-mail address</entry>
1077 <entry><muttng-doc:key>$</muttng-doc:key></entry>
1078 <entry><literal></literal></entry>
1079 <entry>save changes to mailbox</entry>
1082 <entry><muttng-doc:key>/</muttng-doc:key></entry>
1083 <entry><literal></literal></entry>
1084 <entry>search</entry>
1087 <entry><muttng-doc:key mod="E">/</muttng-doc:key></entry>
1088 <entry><literal></literal></entry>
1089 <entry>search-reverse</entry>
1092 <entry><muttng-doc:key mod="C">L</muttng-doc:key></entry>
1093 <entry><literal></literal></entry>
1094 <entry>clear and redraw the screen</entry>
1097 <entry><muttng-doc:key mod="C">T</muttng-doc:key></entry>
1098 <entry><literal></literal></entry>
1099 <entry>untag messages matching a pattern</entry>
1108 <title>Status Flags</title> <!--{{{-->
1111 In addition to who sent the message and the subject, a short
1113 the disposition of each message is printed beside the message
1115 Zero or more of the following ``flags'' may appear, which mean:
1126 message is deleted (is marked for deletion)
1134 message have attachments marked for deletion
1142 contains a PGP public key
1166 message is PGP encrypted
1174 message has been replied to
1182 message is signed, and the signature is succesfully
1215 Some of the status flags can be turned on or off using
1221 <emphasis role="bold">set-flag</emphasis> (default: w)
1227 <emphasis role="bold">clear-flag</emphasis> (default: W)
1236 Furthermore, the following flags reflect who the message is
1238 to. They can be customized with the
1239 <muttng-doc:varref name="to-chars"/> variable.
1249 message is to you and you only
1257 message is to you, but also to or cc'ed to others
1265 message is cc'ed to you
1281 message is sent to a subscribed mailing list
1292 <sect2 id="reading-pager">
1293 <title>The Pager</title>
1296 By default, Mutt-ng uses its builtin pager to display the body of
1298 The pager is very similar to the Unix program <emphasis>less</emphasis> though not nearly as
1304 <table frame="none" rowsep="1" texstr="l|l|l">
1305 <title>Most commonly used Pager Bindings</title>
1306 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1310 <entry>Function</entry>
1311 <entry>Description</entry>
1316 <entry><muttng-doc:key>Return</muttng-doc:key></entry>
1317 <entry><literal></literal></entry>
1318 <entry>go down one line</entry>
1321 <entry><muttng-doc:key>Space</muttng-doc:key></entry>
1322 <entry><literal></literal></entry>
1323 <entry>display the next page (or next message if at the end of a message)</entry>
1326 <entry><muttng-doc:key>-</muttng-doc:key></entry>
1327 <entry><literal></literal></entry>
1328 <entry>go back to the previous page</entry>
1331 <entry><muttng-doc:key>n</muttng-doc:key></entry>
1332 <entry><literal></literal></entry>
1333 <entry>search for next match</entry>
1336 <entry><muttng-doc:key>S</muttng-doc:key></entry>
1337 <entry><literal></literal></entry>
1338 <entry>skip beyond quoted text</entry>
1341 <entry><muttng-doc:key>T</muttng-doc:key></entry>
1342 <entry><literal></literal></entry>
1343 <entry>toggle display of quoted text</entry>
1346 <entry><muttng-doc:key>?</muttng-doc:key></entry>
1347 <entry><literal></literal></entry>
1348 <entry>show key bindings</entry>
1351 <entry><muttng-doc:key>/</muttng-doc:key></entry>
1352 <entry><literal></literal></entry>
1353 <entry>search for a regular expression (pattern)</entry>
1356 <entry><muttng-doc:key mod="E">/</muttng-doc:key></entry>
1357 <entry><literal></literal></entry>
1358 <entry>search backwards for a regular expression</entry>
1361 <entry><muttng-doc:key>\</muttng-doc:key></entry>
1362 <entry><literal></literal></entry>
1363 <entry>toggle search pattern coloring</entry>
1366 <entry><muttng-doc:key>^</muttng-doc:key></entry>
1367 <entry><literal></literal></entry>
1368 <entry>jump to the top of the message</entry>
1378 In addition, many of the functions from the <emphasis>index</emphasis> are available in
1379 the pager, such as <emphasis>delete-message</emphasis> or <emphasis>
1383 advantage over using an external pager to view messages).
1387 Also, the internal pager supports a couple other advanced
1388 features. For one, it will accept and translate the
1389 ``standard'' nroff sequences forbold and underline. These
1390 sequences are a series of either the letter, backspace
1391 (<muttng-doc:key mod="C">H</muttng-doc:key>), the letter again for bold
1392 or the letter, backspace, <muttng-doc:key>_</muttng-doc:key> for denoting
1393 underline. Mutt-ng will attempt to display these in bold and
1394 underline respectively if your terminal supports them. If not,
1395 you can use the bold and underline <muttng-doc:cmdref
1396 name="color"/> objects to specify a color or mono attribute
1401 Additionally, the internal pager supports the ANSI escape
1402 sequences for character attributes. Mutt-ng translates them
1403 into the correct color and character settings. The sequences
1404 Mutt-ng supports are: <literal>ESC [ Ps;Ps;Ps;...;Ps
1405 m</literal> (see table below for possible values for
1406 <literal>Ps</literal>).
1411 <table frame="none" rowsep="1" texstr="l|l">
1412 <title>ANSI Escape Sequences</title>
1413 <tgroup cols="2" align="left" colsep="1" rowsep="1">
1416 <entry>Value</entry>
1417 <entry>Attribute</entry>
1422 <entry><literal>0</literal></entry>
1423 <entry>All Attributes Off</entry>
1426 <entry><literal>1</literal></entry>
1427 <entry>Bold on</entry>
1430 <entry><literal>4</literal></entry>
1431 <entry>Underline on</entry>
1434 <entry><literal>5</literal></entry>
1435 <entry>Blink on</entry>
1438 <entry><literal>7</literal></entry>
1439 <entry>Reverse video on</entry>
1442 <entry><literal>3x</literal></entry>
1443 <entry>Foreground color is x (see table below)</entry>
1446 <entry><literal>4x</literal></entry>
1447 <entry>Background color is x (see table below)</entry>
1454 <table frame="none" rowsep="1" texstr="l|l">
1455 <title>ANSI Colors</title>
1456 <tgroup cols="2" align="left" colsep="1" rowsep="1">
1459 <entry>Number</entry>
1460 <entry>Color</entry>
1465 <entry><literal>0</literal></entry>
1466 <entry>black</entry>
1469 <entry><literal>1</literal></entry>
1473 <entry><literal>2</literal></entry>
1474 <entry>green</entry>
1477 <entry><literal>3</literal></entry>
1478 <entry>yellow</entry>
1481 <entry><literal>4</literal></entry>
1485 <entry><literal>5</literal></entry>
1486 <entry>magenta</entry>
1489 <entry><literal>6</literal></entry>
1493 <entry><literal>7</literal></entry>
1494 <entry>white</entry>
1504 Mutt-ng uses these attributes for handling text/enriched messages,
1506 can also be used by an external <muttng-doc:cmdref name="auto_view"/>
1507 script for highlighting purposes. <emphasis role="bold">Note:</emphasis> If you change the colors for your
1508 display, for example by changing the color associated with color2 for
1509 your xterm, then that color will be used instead of green.
1514 <sect2 id="threads">
1515 <title>Threaded Mode</title>
1518 When the mailbox is <link linkend="sort">sorted</link> by <emphasis>
1522 a few additional functions available in the <emphasis>index</emphasis> and <emphasis>
1530 <table frame="none" rowsep="1" texstr="l|l|l">
1531 <title>Most commonly used thread-related bindings</title>
1532 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1536 <entry>Function</entry>
1537 <entry>Description</entry>
1542 <entry><muttng-doc:key mod="C">D</muttng-doc:key></entry>
1543 <entry><muttng-doc:funcref name="delete-thread"/></entry>
1544 <entry>delete all messages in the current thread</entry>
1547 <entry><muttng-doc:key mod="C">U</muttng-doc:key></entry>
1548 <entry><muttng-doc:funcref name="undelete-thread"/></entry>
1549 <entry>undelete all messages in the current thread</entry>
1552 <entry><muttng-doc:key mod="C">N</muttng-doc:key></entry>
1553 <entry><muttng-doc:funcref name="next-thread"/></entry>
1554 <entry>jump to the start of the next thread</entry>
1557 <entry><muttng-doc:key mod="C">P</muttng-doc:key></entry>
1558 <entry><muttng-doc:funcref name="previous-thread"/></entry>
1559 <entry>jump to the start of the previous thread</entry>
1562 <entry><muttng-doc:key mod="C">R</muttng-doc:key></entry>
1563 <entry><muttng-doc:funcref name="read-thread"/></entry>
1564 <entry>mark the current thread as read</entry>
1567 <entry><muttng-doc:key mod="E">d</muttng-doc:key></entry>
1568 <entry><muttng-doc:funcref name="delete-subthread"/></entry>
1569 <entry>delete all messages in the current subthread</entry>
1572 <entry><muttng-doc:key mod="E">u</muttng-doc:key></entry>
1573 <entry><muttng-doc:funcref name="undelete-subthread"/></entry>
1574 <entry>undelete all messages in the current subthread</entry>
1577 <entry><muttng-doc:key mod="E">n</muttng-doc:key></entry>
1578 <entry><muttng-doc:funcref name="next-subthread"/></entry>
1579 <entry>jump to the start of the next subthread</entry>
1582 <entry><muttng-doc:key mod="E">p</muttng-doc:key></entry>
1583 <entry><muttng-doc:funcref name="previous-subthread"/></entry>
1584 <entry>jump to the start of the previous subthread</entry>
1587 <entry><muttng-doc:key mod="E">r</muttng-doc:key></entry>
1588 <entry><muttng-doc:funcref name="read-subthread"/></entry>
1589 <entry>mark the current subthread as read </entry>
1592 <entry><muttng-doc:key mod="E">t</muttng-doc:key></entry>
1593 <entry><muttng-doc:funcref name="tag-thread"/></entry>
1594 <entry>toggle the tag on the current thread</entry>
1597 <entry><muttng-doc:key mod="E">v</muttng-doc:key></entry>
1598 <entry><muttng-doc:funcref name="collapse-thread"/></entry>
1599 <entry>toggle collapse for the current thread</entry>
1602 <entry><muttng-doc:key mod="E">V</muttng-doc:key></entry>
1603 <entry><muttng-doc:funcref name="collapse-all"/></entry>
1604 <entry>toggle collapse for all threads</entry>
1607 <entry><muttng-doc:key>P</muttng-doc:key></entry>
1608 <entry><muttng-doc:funcref name="parent-message"/></entry>
1609 <entry>jump to parent message in thread</entry>
1619 <emphasis role="bold">Note:</emphasis> Collapsing a thread displays
1620 only the first message
1621 in the thread and hides the others. This is useful when threads
1622 contain so many messages that you can only see a handful of threads
1623 onthe screen. See <literal>%M</literal> in
1624 <muttng-doc:varref name="index-format"/>.
1628 For example, you could use
1629 <literal>%?M?(#%03M)&(%4l)?</literal> in <muttng-doc:varref name="index-format"/>
1631 display the number of hidden messages if the thread is collapsed.
1635 See also the <muttng-doc:varref name="strict-threads"/> variable.
1640 <sect2 id="pager-functions">
1641 <title>Miscellaneous Functions</title>
1644 <muttng-doc:funcdef name="create-alias"><muttng-doc:key>a</muttng-doc:key></muttng-doc:funcdef>
1648 Creates a new alias based upon the current message (or prompts for a
1649 new one). Once editing is complete, an <muttng-doc:cmdref name="alias"/>
1650 command is added to the file specified by the <muttng-doc:varref name="alias-file"/>
1651 variable for future use. <emphasis role="bold">Note:</emphasis>
1652 Specifying an <muttng-doc:varref name="alias-file"/>
1653 does not add the aliases specified there-in, you must also <muttng-doc:cmdref name="source"/>
1658 <muttng-doc:funcdef name="check-traditional-pgp"><muttng-doc:key mod="E">P</muttng-doc:key></muttng-doc:funcdef>
1662 This function will search the current message for content signed or
1663 encrypted with PGP the "traditional" way, that is, without proper
1664 MIME tagging. Technically, this function will temporarily change
1665 the MIME content types of the body parts containing PGP data; this
1666 is similar to the <muttng-doc:funcref name="edit-type"/>
1672 <muttng-doc:funcdef name="display-toggle-weed"><muttng-doc:key>h</muttng-doc:key></muttng-doc:funcdef>
1676 Toggles the weeding of message header fields specified by <muttng-doc:cmdref name="ignore"/>
1681 <muttng-doc:funcdef name="edit"><muttng-doc:key>e</muttng-doc:key></muttng-doc:funcdef>
1685 This command (available in the ``index'' and ``pager'') allows you to
1686 edit the raw current message as it's present in the mail folder.
1687 After you have finished editing, the changed message will be
1688 appended to the current folder, and the original message will be
1689 marked for deletion.
1693 <muttng-doc:funcdef name="edit-type"/>
1694 (default: <muttng-doc:key mod="C">E</muttng-doc:key> on the attachment menu, and in the pager and index
1695 menus; <muttng-doc:key mod="C">T</muttng-doc:key> on the compose menu)
1699 This command is used to temporarily edit an attachment's content
1700 type to fix, for instance, bogus character set parameters. When
1701 invoked from the index or from the pager, you'll have the
1702 opportunity to edit the top-level attachment's content type. On the
1703 <link linkend="attach-menu">attach-menu</link>, you can change any
1704 attachment's content type. These changes are not persistent, and get
1705 lost upon changing folders.
1709 Note that this command is also available on the <link linkend="compose-menu">compose-menu</link>
1710 .There, it's used to
1711 fine-tune the properties of attachments you are going to send.
1715 <muttng-doc:funcdef name="enter-command"><muttng-doc:key>:</muttng-doc:key></muttng-doc:funcdef>
1719 This command is used to execute any command you would normally put in
1721 configuration file. A common use is to check the settings of
1723 in conjunction with <muttng-doc:cmdref name="macro"/> to change
1729 <muttng-doc:funcdef name="extract-keys"><muttng-doc:key mod="C">K</muttng-doc:key></muttng-doc:funcdef>
1733 This command extracts PGP public keys from the current or tagged
1734 message(s) and adds them to your PGP public key ring.
1738 <muttng-doc:funcdef name="forget-passphrase"><muttng-doc:key mod="C">F</muttng-doc:key></muttng-doc:funcdef>
1742 This command wipes the passphrase(s) from memory. It is useful, if
1743 you misspelled the passphrase.
1747 <muttng-doc:funcdef name="list-reply"><muttng-doc:key>L</muttng-doc:key></muttng-doc:funcdef>
1751 Reply to the current or tagged message(s) by extracting any addresses
1753 match the regular expressions given by the <muttng-doc:cmdref name="lists"/>
1754 commands, but also honor any <literal>Mail-Followup-To</literal>
1756 <muttng-doc:varref name="honor-followup-to"/>
1757 configuration variable is set. Using this when replying to messages
1759 to mailing lists helps avoid duplicate copies being sent to the
1761 the message you are replying to.
1765 <muttng-doc:funcdef name="pipe-message" default="|"/>
1769 Asks for an external Unix command and pipes the current or
1770 tagged message(s) to it. The variables
1771 <muttng-doc:varref name="pipe-decode"/>,
1772 <muttng-doc:varref name="pipe-split"/>,
1773 <muttng-doc:varref name="pipe-decode"/> and
1774 <muttng-doc:varref name="wait-key"/>
1775 control the exact behavior of this function.
1779 <muttng-doc:funcdef name="resend-message"><muttng-doc:key mod="E">e</muttng-doc:key></muttng-doc:funcdef>
1783 With resend-message, mutt takes the current message as a template for
1785 new message. This function is best described as "recall from
1787 folders". It can conveniently be used to forward MIME messages while
1788 preserving the original mail structure. Note that the amount of
1790 included here depends on the value of the <muttng-doc:varref name="weed"/>
1795 This function is also available from the attachment menu. You can use
1797 to easily resend a message which was included with a bounce message
1798 as a message/rfc822 body part.
1802 <muttng-doc:funcdef name="shell-escape"><muttng-doc:key>!</muttng-doc:key></muttng-doc:funcdef>
1806 Asks for an external Unix command and executes it. The
1807 <muttng-doc:varref name="wait-key"/>
1808 can be used to control
1809 whether Mutt-ng will wait for a key to be pressed when the command
1811 (presumably to let the user read the output of the command), based on
1812 the return status of the named command.
1816 <muttng-doc:funcdef name="toggle-quoted"><muttng-doc:key>T</muttng-doc:key></muttng-doc:funcdef>
1820 The <emphasis>pager</emphasis> uses the
1821 <muttng-doc:varref name="quote-regexp"/>
1822 variable to detect quoted text when
1823 displaying the body of the message. This function toggles the
1824 displayof the quoted material in the message. It is particularly
1826 are interested in just the response and there is a large amount of
1827 quoted text in the way.
1831 <muttng-doc:funcdef name="skip-quoted"><muttng-doc:key>S</muttng-doc:key></muttng-doc:funcdef>
1835 This function will go to the next line of non-quoted text which come
1836 after a line of quoted text in the internal pager.
1848 <sect1 id="sending"> <!--{{{-->
1849 <title>Sending Mail</title>
1852 The following bindings are available in the <emphasis>index</emphasis>
1859 <table frame="none" rowsep="1" texstr="l|l|l">
1860 <title>Most commonly used Mail Composition Bindings</title>
1861 <tgroup cols="3" align="left" colsep="1" rowsep="1">
1865 <entry>Function</entry>
1866 <entry>Description</entry>
1871 <entry><muttng-doc:key>m</muttng-doc:key></entry>
1872 <entry><muttng-doc:funcref name="compose"/></entry>
1873 <entry>compose a new message</entry>
1876 <entry><muttng-doc:key>r</muttng-doc:key></entry>
1877 <entry><muttng-doc:funcref name="reply"/></entry>
1878 <entry>reply to sender</entry>
1881 <entry><muttng-doc:key>g</muttng-doc:key></entry>
1882 <entry><muttng-doc:funcref name="group-reply"/></entry>
1883 <entry>reply to all recipients</entry>
1886 <entry><muttng-doc:key>L</muttng-doc:key></entry>
1887 <entry><muttng-doc:funcref name="list-reply"/></entry>
1888 <entry>reply to mailing list address</entry>
1891 <entry><muttng-doc:key>f</muttng-doc:key></entry>
1892 <entry><muttng-doc:funcref name="forward"/></entry>
1893 <entry>forward message</entry>
1896 <entry><muttng-doc:key>b</muttng-doc:key></entry>
1897 <entry><muttng-doc:funcref name="bounce"/></entry>
1898 <entry>bounce (remail) message</entry>
1901 <entry><muttng-doc:key mod="E">k</muttng-doc:key></entry>
1902 <entry><muttng-doc:funcref name="mail-key"/></entry>
1903 <entry>mail a PGP public key to someone</entry>
1912 Bouncing a message sends the message as is to the recipient you
1913 specify. Forwarding a message allows you to add comments or
1914 modify the message you are forwarding. These items are discussed
1915 in greater detail in the next chapter <link linkend="forwarding-mail">forwarding-mail</link>.
1918 <sect2 id="sending-compose">
1919 <title>Composing new messages</title>
1922 When you want to send an email using mutt-ng, simply press <muttng-doc:key>m</muttng-doc:key> on
1923 your keyboard. Then, mutt-ng asks for the recipient via a prompt in
1929 <muttng-doc:lstmail>
1930 To:</muttng-doc:lstmail>
1935 After you've finished entering the recipient(s), press return. If you
1936 want to send an email to more than one recipient, separate the email
1937 addresses using the comma "<literal>,</literal>". Mutt-ng then asks
1939 subject. Again, press return after you've entered it. After that,
1941 got the most important information from you, and starts up an editor
1942 where you can then enter your email.
1946 The editor that is called is selected in the following way: you
1947 can e.g. set it in the mutt-ng configuration:
1952 <muttng-doc:lstconf>
1953 set editor = "vim +/^$/ -c ':set tw=72'"
1955 set editor = "emacs"</muttng-doc:lstconf>
1960 If you don't set your preferred editor in your configuration, mutt-ng
1961 first looks whether the environment variable <muttng-doc:envvar name="VISUAL"/> is set, and if
1962 so, it takes its value as editor command. Otherwise, it has a look
1963 at <muttng-doc:envvar name="EDITOR"/> and takes its value if it is set. If no
1965 can be found, mutt-ng simply assumes <muttng-doc:man name="vi"/> to be the
1967 since it's the most widespread editor in the Unix world and it's
1969 safe to assume that it is installed and available.
1973 When you've finished entering your message, save it and quit your
1974 editor. Mutt-ng will then present you with a summary screen, the
1976 On the top, you see a summary of the most important available key
1978 Below that, you see the sender, the recipient(s), Cc and/or Bcc
1979 recipient(s), the subject, the reply-to address, and optionally
1980 information where the sent email will be stored and whether it should
1981 be digitally signed and/or encrypted.
1985 Below that, you see a list of "attachments". The mail you've just
1986 entered before is also an attachment, but due to its special type
1987 (it's plain text), it will be displayed as the normal message on
1988 the receiver's side.
1992 At this point, you can add more attachments, pressing <muttng-doc:key>a</muttng-doc:key>, you
1993 can edit the recipient addresses, pressing <muttng-doc:key>t</muttng-doc:key> for
1995 <muttng-doc:key>c</muttng-doc:key> for the "Cc:" field, and <muttng-doc:key>b</muttng-doc:key>
1996 for the "Bcc: field. You can
1997 also edit the subject the subject by simply pressing <muttng-doc:key>s</muttng-doc:key> or the
1998 email message that you've entered before by pressing <muttng-doc:key>e</muttng-doc:key>. You will
1999 then again return to the editor. You can even edit the sender, by
2001 <literal><esc>f</literal>, but this shall only be used with
2006 Alternatively, you can configure mutt-ng in a way that most of the
2007 above settings can be edited using the editor. Therefore, you only
2008 need to add the following to your configuration:
2013 <muttng-doc:lstconf>
2014 set edit_headers</muttng-doc:lstconf>
2019 Once you have finished editing the body of your mail message, you are
2020 returned to the <emphasis>compose</emphasis> menu. The following
2021 options are available:
2026 <table frame="none" rowsep="1" texstr="l|l|l">
2027 <title>Most commonly used Compose Menu Bindings</title>
2028 <tgroup cols="3" align="left" colsep="1" rowsep="1">
2032 <entry>Function</entry>
2033 <entry>Description</entry>
2038 <entry><muttng-doc:key>a</muttng-doc:key></entry>
2039 <entry><muttng-doc:funcref name="attach-file"/></entry>
2040 <entry>attach a file</entry>
2043 <entry><muttng-doc:key>A</muttng-doc:key></entry>
2044 <entry><muttng-doc:funcref name="attach-message"/></entry>
2045 <entry>attach message(s) to the message</entry>
2048 <entry><muttng-doc:key mod="E">k</muttng-doc:key></entry>
2049 <entry><muttng-doc:funcref name="attach-key"/></entry>
2050 <entry>attach a PGP public key</entry>
2053 <entry><muttng-doc:key>d</muttng-doc:key></entry>
2054 <entry><muttng-doc:funcref name="edit-description"/></entry>
2055 <entry>edit description on attachment</entry>
2058 <entry><muttng-doc:key>D</muttng-doc:key></entry>
2059 <entry><muttng-doc:funcref name="detach-file"/></entry>
2060 <entry>detach a file</entry>
2063 <entry><muttng-doc:key>t</muttng-doc:key></entry>
2064 <entry><muttng-doc:funcref name="edit-to"/></entry>
2065 <entry>edit the To field</entry>
2068 <entry><muttng-doc:key mod="E">f</muttng-doc:key></entry>
2069 <entry><muttng-doc:funcref name="edit-from"/></entry>
2070 <entry>edit the From field</entry>
2073 <entry><muttng-doc:key>r</muttng-doc:key></entry>
2074 <entry><muttng-doc:funcref name="edit-reply-to"/></entry>
2075 <entry>edit the Reply-To field</entry>
2078 <entry><muttng-doc:key>c</muttng-doc:key></entry>
2079 <entry><muttng-doc:funcref name="edit-cc"/></entry>
2080 <entry>edit the Cc field</entry>
2083 <entry><muttng-doc:key>b</muttng-doc:key></entry>
2084 <entry><muttng-doc:funcref name="edit-bcc"/></entry>
2085 <entry>edit the Bcc field</entry>
2088 <entry><muttng-doc:key>y</muttng-doc:key></entry>
2089 <entry><muttng-doc:funcref name="send-message"/></entry>
2090 <entry>send the message</entry>
2093 <entry><muttng-doc:key>s</muttng-doc:key></entry>
2094 <entry><muttng-doc:funcref name="edit-subject"/></entry>
2095 <entry>edit the Subject</entry>
2098 <entry><muttng-doc:key>S</muttng-doc:key></entry>
2099 <entry><muttng-doc:funcref name="smime-menu"/></entry>
2100 <entry>select S/MIME options</entry>
2103 <entry><muttng-doc:key>f</muttng-doc:key></entry>
2104 <entry><muttng-doc:funcref name="edit-fcc"/></entry>
2105 <entry>specify an ``Fcc'' mailbox</entry>
2108 <entry><muttng-doc:key>p</muttng-doc:key></entry>
2109 <entry><muttng-doc:funcref name="pgp-menu"/></entry>
2110 <entry>select PGP options</entry>
2113 <entry><muttng-doc:key>P</muttng-doc:key></entry>
2114 <entry><muttng-doc:funcref name="postpone-message"/></entry>
2115 <entry>postpone this message until later</entry>
2118 <entry><muttng-doc:key>q</muttng-doc:key></entry>
2119 <entry><muttng-doc:funcref name="quit"/></entry>
2120 <entry>quit (abort) sending the message</entry>
2123 <entry><muttng-doc:key>w</muttng-doc:key></entry>
2124 <entry><muttng-doc:funcref name="write-fcc"/></entry>
2125 <entry>write the message to a folder</entry>
2128 <entry><muttng-doc:key>i</muttng-doc:key></entry>
2129 <entry><muttng-doc:funcref name="ispell"/></entry>
2130 <entry>check spelling (if available on your system)</entry>
2133 <entry><muttng-doc:key mod="C">F</muttng-doc:key></entry>
2134 <entry><muttng-doc:funcref name="forget-passphrase"/></entry>
2135 <entry>wipe passphrase(s) from memory</entry>
2144 <emphasis role="bold">Note:</emphasis> The attach-message function
2145 will prompt you for a folder to
2146 attach messages from. You can now tag messages in that folder and
2147 theywill be attached to the message you are sending. Note that
2148 certainoperations like composing a new mail, replying, forwarding,
2150 not permitted when you are in that folder. The <literal>%r</literal>
2151 in <muttng-doc:varref name="status-format"/>
2153 a 'A' to indicate that you are in attach-message mode.
2162 <sect2 id="sending-reply">
2163 <title>Replying</title>
2165 <sect3 id="sending-simple-reply">
2166 <title>Simple Replies</title>
2169 When you want to reply to an email message, select it in the index
2170 menu and then press <muttng-doc:key>r</muttng-doc:key>. Mutt-ng's behaviour is
2172 behaviour when you compose a message: first, you will be asked for
2173 the recipient, then for the subject, and then, mutt-ng will start
2174 the editor with the quote attribution and the quoted message. This
2175 can e.g. look like the example below.
2180 <muttng-doc:lstmail>
2181 On Mon, Mar 07, 2005 at 05:02:12PM +0100, Michael Svensson wrote:
2182 > Bill, can you please send last month's progress report to Mr.
2183 > Morgan? We also urgently need the cost estimation for the new
2184 > production server that we want to set up before our customer's
2185 > project will go live.</muttng-doc:lstmail>
2190 You can start editing the email message. It is strongly
2191 recommended to put your answer <emphasis>below</emphasis> the
2193 only quote what is really necessary and that you refer to. Putting
2194 your answer on top of the quoted message, is, although very
2195 widespread, very often not considered to be a polite way to answer
2200 The quote attribution is configurable, by default it is set to
2202 <muttng-doc:lstconf>
2203 set attribution = "On %d, %n wrote:"</muttng-doc:lstconf>
2208 It can also be set to something more compact, e.g.
2210 <muttng-doc:lstconf>
2211 set attribution = "attribution="* %n <%a> [%(%y-%m-%d %H:%M)]:"</muttng-doc:lstconf>
2216 The example above results in the following attribution:
2218 <muttng-doc:lstmail>
2219 * Michael Svensson <svensson@foobar.com> [05-03-06 17:02]:
2220 > Bill, can you please send last month's progress report to Mr.
2221 > Morgan? We also urgently need the cost estimation for the new
2222 > production server that we want to set up before our customer's
2223 > project will go live.</muttng-doc:lstmail>
2228 Generally, try to keep your attribution short yet
2229 information-rich. It is <emphasis>not</emphasis> the right place
2231 long "attribution" novels or anything like that: the right place
2232 for such things is - if at all - the email signature at the very
2233 bottom of the message.
2237 When you're done with writing your message, save and quit the
2238 editor. As before, you will return to the compose menu, which is
2239 used in the same way as before.
2248 <sect3 id="sending-group-reply">
2249 <title>Group Replies</title>
2252 In the situation where a group of people uses email as a
2253 discussion, most of the emails will have one or more recipients,
2254 and probably several "Cc:" recipients. The group reply
2255 functionalityensures that when you press <muttng-doc:key>g</muttng-doc:key>
2256 instead of <muttng-doc:key>r</muttng-doc:key> to do a reply,
2257 each and every recipient that is contained in the original message
2258 will receive a copy of the message, either as normal recipient or
2268 <sect3 id="sending-list-reply">
2269 <title>List Replies</title>
2272 When you use mailing lists, it's generally better to send your
2273 reply to a message only to the list instead of the list and the
2274 original author. To make this easy to use, mutt-ng features list
2279 To do a list reply, simply press <muttng-doc:key>L</muttng-doc:key>. If the email
2281 a <literal>Mail-Followup-To:</literal> header, its value will be
2283 address. Otherwise, mutt-ng searches through all mail addresses in
2284 the original message and tries to match them a list of regular
2285 expressions which can be specified using the <literal>lists</literal> command.
2286 If any of the regular expression matches, a mailing
2287 list address has been found, and it will be used as reply address.
2292 <muttng-doc:lstconf>
2293 lists linuxevent@luga\.at vuln-dev@ mutt-ng-users@</muttng-doc:lstconf>
2298 Nowadays, most mailing list software like GNU Mailman adds a
2299 <literal>Mail-Followup-To:</literal> header to their emails anyway,
2301 <literal>lists</literal> is hardly ever necessary in practice.
2316 <sect2 id="sending-edit-header">
2317 <title>Editing the message header</title>
2320 When editing the header of your outgoing message, there are a couple
2322 special features available.
2328 <literal>Fcc:</literal> <emphasis>filename</emphasis>
2330 Mutt-ng will pick up <emphasis>filename</emphasis>
2331 just as if you had used the <emphasis>edit-fcc</emphasis> function in
2332 the <emphasis>compose</emphasis> menu.
2336 You can also attach files to your message by specifying
2338 <muttng-doc:lstmail>
2339 Attach: filename [description]</muttng-doc:lstmail>
2341 where <emphasis>filename</emphasis> is the file to attach and <emphasis>
2345 optional string to use as the description of the attached file.
2349 When replying to messages, if you remove the <emphasis>In-Reply-To:</emphasis> field from
2350 the header field, Mutt-ng will not generate a <emphasis>References:</emphasis> field, which
2351 allows you to create a new message thread.
2355 Also see the <muttng-doc:varref name="edit-headers"/> and
2356 <muttng-doc:varref name="editor-headers"/> variables
2365 <sect2 id="sending-crypto">
2366 <title>Using Mutt-ng with PGP</title>
2369 If you want to use PGP, you can specify
2371 <muttng-doc:lstmail>
2372 Pgp: [E | S | S id]</muttng-doc:lstmail>
2374 ``E'' encrypts, ``S'' signs and
2375 ``S<id>'' signs with the given key, setting
2376 <muttng-doc:varref name="pgp-sign-as"/>
2381 If you have told mutt to PGP encrypt a message, it will guide you
2382 through a key selection process when you try to send the message.
2383 Mutt-ng will not ask you any questions about keys which have a
2384 certified user ID matching one of the message recipients' mail
2385 addresses. However, there may be situations in which there are
2386 several keys, weakly certified user ID fields, or where no matching
2391 In these cases, you are dropped into a menu with a list of keys from
2392 which you can select one. When you quit this menu, or mutt can't
2393 find any matching keys, you are prompted for a user ID. You can, as
2394 usually, abort this prompt using <muttng-doc:key mod="C">G</muttng-doc:key>. When
2395 you do so, mutt will
2396 return to the compose screen.
2400 Once you have successfully finished the key selection, the message
2401 will be encrypted using the selected public keys, and sent out.
2405 Most fields of the entries in the key selection menu (see also
2406 <muttng-doc:varref name="pgp-entry-format"/>)
2407 have obvious meanings. But some explanations on the capabilities,
2409 and validity fields are in order.
2413 The flags sequence (%f) will expand to one of the following
2417 <table frame="none" rowsep="1" texstr="l|l">
2418 <title>PGP Key Menu Flags</title>
2419 <tgroup cols="2" align="left" colsep="1" rowsep="1">
2423 <entry>Description</entry>
2428 <entry><literal>R</literal></entry>
2429 <entry>The key has been revoked and can't be used.</entry>
2432 <entry><literal>X</literal></entry>
2433 <entry>The key is expired and can't be used.</entry>
2436 <entry><literal>d</literal></entry>
2437 <entry>You have marked the key as disabled.</entry>
2440 <entry><literal>c</literal></entry>
2441 <entry>There are unknown critical self-signature packets.</entry>
2450 The capabilities field (%c) expands to a two-character
2451 sequencerepresenting a key's capabilities. The first character gives
2452 the key's encryption capabilities: A minus sign (<emphasis role="bold">
2456 that the key cannot be used for encryption. A dot (<emphasis role="bold">
2460 it's marked as a signature key in one of the user IDs, but may
2461 also be used for encryption. The letter <emphasis role="bold">e</emphasis> indicates that
2462 this key can be used for encryption.
2466 The second character indicates the key's signing capabilities. Once
2467 again, a ``<emphasis role="bold">-</emphasis>'' implies ``not for
2468 signing'', ``<emphasis role="bold">.</emphasis>'' implies
2469 that the key is marked as an encryption key in one of the user-ids,
2471 ``<emphasis role="bold">s</emphasis>'' denotes a key which can be
2476 Finally, the validity field (%t) indicates how well-certified
2478 is. A question mark (<emphasis role="bold">?</emphasis>) indicates
2479 undefined validity, a minus
2480 character (<emphasis role="bold">-</emphasis>) marks an untrusted
2481 association, a space character
2482 means a partially trusted association, and a plus character (<emphasis role="bold">
2486 indicates complete validity.
2495 <sect2 id="sending-mixmaster">
2496 <title>Sending anonymous messages via mixmaster</title>
2499 You may also have configured mutt to co-operate with Mixmaster, an
2500 anonymous remailer. Mixmaster permits you to send your messages
2501 anonymously using a chain of remailers. Mixmaster support in mutt is
2503 mixmaster version 2.04 (beta 45 appears to be the latest) and 2.03.
2504 It does not support earlier versions or the later so-called version 3
2506 of which the latest appears to be called 2.9b23.
2510 To use it, you'll have to obey certain restrictions. Most
2511 important, you cannot use the <literal>Cc</literal> and <literal>Bcc</literal> headers. To tell
2512 Mutt-ng to use mixmaster, you have to select a remailer chain, using
2513 the mix function on the compose menu.
2517 The chain selection screen is divided into two parts. In the
2518 (larger) upper part, you get a list of remailers you may use. In
2519 the lower part, you see the currently selected chain of remailers.
2523 You can navigate in the chain using the <literal>chain-prev</literal>
2525 <literal>chain-next</literal> functions, which are by default bound
2527 and right arrows and to the <muttng-doc:key>h</muttng-doc:key> and <muttng-doc:key>l</muttng-doc:key> keys (think vi
2528 keyboard bindings). To insert a remailer at the current chain
2529 position, use the <literal>insert</literal> function. To append a
2531 the current chain position, use <literal>select-entry</literal> or <literal>
2535 You can also delete entries from the chain, using the corresponding
2536 function. Finally, to abandon your changes, leave the menu, or
2537 <literal>accept</literal> them pressing (by default) the <literal>
2544 Note that different remailers do have different capabilities,
2545 indicated in the <literal>%c</literal> entry of the remailer menu lines (see
2546 <muttng-doc:varref name="mix-entry-format"/>).
2548 the ``middleman'' capability, indicated by a capital ``M'': This
2549 means that the remailer in question cannot be used as the final
2550 element of a chain, but will only forward messages to other
2551 mixmaster remailers. For details on the other capabilities, please
2552 have a look at the mixmaster documentation.
2567 <sect1 id="forwarding-mail">
2568 <title>Forwarding and Bouncing Mail</title>
2571 Often, it is necessary to forward mails to other people.
2572 Therefore, mutt-ng supports forwarding messages in two different
2577 The first one is regular forwarding, as you probably know it from
2578 other mail clients. You simply press <muttng-doc:key>f</muttng-doc:key>, enter the
2580 email address, the subject of the forwarded email, and then you can
2581 edit the message to be forwarded in the editor. The forwarded
2582 message is separated from the rest of the message via the two
2588 <muttng-doc:lstmail>
2589 ----- Forwarded message from Lucas User <luser@example.com> -----
2591 From: Lucas User <luser@example.com>
2592 Date: Thu, 02 Dec 2004 03:08:34 +0100
2593 To: Michael Random <mrandom@example.com>
2594 Subject: Re: blackmail
2596 Pay me EUR 50,000.- cash or your favorite stuffed animal will die
2599 ----- End forwarded message -----</muttng-doc:lstmail>
2604 When you're done with editing the mail, save and quit the editor,
2605 and you will return to the compose menu, the same menu you also
2606 encounter when composing or replying to mails.
2610 The second mode of forwarding emails with mutt-ng is the
2611 so-called <emphasis>bouncing</emphasis>: when you bounce an email to
2613 address, it will be sent in practically the same format you send it
2614 (except for headers that are created during transporting the
2615 message). To bounce a message, press <muttng-doc:key>b</muttng-doc:key> and enter the
2617 email address. By default, you are then asked whether you really
2618 want to bounce the message to the specified recipient. If you answer
2619 with yes, the message will then be bounced.
2623 To the recipient, the bounced email will look as if he got it
2624 like a regular email where he was <literal>Bcc:</literal> recipient.
2626 possibility to find out whether it was a bounced email is to
2627 carefully study the email headers and to find out which host really
2637 <sect1 id="postponing-mail">
2638 <title>Postponing Mail</title>
2641 At times it is desirable to delay sending a message that you have
2642 already begun to compose. When the <emphasis>postpone-message</emphasis> function is
2643 used in the <emphasis>compose</emphasis> menu, the body of your message
2645 are stored in the mailbox specified by the
2646 <muttng-doc:varref name="postponed"/> variable. This means that you can recall the
2647 message even if you exit Mutt-ng and then restart it at a later time.
2651 Once a message is postponed, there are several ways to resume it. From
2653 command line you can use the ``-p'' option, or if you <emphasis>compose</emphasis> a new
2654 message from the <emphasis>index</emphasis> or <emphasis>pager</emphasis> you will be prompted if postponed
2655 messages exist. If multiple messages are currently postponed, the
2656 <emphasis>postponed</emphasis> menu will pop up and you can select
2657 which message you would
2662 <emphasis role="bold">Note:</emphasis> If you postpone a reply to a
2663 message, the reply setting of
2664 the message is only updated when you actually finish the message and
2665 send it. Also, you must be in the same folder with the message you
2666 replied to for the status of the message to be updated.
2670 See also the <muttng-doc:varref name="postpone"/> quad-option.
2688 <chapter id="configuration"> <!--{{{-->
2689 <title>Configuration</title>
2691 <sect1 id="configuration-files">
2692 <title>Locations of Configuration Files</title>
2695 While the default configuration (or ``preferences'') make Mutt-ng
2697 of the box, it is often desirable to tailor Mutt-ng to suit your own
2699 Mutt-ng is first invoked, it will attempt to read the ``system''
2701 file (defaults set by your local system administrator), unless the
2702 ``-n'' <link linkend="commandline">commandline</link> option is
2703 specified. This file is
2704 typically <literal>/usr/local/share/muttng/Muttngrc</literal> or <literal>
2708 Mutt-ng users will find this file in <literal>
2709 /usr/local/share/muttng/Muttrc
2712 <literal>/etc/Muttngrc</literal>. Mutt will next look for a file named <literal>
2715 in your home directory, Mutt-ng will look for <literal>.muttngrc</literal>. If this file
2716 does not exist and your home directory has a subdirectory named <literal>
2720 mutt try to load a file named <literal>.muttng/muttngrc</literal>.
2724 <literal>.muttrc</literal> (or <literal>.muttngrc</literal> for
2725 Mutt-ng) is the file where you will
2726 usually place your <link linkend="commands">commands</link> to
2736 <sect1 id="configuration-syntax">
2737 <title>Basic Syntax of Initialization Files</title>
2740 An initialization file consists of a series of <link linkend="commands">commands</link>. Each line of the file may contain one or more commands.
2741 When multiple commands are used, they must be separated by a semicolon
2744 <muttng-doc:lstconf>
2745 set realname='Mutt-ng user' ; ignore x-</muttng-doc:lstconf>
2747 The hash mark, or pound sign
2748 (``#''), is used as a ``comment'' character. You can use it to
2749 annotate your initialization file. All text after the comment character
2750 to the end of the line is ignored. For example,
2755 <muttng-doc:lstconf>
2756 my_hdr X-Disclaimer: Why are you listening to me? # This is a comment</muttng-doc:lstconf>
2761 Single quotes (') and double quotes (") can be used to quote
2763 which contain spaces or other special characters. The difference
2765 the two types of quotes is similar to that of many popular shell
2767 namely that a single quote is used to specify a literal string (one
2769 not interpreted for shell variables or quoting with a backslash
2771 next paragraph), while double quotes indicate a string for which
2772 should be evaluated. For example, backtics are evaluated inside of
2774 quotes, but <emphasis role="bold">not</emphasis> for single quotes.
2778 \ quotes the next character, just as in shells such as bash and
2780 For example, if want to put quotes ``"'' inside of a string, you
2782 ``\'' to force the next character to be a literal instead of
2786 <muttng-doc:lstconf>
2787 set realname="Michael \"MuttDude\" Elkins"</muttng-doc:lstconf>
2792 ``\\'' means to insert a literal ``\'' into the line.
2793 ``\n'' and ``\r'' have their usual C meanings of linefeed and
2794 carriage-return, respectively.
2798 A \ at the end of a line can be used to split commands over
2799 multiple lines, provided that the split points don't appear in the
2800 middle of command names.
2804 Please note that, unlike the various shells, mutt-ng interprets a
2806 at the end of a line also in comments. This allows you to disable a
2808 split over multiple lines with only one ``#''.
2813 <muttng-doc:lstconf>
2815 set realname="Michael \"MuttDude\" Elkins"</muttng-doc:lstconf>
2820 When testing your config files, beware the following caveat. The
2822 at the end of the commented line extends the current line with the next
2824 - then referred to as a ``continuation line''. As the first line is
2825 commented with a hash (#) all following continuation lines are also
2826 part of a comment and therefore are ignored, too. So take care of
2828 when continuation lines are involved within your setup files!
2837 <muttng-doc:lstconf>
2842 line5</muttng-doc:lstconf>
2847 line1 ``continues'' until line4. however, the part after the # is a
2848 comment which includes line3 and line4. line5 is a new line of its own
2850 thus is interpreted again.
2854 The commands understood by mutt are explained in the next paragraphs.
2855 For a complete list, see the <link linkend="commands">commands</link>.
2864 <sect1 id="configuration-expansion">
2865 <title>Expansion within variables</title>
2868 Besides just assign static content to variables, there's plenty of
2869 ways of adding external and more or less dynamic content.
2872 <sect2 id="configuration-expansion-commands">
2873 <title>Commands' Output</title>
2876 It is possible to substitute the output of a Unix command in an
2877 initialization file. This is accomplished by enclosing the command
2878 in backquotes (``) as in, for example:
2883 <muttng-doc:lstconf>
2884 my_hdr X-Operating-System: `uname -a`</muttng-doc:lstconf>
2889 The output of the Unix command ``uname -a'' will be substituted
2890 before the line is parsed. Note that since initialization files are
2891 line oriented, only the first line of output from the Unix command
2892 will be substituted.
2897 <sect2 id="configuration-expansion-environment">
2898 <title>Environment Variables</title>
2901 UNIX environments can be accessed like the way it is done in
2902 shells like sh and bash: Prepend the name of the environment by a
2903 ``$'' sign. For example,
2908 <muttng-doc:lstconf>
2909 set record=+sent_on_$HOSTNAME</muttng-doc:lstconf>
2914 sets the <muttng-doc:varref name="record"/> variable to the
2915 string <emphasis>+sent_on_</emphasis> and appends the
2916 value of the evironment
2917 variable <muttng-doc:envvar name="HOSTNAME"/>.
2921 <emphasis role="bold">Note:</emphasis> There will be no warning if an
2922 environment variable
2923 is not defined. The result will of the expansion will then be empty.
2928 <sect2 id="configuration-expansion-config">
2929 <title>Configuration Variables</title>
2932 As for environment variables, the values of all configuration
2933 variables as string can be used in the same way, too. For example,
2938 <muttng-doc:lstconf>
2939 set imap_home_namespace = $folder</muttng-doc:lstconf>
2944 would set the value of <muttng-doc:varref name="imap-home-namespace"/>
2945 to the value to which <muttng-doc:varref name="folder"/>
2946 is <emphasis>currently</emphasis> set to.
2950 <emphasis role="bold">Note:</emphasis> There're no logical links
2951 established in such cases so
2952 that the the value for <muttng-doc:varref name="imap-home-namespace"/>
2954 if <muttng-doc:varref name="folder"/> gets changed.
2958 <emphasis role="bold">Note:</emphasis> There will be no warning if a
2959 configuration variable
2960 is not defined or is empty. The result will of the expansion will
2966 <sect2 id="configuration-expansion-self">
2967 <title>Self-Defined Variables</title>
2970 Mutt-ng flexibly allows users to define their own variables. To
2971 avoid conflicts with the standard set and to prevent misleading
2972 error messages, there's a reserved namespace for them: all
2973 user-defined variables must be prefixed with <literal>user_</literal> and can be
2974 used just like any ordinary configuration or environment
2979 For example, to view the manual, users can either define two
2980 macros like the following
2985 <muttng-doc:lstconf>
2986 macro generic <F1> "!less -r /path/to/manual" "Show manual"
2987 macro pager <F1> "!less -r /path/to/manual" "Show manual"</muttng-doc:lstconf>
2992 for <literal>generic</literal>, <literal>pager</literal> and <literal>
2995 .The alternative is to
2996 define a custom variable like so:
3001 <muttng-doc:lstconf>
3002 set user_manualcmd = "!less -r /path/to_manual"
3003 macro generic <F1> "$user_manualcmd<enter>" "Show manual"
3004 macro pager <F1> "$user_manualcmd<enter>" "Show manual"
3005 macro index <F1> "$user_manualcmd<enter>" "Show manual"</muttng-doc:lstconf>
3010 to re-use the command sequence as in:
3015 <muttng-doc:lstconf>
3016 macro index <F2> "$user_manualcmd | grep '\^[ ]\\+~. '" "Show Patterns"</muttng-doc:lstconf>
3021 Using this feature, arbitrary sequences can be defined once and
3022 recalled and reused where necessary. More advanced scenarios could
3023 include to save a variable's value at the beginning of macro
3024 sequence and restore it at end.
3028 When the variable is first defined, the first value it gets
3029 assigned is also the initial value to which it can be reset using
3030 the <literal>reset</literal> command.
3034 The complete removal is done via the <literal>unset</literal>
3039 After the following sequence:
3044 <muttng-doc:lstconf>
3046 set user_foo = 666</muttng-doc:lstconf>
3051 the variable <literal>$user_foo</literal> has a current value
3053 initial of 42. The query
3058 <muttng-doc:lstconf>
3059 set ?user_foo</muttng-doc:lstconf>
3064 will show 666. After doing the reset via
3069 <muttng-doc:lstconf>
3070 reset user_foo</muttng-doc:lstconf>
3075 a following query will give 42 as the result. After unsetting it
3081 <muttng-doc:lstconf>
3082 unset user_foo</muttng-doc:lstconf>
3087 any query or operation (except the noted expansion within other
3088 statements) will lead to an error message.
3093 <sect2 id="configuration-expansion-predef">
3094 <title>Pre-Defined Variables</title>
3097 In order to allow users to share one setup over a number of
3098 different machines without having to change its contents, there's a
3099 number of pre-defined variables. These are prefixed with
3100 <literal>muttng_</literal> and are read-only, i.e. they cannot
3102 reset. The reference chapter lists all available variables.
3106 <emphasis> Please consult the local copy of your manual for their
3107 values as they may differ from different manual sources.
3110 the manual is installed in can be queried (already using such a
3111 variable) by running:
3116 <muttng-doc:lstshell>
3117 $ muttng -Q muttng_docdir</muttng-doc:lstshell>
3122 To extend the example for viewing the manual via self-defined
3123 variables, it can be made more readable and more portable by
3124 changing the real path in:
3129 <muttng-doc:lstconf>
3130 set user_manualcmd = '!less -r /path/to_manual'</muttng-doc:lstconf>
3140 <muttng-doc:lstconf>
3141 set user_manualcmd = "!less -r $muttng_docdir/manual.txt"</muttng-doc:lstconf>
3146 which works everywhere if a manual is installed.
3150 Please note that by the type of quoting, muttng determines when
3151 to expand these values: when it finds double quotes, the value will
3152 be expanded during reading the setup files but when it finds single
3153 quotes, it'll expand it at runtime as needed.
3157 For example, the statement
3162 <muttng-doc:lstconf>
3163 folder-hook . "set user_current_folder = $muttng_folder_name"</muttng-doc:lstconf>
3168 will be already be translated to the following when reading the
3174 <muttng-doc:lstconf>
3175 folder-hook . "set user_current_folder = some_folder"</muttng-doc:lstconf>
3180 with <literal>some_folder</literal> being the name of the
3182 opens. On the contrary,
3187 <muttng-doc:lstconf>
3188 folder-hook . 'set user_current_folder = $muttng_folder_name'</muttng-doc:lstconf>
3193 will be executed at runtime because of the single quotes so that
3194 <literal>user_current_folder</literal> will always have
3195 the value of the currently
3200 A more practical example is:
3205 <muttng-doc:lstconf>
3206 folder-hook . 'source ~/.mutt/score-$muttng_folder_name'</muttng-doc:lstconf>
3211 which can be used to source files containing score commands
3212 depending on the folder the user enters.
3217 <sect2 id="configuration-expansion-typeconv">
3218 <title>Type Conversions</title>
3221 A note about variable's types during conversion: internally
3222 values are stored in internal types but for any dump/query or set
3223 operation they're converted to and from string. That means that
3224 there's no need to worry about types when referencing any variable.
3225 As an example, the following can be used without harm (besides
3226 makeing muttng very likely behave strange):
3231 <muttng-doc:lstconf>
3233 set folder = $read_inc
3234 set read_inc = $folder
3235 set user_magic_number = 42
3236 set folder = $user_magic_number</muttng-doc:lstconf>
3245 <title>Defining/Using aliases</title>
3248 <muttng-doc:cmddef name="alias">
3249 key address [, address,...]
3250 </muttng-doc:cmddef>
3254 It's usually very cumbersome to remember or type out the address of
3256 you are communicating with. Mutt-ng allows you to create ``aliases''
3258 a short string to a full address.
3262 <emphasis role="bold">Note:</emphasis> if you want to create an alias
3263 for a group (by specifying more than
3264 one address), you <emphasis role="bold">must</emphasis> separate the
3265 addresses with a comma (``,'').
3269 To remove an alias or aliases (``*'' means all aliases):
3273 <muttng-doc:cmddef name="unalias">
3275 </muttng-doc:cmddef>
3280 <muttng-doc:lstconf>
3281 alias muttdude me@cs.hmc.edu (Michael Elkins)
3282 alias theguys manny, moe, jack</muttng-doc:lstconf>
3287 Unlike other mailers, Mutt-ng doesn't require aliases to be defined
3288 in a special file. The <literal>alias</literal> command can appear
3290 a configuration file, as long as this file is <muttng-doc:cmdref name="source"/>.
3291 Consequently, you can have multiple alias files, or
3292 you can have all aliases defined in your muttrc.
3296 On the other hand, the <muttng-doc:funcref name="create-alias"/>
3297 function can use only one file, the one pointed to by the
3298 <muttng-doc:varref name="alias-file"/>
3300 <literal>~/.muttrc</literal> by default). This file is not
3302 in the sense that Mutt-ng will happily append aliases to any file, but
3304 order for the new aliases to take effect you need to explicitly <muttng-doc:cmdref name="source"/>
3314 <muttng-doc:lstconf>
3315 source /usr/local/share/Mutt-ng.aliases
3316 source ~/.mail_aliases
3317 set alias_file=~/.mail_aliases</muttng-doc:lstconf>
3322 To use aliases, you merely use the alias at any place in mutt where
3323 muttprompts for addresses, such as the <emphasis>To:</emphasis> or <emphasis>
3327 also enter aliases in your editor at the appropriate headers if you
3329 <muttng-doc:varref name="editor-headers"/>
3334 In addition, at the various address prompts, you can use the tab
3336 to expand a partial alias to the full alias. If there are multiple
3338 mutt will bring up a menu with the matching aliases. In order to be
3339 presented with the full list of aliases, you must hit tab with out a
3341 alias, such as at the beginning of the prompt or after a comma denoting
3346 In the alias menu, you can select as many aliases as you want with the
3347 <emphasis>select-entry</emphasis> key (default: RET), and use the <emphasis>
3351 (default: q) to return to the address prompt.
3361 <title>Changing the default key bindings</title>
3364 <muttng-doc:cmddef name="bind">
3366 </muttng-doc:cmddef>
3370 This command allows you to change the default key bindings (operation
3371 invoked when pressing a key).
3375 <emphasis>map</emphasis> specifies in which menu the binding belongs.
3377 be specified by separating them with commas (no additional whitespace
3378 isallowed). The currently defined maps are:
3386 <term>generic</term>
3389 This is not a real menu, but is used as a fallback for all of
3391 menus except for the pager and editor modes. If a key is not
3393 another menu, Mutt-ng will look for a binding to use in this
3395 you to bind a key to a certain function in multiple menus
3397 multiple bind statements to accomplish the same task.
3405 The alias menu is the list of your personal aliases as defined
3407 muttrc. It is the mapping from a short alias name to the full
3409 address(es) of the recipient(s).
3417 The attachment menu is used to access the attachments on
3423 <term>browser</term>
3426 The browser is used for both browsing the local directory
3428 listing all of your incoming mailboxes.
3436 The editor is the line-based editor the user enters text data.
3444 The index is the list of messages contained in a mailbox.
3449 <term>compose</term>
3452 The compose menu is the screen used when sending a new message.
3460 The pager is the mode used to display message/attachment data,
3470 The pgp menu is used to select the OpenPGP keys used for
3477 <term>postpone</term>
3480 The postpone menu is similar to the index menu, except is used
3482 recalling a message the user was composing, but saved until
3491 <emphasis>key</emphasis> is the key (or key sequence) you wish to bind.
3493 control character, use the sequence <emphasis>\Cx</emphasis>,
3494 where <emphasis>x</emphasis> is the
3495 letter of the control character (for example, to specify control-A use
3496 ``\Ca''). Note that the case of <emphasis>x</emphasis> as well as
3497 <emphasis>\C</emphasis> is
3498 ignored, so that <emphasis>\CA</emphasis>, <emphasis>\Ca</emphasis>, <emphasis>
3501 and <emphasis>\ca</emphasis> are all
3502 equivalent. An alternative form is to specify the key as a three digit
3503 octal number prefixed with a ``\'' (for example <emphasis>
3507 equivalent to <emphasis>\c?</emphasis>).
3511 In addition, <emphasis>key</emphasis> may consist of:
3516 <table frame="none" rowsep="1" texstr="l|l">
3517 <title>Alternative Key Names</title>
3518 <tgroup cols="2" align="left" colsep="1" rowsep="1">
3521 <entry>Sequence</entry>
3522 <entry>Description</entry>
3527 <entry><literal>\t</literal></entry>
3531 <entry><literal><tab></literal></entry>
3535 <entry><literal><backtab></literal></entry>
3536 <entry>backtab / shift-tab</entry>
3539 <entry><literal>\r</literal></entry>
3540 <entry>carriage return</entry>
3543 <entry><literal>\n</literal></entry>
3544 <entry>newline</entry>
3547 <entry><literal>\e</literal></entry>
3548 <entry>escape</entry>
3551 <entry><literal><esc></literal></entry>
3552 <entry>escape</entry>
3555 <entry><literal><up></literal></entry>
3556 <entry>up arrow</entry>
3559 <entry><literal><down></literal></entry>
3560 <entry>down arrow</entry>
3563 <entry><literal><left></literal></entry>
3564 <entry>left arrow</entry>
3567 <entry><literal><right></literal></entry>
3568 <entry>right arrow</entry>
3571 <entry><literal><pageup></literal></entry>
3572 <entry>Page Up</entry>
3575 <entry><literal><pagedown></literal></entry>
3576 <entry>Page Down</entry>
3579 <entry><literal><backspace></literal></entry>
3580 <entry>Backspace</entry>
3583 <entry><literal><delete></literal></entry>
3584 <entry>Delete</entry>
3587 <entry><literal><insert></literal></entry>
3588 <entry>Insert</entry>
3591 <entry><literal><enter></literal></entry>
3592 <entry>Enter</entry>
3595 <entry><literal><return></literal></entry>
3596 <entry>Return</entry>
3599 <entry><literal><home></literal></entry>
3603 <entry><literal><end></literal></entry>
3607 <entry><literal><space></literal></entry>
3608 <entry>Space bar</entry>
3611 <entry><literal><f1></literal></entry>
3612 <entry>function key 1</entry>
3615 <entry><literal><f10></literal></entry>
3616 <entry>function key 10</entry>
3625 <emphasis>key</emphasis> does not need to be enclosed in quotes unless
3631 <emphasis>function</emphasis> specifies which action to take when <emphasis>
3635 For a complete list of functions, see the <link linkend="functions">functions</link>.
3636 The special function <literal>noop</literal> unbinds the specified key
3646 <sect1 id="charset-hook">
3647 <title>Defining aliases for character sets</title>
3649 <anchor id="iconv-hook"/>
3651 Usage: <muttng-doc:hook name="charset"/> <emphasis>alias</emphasis> <emphasis> charset</emphasis>
3654 Usage: <muttng-doc:hook name="iconv"/> <emphasis>charset</emphasis> <emphasis> local-charset </emphasis>
3658 The <muttng-doc:hook name="charset"/> command defines an alias for a
3660 This is useful to properly display messages which are tagged with a
3661 character set name not known to mutt.
3665 The <muttng-doc:hook name="iconv"/> command defines a system-specific
3667 character set. This is helpful when your systems character
3668 conversion library insists on using strange, system-specific names
3678 <sect1 id="folder-hook">
3679 <title>Setting variables based upon mailbox</title>
3682 Usage: <muttng-doc:hook name="folder"/> [!]<emphasis>regexp</emphasis> <emphasis>command</emphasis>
3686 It is often desirable to change settings based on which mailbox you are
3687 reading. The <muttng-doc:hook name="folder"/> command provides a method by which you can
3689 any configuration command. <emphasis>regexp</emphasis> is a regular
3690 expression specifying
3691 in which mailboxes to execute <emphasis>command</emphasis> before
3692 loading. If a mailbox
3693 matches multiple <muttng-doc:hook name="folder"/>'s, they are executed in the order given in
3699 <emphasis role="bold">Note:</emphasis> if you use the ``!'' shortcut
3700 for <muttng-doc:varref name="spoolfile"/> at the beginning of the
3701 pattern, you must place it
3702 inside of double or single quotes in order to distinguish it from the
3703 logical <emphasis>not</emphasis> operator for the expression.
3707 Note that the settings are <emphasis>not</emphasis> restored when you
3709 For example, a command action to perform is to change the sorting
3710 methodbased upon the mailbox being read:
3715 <muttng-doc:lstconf>
3716 folder-hook mutt set sort=threads</muttng-doc:lstconf>
3721 However, the sorting method is not restored to its previous value when
3722 reading a different mailbox. To specify a <emphasis>default</emphasis>
3729 <muttng-doc:lstconf>
3730 folder-hook . set sort=date-sent</muttng-doc:lstconf>
3741 <title>Keyboard macros</title>
3744 <muttng-doc:cmddef name="macro">
3745 menu key sequence [description]
3746 </muttng-doc:cmddef>
3750 Macros are useful when you would like a single key to perform a series
3752 actions. When you press <emphasis>key</emphasis> in menu <emphasis>
3755 ,Mutt-ng will behave as if
3756 you had typed <emphasis>sequence</emphasis>. So if you have a common
3757 sequence of commands
3758 you type, you can create a macro to execute those commands with a
3763 <emphasis>menu</emphasis> is the <link linkend="maps">maps</link> which
3764 the macro will be bound.
3765 Multiple maps may be specified by separating multiple menu arguments by
3766 commas. Whitespace may not be used in between the menu arguments and
3767 thecommas separating them.
3771 <emphasis>key</emphasis> and <emphasis>sequence</emphasis> are
3772 expanded by the same rules as the <muttng-doc:cmdref
3773 name="bind"/>. There are some additions however. The first
3774 is that control characters in <emphasis>sequence</emphasis> can
3775 also be specified as <literal>^x</literal>. In order to get a
3776 caret (`^'') you need to specify it twice. Secondly,
3777 to specify a certain key such as <emphasis>up</emphasis> or to
3778 invoke a function directly, you can use the format
3779 <emphasis><key name></emphasis> and <emphasis><function
3780 name> </emphasis> .For a listing of key names see the
3781 section on <muttng-doc:cmdref name="bind"/>. Functions are
3782 listed in the <link linkend="functions">functions</link>.
3786 The advantage with using function names directly is that the macros
3787 willwork regardless of the current key bindings, so they are not
3789 the user having particular key definitions. This makes them more
3790 robustand portable, and also facilitates defining of macros in files
3792 than one user (eg. the system Muttngrc).
3796 Optionally you can specify a descriptive text after <emphasis>sequence</emphasis>,
3797 which is shown in the help screens.
3801 <emphasis role="bold">Note:</emphasis> Macro definitions (if any)
3802 listed in the help screen(s), are
3803 silently truncated at the screen width, and are not wrapped.
3813 <title>Using color and mono video attributes</title>
3816 <muttng-doc:cmddef name="color">object foreground background [regexp]</muttng-doc:cmddef>
3819 <muttng-doc:cmddef name="color" noanchor="1">index foreground pattern</muttng-doc:cmddef>
3822 <muttng-doc:cmddef name="uncolor">index pattern [pattern ...]</muttng-doc:cmddef>
3826 If your terminal supports color, you can spice up Mutt-ng by creating
3828 color scheme. To define the color of an object (type of information),
3830 must specify both a foreground color <emphasis role="bold">and</emphasis> a background color (it is not
3831 possible to only specify one or the other).
3835 <emphasis>object</emphasis> can be one of:
3850 body (match <emphasis>regexp</emphasis> in the body of messages)
3856 bold (highlighting bold patterns in the body of messages)
3862 error (error messages printed by Mutt-ng)
3868 header (match <emphasis>regexp</emphasis> in the message header)
3874 hdrdefault (default color of the message header in the pager)
3880 index (match <emphasis>pattern</emphasis> in the message index)
3886 indicator (arrow or bar used to indicate the current item in a
3893 markers (the ``+'' markers at the beginning of wrapped lines in
3900 message (informational messages)
3912 quoted (text matching <muttng-doc:varref name="quote-regexp"/> in the body of a message)
3918 quoted1, quoted2, ..., quoted<emphasis role="bold">N</emphasis>
3919 (higher levels of quoting)
3925 search (highlighting of words in the pager)
3937 status (mode lines used to display info about the mailbox or
3944 tilde (the ``~'' used to pad blank lines in the pager)
3950 tree (thread tree drawn in the message index and attachment menu)
3956 underline (highlighting underlined patterns in the body of
3966 <emphasis>foreground</emphasis> and <emphasis>background</emphasis> can
3967 be one of the following:
4030 color<emphasis>x</emphasis>
4039 <emphasis>foreground</emphasis> can optionally be prefixed with the
4040 keyword <literal>bright</literal> to make
4041 the foreground color boldfaced (e.g., <literal>brightred</literal>).
4045 If your terminal supports it, the special keyword <emphasis>default</emphasis> can be
4046 used as a transparent color. The value <emphasis>brightdefault</emphasis> is also valid.
4047 If Mutt-ng is linked against the <emphasis>S-Lang</emphasis> library,
4048 you also need to set
4049 the <muttng-doc:envvar name="COLORFGBG"/> environment variable to the default
4051 terminal for this to work; for example (for Bourne-like shells):
4056 <muttng-doc:lstshell>
4057 set COLORFGBG="green;black"
4058 export COLORFGBG</muttng-doc:lstshell>
4063 <emphasis role="bold">Note:</emphasis> The <emphasis>S-Lang</emphasis>
4064 library requires you to use the <emphasis>lightgray</emphasis>
4065 and <emphasis>brown</emphasis> keywords instead of <emphasis>white</emphasis> and <emphasis>
4069 setting this variable.
4073 <emphasis role="bold">Note:</emphasis> The uncolor command can be
4074 applied to the index object only. It
4075 removes entries from the list. You <emphasis role="bold">must</emphasis> specify the same pattern
4076 specified in the color command for it to be removed. The pattern ``*''
4078 a special token which means to clear the color index list of all
4083 Mutt-ng also recognizes the keywords <emphasis>color0</emphasis>, <emphasis>
4087 <emphasis>color</emphasis><emphasis role="bold">N-1</emphasis> (<emphasis role="bold">
4090 being the number of colors supported
4091 by your terminal). This is useful when you remap the colors for your
4092 display (for example by changing the color associated with <emphasis>
4095 for your xterm), since color names may then lose their normal meaning.
4099 If your terminal does not support color, it is still possible change
4101 attributes through the use of the ``mono'' command:
4105 <muttng-doc:cmddef name="mono">object attribute [regexp]</muttng-doc:cmddef>
4108 <muttng-doc:cmddef name="mono" noanchor="1">index attribute pattern</muttng-doc:cmddef>
4111 <muttng-doc:cmddef name="unmono">index pattern [pattern ...]</muttng-doc:cmddef>
4115 where <emphasis>attribute</emphasis> is one of the following:
4163 <title>Ignoring (weeding) unwanted message headers</title>
4166 <muttng-doc:cmddef name="ignore">pattern [pattern ...]</muttng-doc:cmddef>
4170 <muttng-doc:cmddef name="unignore">pattern [pattern ...]</muttng-doc:cmddef>
4174 Messages often have many header fields added by automatic processing
4176 or which may not seem useful to display on the screen. This command
4178 you to specify header fields which you don't normally want to see.
4182 You do not need to specify the full header field name. For example,
4183 ``ignore content-'' will ignore all header fields that begin with the
4185 ``content-''. ``ignore *'' will ignore all headers.
4189 To remove a previously added token from the list, use the ``unignore''
4191 The ``unignore'' command will make Mutt-ng display headers with the
4193 For example, if you do ``ignore x-'' it is possible to ``unignore
4198 ``unignore *'' will remove all tokens from the ignore list.
4204 <muttng-doc:lstconf>
4205 # Sven's draconian header weeding
4207 unignore from date subject to cc
4208 unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
4209 unignore posted-to:</muttng-doc:lstconf>
4220 <title>Alternative addresses</title>
4223 <muttng-doc:cmddef name="alternates">regexp [regexp ...]</muttng-doc:cmddef>
4227 <muttng-doc:cmddef name="unalternates">regexp [regexp ...]</muttng-doc:cmddef>
4231 With various functions, mutt will treat messages differently,
4232 depending on whether you sent them or whether you received them from
4233 someone else. For instance, when replying to a message that you
4234 sent to a different party, mutt will automatically suggest to send
4235 the response to the original message's recipients--responding to
4236 yourself won't make much sense in many cases.
4237 (See <muttng-doc:varref name="reply-to"/>.)
4241 Many users receive e-mail under a number of different addresses. To
4242 fully use mutt's features here, the program must be able to
4243 recognize what e-mail addresses you receive mail under. That's the
4244 purpose of the <literal>alternates</literal> command: It takes a list
4246 expressions, each of which can identify an address under which you
4251 The <literal>unalternates</literal> command can be used to write
4253 <literal>alternates</literal> patterns. If an address matches something
4255 <literal>alternates</literal> command, but you nonetheless do not think
4257 from you, you can list a more precise pattern under an <literal>
4264 To remove a regular expression from the <literal>alternates</literal>
4266 <literal>unalternates</literal> command with exactly the same <emphasis>
4270 Likewise, if the <emphasis>regexp</emphasis> for a <literal>alternates</literal> command matches
4271 an entry on the <literal>unalternates</literal> list, that <literal>
4274 entry will be removed. If the <emphasis>regexp</emphasis> for <literal>
4277 is ``*'', <emphasis>all entries</emphasis> on <literal>alternates</literal> will be removed.
4286 <sect1 id="format-flowed">
4287 <title>Format = Flowed</title>
4289 <sect2 id="format-flowed-intro">
4290 <title>Introduction</title>
4293 Mutt-ng contains support for so-called <literal>format=flowed</literal> messages.
4294 In the beginning of email, each message had a fixed line width, and
4295 it was enough for displaying them on fixed-size terminals. But times
4296 changed, and nowadays hardly anybody still uses fixed-size terminals:
4297 more people nowaydays use graphical user interfaces, with dynamically
4298 resizable windows. This led to the demand of a new email format that
4299 makes it possible for the email client to make the email look nice
4300 in a resizable window without breaking quoting levels and creating
4301 an incompatible email format that can also be displayed nicely on
4302 old fixed-size terminals.
4306 For introductory information on <literal>format=flowed</literal>
4308 <muttng-doc:web url="http://www.joeclark.org/ffaq.html"/>.
4313 <sect2 id="format-flowed-display">
4314 <title>Receiving: Display Setup</title>
4317 When you receive emails that are marked as <literal>format=flowed</literal>
4318 messages, and is formatted correctly, mutt-ng will try to reformat
4319 the message to optimally fit on your terminal. If you want a fixed
4320 margin on the right side of your terminal, you can set the
4326 <muttng-doc:lstconf>
4327 set wrapmargin = 10</muttng-doc:lstconf>
4332 The code above makes the line break 10 columns before the right
4333 side of the terminal.
4337 If your terminal is so wide that the lines are embarrassingly long,
4338 you can also set a maximum line length:
4343 <muttng-doc:lstconf>
4344 set max_line_length = 120</muttng-doc:lstconf>
4349 The example above will give you lines not longer than 120
4354 When you view at <literal>format=flowed</literal> messages, you will
4356 the quoting hierarchy like in the following example:
4361 <muttng-doc:lstmail>
4362 >Bill, can you please send last month's progress report to Mr.
4363 >Morgan? We also urgently need the cost estimation for the new
4364 >production server that we want to set up before our customer's
4365 >project will go live.</muttng-doc:lstmail>
4370 This obviously doesn't look very nice, and it makes it very
4371 hard to differentiate between text and quoting character. The
4372 solution is to configure mutt-ng to "stuff" the quoting:
4377 <muttng-doc:lstconf>
4378 set stuff_quoted</muttng-doc:lstconf>
4383 This will lead to a nicer result that is easier to read:
4388 <muttng-doc:lstmail>
4389 > Bill, can you please send last month's progress report to Mr.
4390 > Morgan? We also urgently need the cost estimation for the new
4391 > production server that we want to set up before our customer's
4392 > project will go live.</muttng-doc:lstmail>
4398 <sect2 id="format-flowed-send">
4399 <title>Sending</title>
4402 If you want mutt-ng to send emails with <literal>format=flowed</literal> set, you
4403 need to explicitly set it:
4408 <muttng-doc:lstconf>
4409 set text_flowed</muttng-doc:lstconf>
4414 Additionally, you have to use an editor which supports writing
4415 <literal>format=flowed</literal>-conforming emails. For <muttng-doc:man name="vim"/>, this is
4417 adding <literal>w</literal> to the formatoptions (see <literal>:h
4421 <literal>:h fo-table</literal>) when writing emails.
4425 Also note that <emphasis>format=flowed</emphasis> knows about
4427 that is, when sending messages, some kinds of lines have to be
4428 indented with a single space on the sending side. On the receiving
4429 side, the first space (if any) is removed. As a consequence and in
4430 addition to the above simple setting, please keep this in mind when
4431 making manual formattings within the editor. Also note that mutt-ng
4432 currently violates the standard (<muttng-doc:rfc num="3676"/>) as it does not
4433 space-stuff lines starting with:
4441 <literal>></literal> This is <emphasis>not</emphasis> the
4442 quote character but a right
4443 angle used for other reasons
4452 Please make sure that you manually prepend a space to each of them.
4457 <sect2 id="format-flowed-notes">
4458 <title>Additional Notes</title>
4461 For completeness, the <muttng-doc:varref name="delete-space"/> variable provides the mechanism
4462 to generate a <literal>DelSp=yes</literal> parameter on <emphasis>
4466 According to the standard, clients receiving a <literal>format=flowed</literal>
4467 messages should delete the last space of a flowed line but still
4468 interpret the line as flowed. Because flowed lines usually contain
4469 only one space at the end, this parameter would make the receiving
4470 client concatenate the last word of the previous with the first of
4471 the current line <emphasis>without</emphasis> a space. This makes
4473 unreadable and is intended for languages rarely using spaces. So
4474 please use this setting only if you're sure what you're doing.
4486 <title>Mailing lists</title>
4489 <muttng-doc:cmddef name="lists">regexp [regexp ...]</muttng-doc:cmddef>
4492 <muttng-doc:cmddef name="unlists">regexp [regexp ...]</muttng-doc:cmddef>
4495 <muttng-doc:cmddef name="subscribe">regexp [regexp ...]</muttng-doc:cmddef>
4498 <muttng-doc:cmddef name="unsubscribe">regexp [regexp ...]</muttng-doc:cmddef>
4502 Mutt-ng has a few nice features for <link linkend="using-lists">using-lists</link>.
4503 In order to take advantage of them, you must
4504 specify which addresses belong to mailing lists, and which mailing
4505 lists you are subscribed to. Once you have done this, the
4506 <link linkend="func-list-reply">list-reply</link>
4507 function will work for all known lists.
4508 Additionally, when you send a message to a subscribed list, mutt will
4509 add a Mail-Followup-To header to tell other users' mail user agents
4510 not to send copies of replies to your personal address. Note that
4511 the Mail-Followup-To header is a non-standard extension which is not
4512 supported by all mail user agents. Adding it is not bullet-proof
4514 receiving personal CCs of list messages. Also note that the generation
4515 of the Mail-Followup-To header is controlled by the
4516 <muttng-doc:varref name="followup-to"/>
4517 configuration variable.
4521 More precisely, Mutt-ng maintains lists of patterns for the addresses
4522 of known and subscribed mailing lists. Every subscribed mailing
4523 list is known. To mark a mailing list as known, use the ``lists''
4524 command. To mark it as subscribed, use ``subscribe''.
4528 You can use regular expressions with both commands. To mark all
4529 messages sent to a specific bug report's address on mutt's bug
4530 tracking system as list mail, for instance, you could say
4531 ``subscribe [0-9]*@bugs.guug.de''. Often, it's sufficient to just
4532 give a portion of the list's e-mail address.
4536 Specify as much of the address as you need to to remove ambiguity. For
4537 example, if you've subscribed to the Mutt-ng mailing list, you will
4539 addressed to <emphasis>mutt-users@mutt.org</emphasis>. So, to tell
4540 Mutt-ng that this is a
4541 mailing list, you could add ``lists mutt-users'' to your
4542 initialization file. To tell mutt that you are subscribed to it,
4543 add ``subscribe mutt-users'' to your initialization file instead.
4544 If you also happen to get mail from someone whose address is
4545 <emphasis>mutt-users@example.com</emphasis>, you could use ``lists
4546 mutt-users@mutt\\.org''
4547 or ``subscribe mutt-users@mutt\\.org'' to
4548 match only mail from the actual list.
4552 The ``unlists'' command is used to remove a token from the list of
4553 known and subscribed mailing-lists. Use ``unlists *'' to remove all
4558 To remove a mailing list from the list of subscribed mailing lists,
4559 but keep it on the list of known mailing lists, use ``unsubscribe''.
4568 <sect1 id="mbox-hook">
4569 <title>Using Multiple spool mailboxes</title>
4572 Usage: <muttng-doc:hook name="mbox"/> [!]<emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
4576 This command is used to move read messages from a specified mailbox to
4577 adifferent mailbox automatically when you quit or change folders.
4578 <emphasis>pattern</emphasis> is a regular expression specifying the
4579 mailbox to treat as a
4580 ``spool'' mailbox and <emphasis>mailbox</emphasis> specifies where mail
4581 should be saved when
4586 Unlike some of the other <emphasis>hook</emphasis> commands, only the <emphasis>
4590 pattern is used (it is not possible to save read mail in more than a
4602 <title>Defining mailboxes which receive mail</title>
4605 <muttng-doc:cmddef name="mailboxes"> [!]filename [filename ... ]</muttng-doc:cmddef>
4608 <muttng-doc:cmddef name="unmailboxes"> [!]filename [filename ... ]</muttng-doc:cmddef>
4612 This command specifies folders which can receive mail and
4613 which will be checked for new messages. By default, the
4614 main menu status bar displays how many of these folders have
4619 When changing folders, pressing <emphasis>space</emphasis> will cycle
4620 through folders with new mail.
4624 Pressing TAB in the directory browser will bring up a menu showing the
4626 specified by the <literal>mailboxes</literal> command, and indicate
4628 messages. Mutt-ng will automatically enter this mode when invoked from
4630 command line with the <literal>-y</literal> option.
4634 The ``unmailboxes'' command is used to remove a token from the list
4635 of folders which receive mail. Use ``unmailboxes *'' to remove all
4640 <emphasis role="bold">Note:</emphasis> new mail is detected by
4641 comparing the last modification time to
4642 the last access time. Utilities like <literal>biff</literal> or <literal>
4646 program which accesses the mailbox might cause Mutt-ng to never detect
4648 for that mailbox if they do not properly reset the access time. Backup
4649 tools are another common reason for updated access times.
4653 <emphasis role="bold">Note:</emphasis> the filenames in the <literal>
4656 command are resolved when
4657 the command is executed, so if these names contain <link linkend="shortcuts">shortcuts</link>
4658 (such as ``='' and ``!''), any variable
4659 definition that affect these characters (like <muttng-doc:varref name="folder"/>
4660 and <muttng-doc:varref name="spoolfile"/>)
4661 should be executed before the <literal>mailboxes</literal> command.
4671 <title>User defined headers</title>
4674 <muttng-doc:cmddef name="my_hdr">string</muttng-doc:cmddef>
4677 <muttng-doc:cmddef name="unmy_hdr">field [field ...]</muttng-doc:cmddef>
4681 The ``my_hdr'' command allows you to create your own header
4682 fields which will be added to every message you send.
4686 For example, if you would like to add an ``Organization:'' header field
4688 all of your outgoing messages, you can put the command
4692 <muttng-doc:lstconf>
4693 my_hdr Organization: A Really Big Company, Anytown, USA</muttng-doc:lstconf>
4697 in your <literal>.muttrc</literal>.
4701 <emphasis role="bold">Note:</emphasis> space characters are <emphasis>
4704 allowed between the keyword and
4705 the colon (``:''). The standard for electronic mail (<muttng-doc:rfc num="822"/>) says that
4706 space is illegal there, so Mutt-ng enforces the rule.
4710 If you would like to add a header field to a single message, you should
4711 either set the <muttng-doc:varref name="edit-headers"/>
4713 or use the <emphasis>edit-headers</emphasis> function (default: ``E'')
4715 that you can edit the header of your message along with the body.
4719 To remove user defined header fields, use the ``unmy_hdr''
4720 command. You may specify an asterisk (``*'') to remove all header
4721 fields, or the fields to remove. For example, to remove all ``To'' and
4722 ``Cc'' header fields, you could use:
4726 <muttng-doc:lstconf>
4727 unmy_hdr to cc</muttng-doc:lstconf>
4737 <title>Defining the order of headers when viewing messages</title>
4740 <muttng-doc:cmddef name="hdr_order">header header [header ...]</muttng-doc:cmddef>
4744 <muttng-doc:cmddef name="unhdr_order">[ * | header header ...]</muttng-doc:cmddef>
4748 With this command, you can specify an order in which mutt will attempt
4749 to present headers to you when viewing messages.
4753 ``unhdr_order *'' will clear all previous headers from the order
4755 thus removing the header order effects set by the system-wide startup
4761 <muttng-doc:lstconf>
4762 hdr_order From Date: From: To: Cc: Subject:</muttng-doc:lstconf>
4772 <sect1 id="save-hook">
4773 <title>Specify default save filename</title>
4776 Usage: <muttng-doc:hook name="save"/> [!]<emphasis>pattern</emphasis> <emphasis>filename</emphasis>
4780 This command is used to override the default filename used when saving
4781 messages. <emphasis>filename</emphasis> will be used as the default
4782 filename if the message is
4783 <emphasis>From:</emphasis> an address matching <emphasis>regexp</emphasis> or if you are the author and the
4784 message is addressed <emphasis>to:</emphasis> something matching <emphasis>
4791 See <muttng-doc:hook name="pattern"/> for information on
4792 the exact format of <emphasis>pattern</emphasis>.
4801 <muttng-doc:lstconf>
4802 save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins
4803 save-hook aol\\.com$ +spam</muttng-doc:lstconf>
4808 Also see the <muttng-doc:hook name="fcc-save"/>
4818 <sect1 id="fcc-hook">
4819 <title>Specify default Fcc: mailbox when composing</title>
4822 Usage: <muttng-doc:hook name="fcc"/> [!]<emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
4826 This command is used to save outgoing mail in a mailbox other than
4827 <muttng-doc:varref name="record"/>. Mutt-ng searches the initial
4829 message recipients for the first matching <emphasis>regexp</emphasis>
4830 and uses <emphasis>mailbox</emphasis>
4831 as the default Fcc: mailbox. If no match is found the message will be
4833 to <muttng-doc:varref name="record"/> mailbox.
4837 See <muttng-doc:hook name="pattern"/> for information on
4838 the exact format of <emphasis>pattern</emphasis>.
4846 <muttng-doc:lstconf>
4847 fcc-hook [@.]aol\\.com$ +spammers</muttng-doc:lstconf>
4851 The above will save a copy of all messages going to the aol.com
4852 domain to the `+spammers' mailbox by default. Also see the
4853 <muttng-doc:hook name="fcc-save"/> command.
4862 <sect1 id="fcc-save-hook">
4863 <title>Specify default save filename and default Fcc: mailbox at once</title>
4866 Usage: <literal><muttng-doc:hook name="fcc-save"/></literal> [!]<emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
4870 This command is a shortcut, equivalent to doing both a <muttng-doc:hook name="fcc"/>
4871 and a <muttng-doc:hook name="save"/> with its arguments.
4880 <sect1 id="send-hook">
4881 <title>Change settings based upon message recipients</title>
4883 <anchor id="reply-hook"/>
4884 <anchor id="send2-hook"/>
4886 Usage: <muttng-doc:hook name="reply"/> [!]<emphasis>pattern</emphasis> <emphasis>command</emphasis>
4889 Usage: <muttng-doc:hook name="send"/> [!]<emphasis>pattern</emphasis> <emphasis>command</emphasis>
4892 Usage: <muttng-doc:hook name="send2"/> [!]<emphasis>pattern</emphasis> <emphasis>command</emphasis>
4896 These commands can be used to execute arbitrary configuration commands
4898 upon recipients of the message. <emphasis>pattern</emphasis> is a
4900 matching the desired address. <emphasis>command</emphasis> is executed
4901 when <emphasis>regexp</emphasis>
4902 matches recipients of the message.
4906 <muttng-doc:hook name="reply"/> is matched against the message you are <emphasis>
4909 <emphasis role="bold">to</emphasis>, instead of the message you are <emphasis>
4912 .<muttng-doc:hook name="send"/> is
4913 matched against all messages, both <emphasis>new</emphasis> and <emphasis>
4916 .<emphasis role="bold">Note:</emphasis>
4917 <muttng-doc:hook name="reply"/>s are matched <emphasis role="bold">before</emphasis> the
4918 <muttng-doc:hook name="send"/>, <emphasis role="bold">regardless</emphasis>
4919 of the order specified in the users's configuration file.
4923 <muttng-doc:hook name="send2"/> is matched every time a message is
4925 by editing it, or by using the compose menu to change its recipients
4926 or subject. <muttng-doc:hook name="send2"/> is executed after <muttng-doc:hook name="send"/>
4928 can, e.g., be used to set parameters such as the <muttng-doc:varref name="sendmail"/>
4929 variable depending on the message's sender
4934 For each type of <muttng-doc:hook name="send"/> or <muttng-doc:hook name="reply"/>, when multiple matches
4935 occur, commands are executed in the order they are specified in the
4937 (for that type of hook).
4941 See <muttng-doc:hook name="pattern"/> for information on
4942 the exact format of <emphasis>pattern</emphasis>.
4946 Example: <literal>send-hook mutt "set mime_forward
4952 Another typical use for this command is to change the values of the
4953 <muttng-doc:varref name="attribution"/>,
4954 <muttng-doc:varref name="signature"/> and <muttng-doc:varref
4956 variables in order to change the language of the attributions and
4957 signatures based upon the recipients.
4961 <emphasis role="bold">Note:</emphasis> the <muttng-doc:hook name="send"/>'s are only
4962 executed ONCE after getting the initial
4963 list of recipients. Adding a recipient after replying or editing the
4964 message will NOT cause any <muttng-doc:hook name="send"/> to be executed. Also note that
4965 my_hdr commands which modify recipient headers, or the message's
4966 subject, don't have any effect on the current message when executed
4967 from a <muttng-doc:hook name="send"/>.
4976 <sect1 id="message-hook">
4977 <title>Change settings before formatting a message</title>
4980 Usage: <muttng-doc:hook name="message"/> [!]<emphasis>pattern</emphasis> <emphasis>command</emphasis>
4984 This command can be used to execute arbitrary configuration commands
4985 before viewing or formatting a message based upon information about the
4987 <emphasis>command</emphasis> is executed if the <emphasis>pattern</emphasis> matches the message to be
4988 displayed. When multiple matches occur, commands are executed in the
4990 they are specified in the muttrc.
4994 See <muttng-doc:hook name="pattern"/> for
4995 information on the exact format of <emphasis>pattern</emphasis>.
5001 <muttng-doc:lstconf>
5002 message-hook ~A 'set pager=builtin'
5003 message-hook '~f freshmeat-news' 'set pager="less \"+/^ subject:.*\""'</muttng-doc:lstconf>
5013 <sect1 id="crypt-hook">
5014 <title>Choosing the cryptographic key of the recipient</title>
5017 Usage: <muttng-doc:hook name="crypt"/> <emphasis>pattern</emphasis> <emphasis>keyid</emphasis>
5021 When encrypting messages with PGP or OpenSSL, you may want to associate
5023 key with a given e-mail address automatically, either because the
5024 recipient's public key can't be deduced from the destination address,
5025 or because, for some reasons, you need to override the key Mutt-ng
5026 wouldnormally use. The <muttng-doc:hook name="crypt"/> command provides a method by which
5028 specify the ID of the public key to be used when encrypting messages to
5029 a certain recipient.
5033 The meaning of "key id" is to be taken broadly in this context: You
5034 can either put a numerical key ID here, an e-mail address, or even
5045 <title>Adding key sequences to the keyboard buffer</title>
5048 <muttng-doc:cmddef name="push">string</muttng-doc:cmddef>
5053 This command adds the named string to the keyboard buffer. The
5054 string may contain control characters, key names and function
5055 names like the sequence string in the <muttng-doc:cmdref name="macro"/> command. You may use it to
5056 automatically run a sequence of commands at startup, or when
5057 entering certain folders. For example, the following command
5058 will automatically collapse all threads when entering a folder:
5060 <muttng-doc:lstconf>
5061 folder-hook . 'push <collapse-all>'</muttng-doc:lstconf>
5072 <title>Executing functions</title>
5075 <muttng-doc:cmddef name="exec">function [function ... ]</muttng-doc:cmddef>
5079 This command can be used to execute any function. Functions are
5080 listed in the <link linkend="functions">functions</link>.
5081 ``exec function'' is equivalent to ``push <function>''.
5091 <title>Message Scoring</title>
5094 <muttng-doc:cmddef name="score">pattern value</muttng-doc:cmddef>
5097 <muttng-doc:cmddef name="unscore">pattern [pattern ... ]</muttng-doc:cmddef>
5101 In situations where you have to cope with a lot of emails, e.g.
5102 when you read many different mailing lists, and take part in
5103 discussions, it is always useful to have the important messages
5104 marked and the annoying messages or the ones that you aren't
5105 interested in deleted. For this purpose, mutt-ng features a
5106 mechanism called ``scoring''.
5110 When you use scoring, every message has a base score of 0. You
5111 can then use the <literal>score</literal> command to define patterns
5113 positive or negative value associated with it. When a pattern
5114 matches a message, the message's score will be raised or lowered by
5115 the amount of the value associated with the pattern.
5120 <muttng-doc:lstconf>
5121 score "~f nion@muttng\.org" 50
5122 score "~f @sco\.com" -100</muttng-doc:lstconf>
5127 If the pattern matches, it is also possible to set the score
5128 value of the current message to a certain value and then stop
5134 <muttng-doc:lstconf>
5135 score "~f santaclaus@northpole\.int" =666</muttng-doc:lstconf>
5140 What is important to note is that negative score values will be
5145 To make scoring actually useful, the score must be applied in
5146 some way. That's what the <emphasis>score thresholds</emphasis> are
5148 there are three score thresholds:
5157 flag threshold: when a message has a score value equal or higher
5158 than the flag threshold, it will be flagged.
5165 read threshold: when a message has a score value equal or lower
5166 than the read threshold, it will be marked as read.
5173 delete threshold: when a message has a score value equal or
5174 lower than the delete threshold, it will be marked as deleted.
5184 These three thresholds can be set via the variables
5185 <muttng-doc:varref name="score-threshold-read"/>,
5186 <muttng-doc:varref name="score-threshold-flag"/> and
5187 <muttng-doc:varref name="score-threshold-delete"/>.
5191 <muttng-doc:varref name="score-threshold-read"/> and
5192 <muttng-doc:varref name="score-threshold-delete"/>
5194 <literal>-1</literal>, which means that in the default threshold
5196 message will ever get marked as read or deleted.
5200 Scoring gets especially interesting when combined with the <literal>
5204 and the <muttng-doc:pattern name="n"/> pattern:
5209 <muttng-doc:lstconf>
5210 color index black yellow "~n 10-"
5211 color index red yellow "~n 100-"</muttng-doc:lstconf>
5216 The rules above mark all messages with a score between 10 and 99
5217 with black and yellow, and messages with a score greater or equal
5218 100 with red and yellow. This might be unusual to you if you're used
5219 to e.g. slrn's scoring mechanism, but it is more flexible, as it
5220 visually marks different scores.
5230 <title>Spam detection</title>
5233 <muttng-doc:cmddef name="spam">pattern format</muttng-doc:cmddef>
5236 <muttng-doc:cmddef name="nospam">pattern</muttng-doc:cmddef>
5240 Mutt-ng has generalized support for external spam-scoring filters.
5241 By defining your spam patterns with the <literal>spam</literal> and <literal>
5244 commands, you can <emphasis>limit</emphasis>, <emphasis>search</emphasis>, and <emphasis>
5248 mail based on its spam attributes, as determined by the external
5249 filter. You also can display the spam attributes in your index
5250 display using the <literal>%H</literal> selector in the
5251 <muttng-doc:varref name="index-format"/>
5252 variable. (Tip: try <literal>%?H?[%H] ?</literal>
5253 to display spam tags only when they are defined for a given message.)
5257 Your first step is to define your external filter's spam patterns using
5258 the <literal>spam</literal> command. <emphasis>pattern</emphasis>
5259 should be a regular expression
5260 that matches a header in a mail message. If any message in the mailbox
5261 matches this regular expression, it will receive a ``spam tag'' or
5262 ``spam attribute'' (unless it also matches a <literal>nospam</literal>
5264 below.) The appearance of this attribute is entirely up to you, and is
5265 governed by the <emphasis>format</emphasis> parameter. <emphasis>format</emphasis> can be any static
5266 text, but it also can include back-references from the <emphasis>
5269 expression. (A regular expression ``back-reference'' refers to a
5270 sub-expression contained within parentheses.) <literal>%1</literal> is replaced with
5271 the first back-reference in the regex, <literal>%2</literal>
5272 with the second, etc.
5276 If you're using multiple spam filters, a message can have more than
5277 one spam-related header. You can define <literal>spam</literal>
5279 filter you use. If a message matches two or more of these patterns, and
5280 the $spam_separator variable is set to a string, then the
5281 message's spam tag will consist of all the <emphasis>format</emphasis>
5283 together, with the value of $spam_separator separating
5288 For example, suppose I use DCC, SpamAssassin, and PureMessage. I might
5289 define these spam settings:
5291 <muttng-doc:lstconf>
5292 spam "X-DCC-.*-Metrics:.*(....)=many" "90+/DCC-%1"
5293 spam "X-Spam-Status: Yes" "90+/SA"
5294 spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM"
5295 set spam_separator=", "</muttng-doc:lstconf>
5300 If I then received a message that DCC registered with ``many'' hits
5301 under the ``Fuz2'' checksum, and that PureMessage registered with a
5302 97% probability of being spam, that message's spam tag would
5303 read<literal>90+/DCC-Fuz2, 97/PM</literal>. (The four characters before
5305 DCC report indicate the checksum used -- in this case, ``Fuz2''.)
5309 If the $spam_separator variable is unset, then each
5310 spam pattern match supersedes the previous one. Instead of getting
5311 joined <emphasis>format</emphasis> strings, you'll get only the last
5316 The spam tag is what will be displayed in the index when you use
5317 <literal>%H</literal> in the <literal>
5320 variable. It's also the
5321 string that the <muttng-doc:pattern name="H"/> pattern-matching expression
5323 <emphasis>search</emphasis> and <emphasis>limit</emphasis> functions.
5324 And it's what sorting by spam
5325 attribute will use as a sort key.
5329 That's a pretty complicated example, and most people's actual
5330 environments will have only one spam filter. The simpler your
5331 configuration, the more effective mutt can be, especially when it comes
5336 Generally, when you sort by spam tag, mutt will sort <emphasis>
5340 that is, by ordering strings alphnumerically. However, if a spam tag
5341 begins with a number, mutt will sort numerically first, and lexically
5342 only when two numbers are equal in value. (This is like UNIX's
5343 <literal>sort -n</literal>.) A message with no spam attributes at all
5345 that didn't match <emphasis>any</emphasis> of your <literal>spam</literal> patterns -- is sorted at
5346 lowest priority. Numbers are sorted next, beginning with 0 and ranging
5347 upward. Finally, non-numeric strings are sorted, with ``a'' taking
5348 lowerpriority than ``z''. Clearly, in general, sorting by spam tags is
5350 effective when you can coerce your filter to give you a raw number. But
5351 in case you can't, mutt can still do something useful.
5355 The <literal>nospam</literal> command can be used to write exceptions
5356 to <literal>spam</literal>
5357 patterns. If a header pattern matches something in a <literal>spam</literal> command,
5358 but you nonetheless do not want it to receive a spam tag, you can list
5359 amore precise pattern under a <literal>nospam</literal> command.
5363 If the <emphasis>pattern</emphasis> given to <literal>nospam</literal>
5364 is exactly the same as the
5365 <emphasis>pattern</emphasis> on an existing <literal>spam</literal>
5366 list entry, the effect will be to
5367 remove the entry from the spam list, instead of adding an exception.
5368 Likewise, if the <emphasis>pattern</emphasis> for a <literal>spam</literal> command matches an entry
5369 on the <literal>nospam</literal> list, that <literal>nospam</literal>
5370 entry will be removed. If the
5371 <emphasis>pattern</emphasis> for <literal>nospam</literal> is ``*'', <emphasis>
5372 all entries on both lists
5374 will be removed. This might be the default action if you use <literal>
5377 and <literal>nospam</literal> in conjunction with a <muttng-doc:hook name="folder"/>.
5381 You can have as many <literal>spam</literal> or <literal>nospam</literal> commands as you like.
5382 You can even do your own primitive spam detection within mutt -- for
5383 example, if you consider all mail from <literal>MAILER-DAEMON</literal>
5385 you can use a <literal>spam</literal> command like this:
5390 <muttng-doc:lstconf>
5391 spam "^From: .*MAILER-DAEMON" "999"</muttng-doc:lstconf>
5402 <title>Setting variables</title>
5405 <muttng-doc:cmddef name="set">[no|inv]variable [=value] [variable...]</muttng-doc:cmddef>
5408 <muttng-doc:cmddef name="toggle">variable [variable ...]</muttng-doc:cmddef>
5411 <muttng-doc:cmddef name="unset">variable [variable ...]</muttng-doc:cmddef>
5414 <muttng-doc:cmddef name="reset">variable [variable ...]</muttng-doc:cmddef>
5418 This command is used to set (and unset) <link linkend="variables">variables</link>.
5419 There are four basic types of variables:
5420 boolean, number, string and quadoption. <emphasis>boolean</emphasis>
5422 <emphasis>set</emphasis> (true) or <emphasis>unset</emphasis> (false).
5423 <emphasis>number</emphasis> variables can be
5424 assigned a positive integer value.
5428 <emphasis>string</emphasis> variables consist of any number of
5429 printable characters.
5430 <emphasis>strings</emphasis> must be enclosed in quotes if they contain
5432 may also use the ``C'' escape sequences <emphasis role="bold">\n</emphasis> and <emphasis role="bold">
5436 newline and tab, respectively.
5440 <emphasis>quadoption</emphasis> variables are used to control whether
5441 or not to be prompted
5442 for certain actions, or to specify a default action. A value of <emphasis>
5445 will cause the action to be carried out automatically as if you had
5447 yes to the question. Similarly, a value of <emphasis>no</emphasis>
5449 action to be carried out as if you had answered ``no.'' A value of
5450 <emphasis>ask-yes</emphasis> will cause a prompt with a default answer
5452 <emphasis>ask-no</emphasis> will provide a default answer of ``no.''
5456 Prefixing a variable with ``no'' will unset it. Example: <literal>set
5463 For <emphasis>boolean</emphasis> variables, you may optionally prefix
5464 the variable name with
5465 <literal>inv</literal> to toggle the value (on or off). This is useful
5467 macros. Example: <literal>set invsmart_wrap</literal>.
5471 The <literal>toggle</literal> command automatically prepends the <literal>
5475 specified variables.
5479 The <literal>unset</literal> command automatically prepends the <literal>
5483 specified variables.
5487 Using the enter-command function in the <emphasis>index</emphasis>
5488 menu, you can query the
5489 value of a variable by prefixing the name of the variable with a
5496 <muttng-doc:lstconf>
5497 set ?allow_8bit</muttng-doc:lstconf>
5502 The question mark is actually only required for boolean and quadoption
5507 The <literal>reset</literal> command resets all given variables to the
5509 defaults (hopefully mentioned in this manual). If you use the command
5510 <literal>set</literal> and prefix the variable with ``&'' this has
5512 behavior as the reset command.
5516 With the <literal>reset</literal> command there exists the special
5518 which allows you to reset all variables to their system defaults.
5528 <title>Reading initialization commands from another file</title>
5531 <muttng-doc:cmddef name="source">filename [filename ...]</muttng-doc:cmddef>
5535 This command allows the inclusion of initialization commands
5536 from other files. For example, I place all of my aliases in
5537 <literal>~/.mail_aliases</literal> so that I can make my
5538 <literal>~/.muttrc</literal> readable and keep my aliases
5543 If the filename begins with a tilde (``~''), it will be expanded
5545 path of your home directory.
5549 If the filename ends with a vertical bar (|), then <emphasis>
5553 considered to be an executable program from which to read input (eg.
5554 <literal>source ~/bin/myscript|</literal>).
5564 <title>Removing hooks</title>
5567 <muttng-doc:cmddef name="unhook">[* | hook-type]</muttng-doc:cmddef>
5571 This command permits you to flush hooks you have previously defined.
5572 You can either remove all hooks by giving the ``*'' character as an
5573 argument, or you can remove all hooks of a specific type by saying
5574 something like <literal>unhook send</literal>.
5584 <title>Sharing Setups</title>
5586 <sect2 id="share-charset">
5587 <title>Character Sets</title>
5590 As users may run mutt-ng on different systems, the configuration
5591 must be maintained because it's likely that people want to use the
5592 setup everywhere they use mutt-ng. And mutt-ng tries to help where it
5597 To not produce conflicts with different character sets, mutt-ng
5598 allows users to specify in which character set their configuration
5599 files are encoded. Please note that while reading the configuration
5600 files, this is only respected after the corresponding declaration
5601 appears. It's advised to put the following at the very beginning of a
5607 <muttng-doc:lstconf>
5608 set config_charset = "..."</muttng-doc:lstconf>
5613 and replacing the dots with the actual character set. To avoid
5614 problems while maintaining the setup, <muttng-doc:man name="vim"/> user's may want to use
5615 modelines as show in:
5621 # vim:fileencoding=...:</screen>
5626 while, again, replacing the dots with the appropriate name. This
5627 tells <muttng-doc:man name="vim"/> as which character set to read and save the file.
5636 <sect2 id="share-modularization">
5637 <title>Modularization</title>
5640 ``Modularization'' means to divide the setup into several files
5641 while sorting the options or commands by topic. Especially for
5642 longer setups (e.g. with many hooks), this helps maintaining it
5643 and solving trouble.
5647 When using separation, setups may be, as a whole or in
5648 fractions, shared over different systems.
5657 <sect2 id="share-conditional">
5658 <title>Conditional parts</title>
5661 When using a configuration on different systems, the user may not
5662 always have influence on how mutt-ng is installed and which features
5667 To solve this, mutt-ng contain a feature based on the ``ifdef''
5668 patch written for mutt. Its basic syntax is:
5673 <muttng-doc:lstconf>
5674 ifdef <item> <command>
5675 ifndef <item> <command></muttng-doc:lstconf>
5680 ...whereby <literal><item></literal> can be one of:
5720 All available functions, variables and menus are documented
5721 elsewhere in this manual but ``features'' is specific to these
5722 two commands. To test for one, prefix one of the following
5723 keywords with <literal>feature_</literal>: ncurses,
5724 slang, iconv, idn, dotlock, standalone, pop, nntp, imap, ssl,
5725 gnutls, sasl, sasl2, libesmtp, compressed, color, classic_pgp,
5726 classic_smime, gpgme, header_cache
5730 As an example, one can use the following in
5731 <literal>~/.muttngrc</literal>:
5736 <muttng-doc:lstconf>
5737 ifdef feature_imap 'source ~/.mutt-ng/setup-imap'
5738 ifdef feature_pop 'source ~/.mutt-ng/setup-pop'
5739 ifdef feature_nntp 'source ~/.mutt-ng/setup-nntp'</muttng-doc:lstconf>
5744 ...to only source <literal>~/.mutt-ng/setup-imap</literal> if
5746 support is built in, only source <literal>~/.mutt-ng/setup-pop</literal>
5747 if POP support is built in and only source
5748 <literal>~/.mutt-ng/setup-nntp</literal> if NNTP support is
5753 An example for testing for variable names can be used if users
5754 use different revisions of mutt-ng whereby the older one may not
5755 have a certain variable. To test for the availability of
5756 <muttng-doc:varref name="imap-mail-check"/>
5762 <muttng-doc:lstconf>
5763 ifdef imap_mail_check 'set imap_mail_check = 300'</muttng-doc:lstconf>
5768 Provided for completeness is the test for menu names. To set
5769 <muttng-doc:varref name="pager-index-lines"
5772 menu is available, use:
5777 <muttng-doc:lstconf>
5778 ifdef pager 'set pager_index_lines = 10'</muttng-doc:lstconf>
5783 For completeness, too, the opposite of <literal>ifdef</literal> is
5785 <literal>ifndef</literal> which only executes the command if the test
5787 example, the following two examples are equivalent:
5792 <muttng-doc:lstconf>
5793 ifdef feature_ncurses 'source ~/.mutt-ng/setup-ncurses'
5794 ifndef feature_ncurses 'source ~/.mutt-ng/setup-slang'</muttng-doc:lstconf>
5804 <muttng-doc:lstconf>
5805 ifdef feature_slang 'source ~/.mutt-ng/setup-slang'
5806 ifndef feature_slang 'source ~/.mutt-ng/setup-ncurses'</muttng-doc:lstconf>
5822 <sect1 id="vars-obsolete">
5823 <title>Obsolete Variables</title>
5826 In the process of ensuring and creating more consistency, many
5827 variables have been renamed and some of the old names were already
5828 removed. Please see <link linkend="sect-obsolete">sect-obsolete</link>
5829 for a complete list.
5845 <chapter id="advanced-usage"> <!--{{{-->
5846 <title>Advanced Usage</title>
5848 <sect1 id="advanced-regexp">
5849 <title>Regular Expressions</title>
5852 All string patterns in Mutt-ng including those in more complex
5853 <link linkend="tab-patterns">patterns</link> must be specified
5854 using regular expressions (regexp) in the ``POSIX extended'' syntax
5856 is more or less the syntax used by egrep and GNU awk). For your
5857 convenience, we have included below a brief description of this syntax.
5861 The search is case sensitive if the pattern contains at least one upper
5862 case letter, and case insensitive otherwise. Note that ``\''
5863 must be quoted if used for a regular expression in an initialization
5868 A regular expression is a pattern that describes a set of strings.
5869 Regular expressions are constructed analogously to arithmetic
5870 expressions, by using various operators to combine smaller expressions.
5874 Note that the regular expression can be enclosed/delimited by either
5876 or ' which is useful if the regular expression includes a white-space
5877 character. See <link linkend="configuration-syntax">muttrc-syntax</link>
5878 for more information on " and ' delimiter processing. To match a
5879 literal " or ' you must preface it with \ (backslash).
5883 The fundamental building blocks are the regular expressions that match
5884 a single character. Most characters, including all letters and digits,
5885 are regular expressions that match themselves. Any metacharacter with
5886 special meaning may be quoted by preceding it with a backslash.
5890 The period ``.'' matches any single character. The caret ``^''
5891 andthe dollar sign ``$'' are metacharacters that respectively
5893 the empty string at the beginning and end of a line.
5897 A list of characters enclosed by ``]'' and ``]'' matches any
5898 single character in that list; if the first character of the list
5899 is a caret ``^'' then it matches any character <emphasis role="bold">
5903 list. For example, the regular expression <emphasis role="bold">
5906 matches any single digit. A range of ASCII characters may be specified
5907 by giving the first and last characters, separated by a hyphen
5908 ``-''. Most metacharacters lose their special meaning inside
5909 lists. To include a literal ``]'' place it first in the list.
5910 Similarly, to include a literal ``^'' place it anywhere but first.
5911 Finally, to include a literal hyphen ``-'' place it last.
5915 Certain named classes of characters are predefined. Character classes
5916 consist of ``[:'', a keyword denoting the class, and ``:]''.
5917 The following classes are defined by the POSIX standard:
5924 <term>[:alnum:]</term>
5927 Alphanumeric characters.
5932 <term>[:alpha:]</term>
5935 Alphabetic characters.
5940 <term>[:blank:]</term>
5943 Space or tab characters.
5948 <term>[:cntrl:]</term>
5956 <term>[:digit:]</term>
5964 <term>[:graph:]</term>
5967 Characters that are both printable and visible. (A space is
5969 but not visible, while an ``a'' is both.)
5974 <term>[:lower:]</term>
5977 Lower-case alphabetic characters.
5982 <term>[:print:]</term>
5985 Printable characters (characters that are not control
5991 <term>[:punct:]</term>
5994 Punctuation characters (characters that are not letter, digits,
5996 characters, or space characters).
6001 <term>[:space:]</term>
6004 Space characters (such as space, tab and formfeed, to name a
6010 <term>[:upper:]</term>
6013 Upper-case alphabetic characters.
6018 <term>[:xdigit:]</term>
6021 Characters that are hexadecimal digits.
6029 A character class is only valid in a regular expression inside the
6030 brackets of a character list. Note that the brackets in these
6031 class names are part of the symbolic names, and must be included
6032 in addition to the brackets delimiting the bracket list. For
6033 example, <emphasis role="bold">[[:digit:]]</emphasis> is equivalent to
6034 <emphasis role="bold">[0-9]</emphasis>.
6038 Two additional special sequences can appear in character lists. These
6039 apply to non-ASCII character sets, which can have single symbols
6040 (calledcollating elements) that are represented with more than one
6042 as well as several characters that are equivalent for collating or
6050 <term>Collating Symbols</term>
6053 A collating symbol is a multi-character collating element
6055 ``[.'' and ``.]''. For example, if ``ch'' is a
6057 element, then <emphasis role="bold">
6060 is a regexp that matches
6061 this collating element, while <emphasis role="bold">
6065 matches either ``c'' or ``h''.
6070 <term>Equivalence Classes</term>
6073 An equivalence class is a locale-specific name for a list of
6074 characters that are equivalent. The name is enclosed in
6076 and ``=]''. For example, the name ``e'' might be used to
6077 represent all of ``è'' ``é'' and ``e''. In this
6079 <emphasis role="bold">[[=e=]]</emphasis> is
6080 a regexp that matches any of
6081 ``è'', ``é'' and ``e''.
6089 A regular expression matching a single character may be followed by one
6090 of several repetition operators:
6100 The preceding item is optional and matched at most once.
6108 The preceding item will be matched zero or more times.
6116 The preceding item will be matched one or more times.
6124 The preceding item is matched exactly <emphasis>n</emphasis>
6133 The preceding item is matched <emphasis>n</emphasis> or more
6142 The preceding item is matched at most <emphasis>m</emphasis>
6151 The preceding item is matched at least <emphasis>n</emphasis>
6152 times, but no more than
6153 <emphasis>m</emphasis> times.
6161 Two regular expressions may be concatenated; the resulting regular
6162 expression matches any string formed by concatenating two substrings
6163 that respectively match the concatenated subexpressions.
6167 Two regular expressions may be joined by the infix operator
6169 the resulting regular expression matches any string matching either
6174 Repetition takes precedence over concatenation, which in turn takes
6175 precedence over alternation. A whole subexpression may be enclosed in
6176 parentheses to override these precedence rules.
6180 <emphasis role="bold">Note:</emphasis> If you compile Mutt-ng with the
6181 GNU <emphasis>rx</emphasis> package, the
6182 following operators may also be used in regular expressions:
6192 Matches the empty string at either the beginning or the end of
6201 Matches the empty string within a word.
6209 Matches the empty string at the beginning of a word.
6217 Matches the empty string at the end of a word.
6225 Matches any word-constituent character (letter, digit, or
6234 Matches any character that is not word-constituent.
6242 Matches the empty string at the beginning of a buffer (string).
6250 Matches the empty string at the end of a buffer.
6258 Please note however that these operators are not defined by POSIX, so
6259 they may or may not be available in stock libraries on various systems.
6268 <sect1 id="advanced-patterns">
6269 <title>Patterns</title>
6272 Mutt-ng's pattern language provides a simple yet effective way to
6273 set up rules to match messages, e.g. for operations like tagging and
6274 scoring. A pattern consists of one or more sub-pattern, which can be
6275 logically grouped, ORed, and negated. For a complete listing of
6276 these patterns, please refer to table <link linkend="tab-patterns">patterns</link> in the Reference chapter.
6280 It must be noted that in this table, <literal>EXPR</literal> is
6281 a regular expression. For ranges, the forms
6282 <literal><[MAX]</literal>, <literal>>>[MIN]</literal>,
6283 <literal> [MIN]-</literal> and <literal>-[MAX]</literal> are
6287 <sect2 id="patterns-complex">
6288 <title>Complex Patterns</title>
6291 It is possible to combine several sub-patterns to a more complex
6292 pattern. The most simple possibility is to logically AND several
6293 patterns by stringing them together:
6299 <muttng-doc:pattern name="s"/> 'SPAM' <muttng-doc:pattern name="U"/></screen>
6304 The pattern above matches all messages that contain ``SPAM'' in
6305 the subject and are unread.
6309 To logical OR patterns, simply use the <literal>|</literal>
6311 especially useful when using local groups:
6317 <muttng-doc:pattern name="f"/> ("nion@muttng\.org"|"ak@muttng\.org"|"pdmef@muttng\.org")
6318 (<muttng-doc:pattern name="b"/> mutt-ng|<muttng-doc:pattern name="s"/> Mutt-ng)
6319 !<muttng-doc:pattern name="x"/> '@synflood\.at'</screen>
6324 The first pattern matches all messages that were sent by one of
6325 the mutt-ng maintainers, while the seconds pattern matches all
6326 messages that contain ``mutt-ng'' in the message body or ``Mutt-ng''
6327 in the subject. The third pattern matches all messages that do not
6328 contain ``@synflood\.at'' in the <literal>References:</literal>
6330 messages that are not an (indirect) reply to one of my messages. A
6331 pattern can be logicall negated using the <literal>!</literal>
6337 <sect2 sect="patterns-dates">
6338 <title>Patterns and Dates</title>
6341 When using dates in patterns, the dates must be specified in a
6342 special format, i.e. <literal>DD/MM/YYYY</literal>. If you don't
6344 month or year, they default to the current month or year. When using
6345 date ranges, and you specify only the minimum or the maximum, the
6346 specified date will be excluded, e.g. <literal>01/06/2005-</literal>
6348 against all messages <emphasis>after</emphasis> Juni 1st, 2005.
6352 It is also possible to use so-called ``error margins'' when
6353 specifying date ranges. You simply specify a date, and then the
6354 error margin. This margin needs to contain the information whether
6355 it goes ``forth'' or ``back'' in time, by using <literal>+</literal>
6356 and <literal>-</literal>.
6357 Then follows a number and a unit, i.e. <literal>y</literal> for
6358 years, <literal>m</literal> for
6359 months, <literal>w</literal> for weeks and <literal>d</literal> for
6360 days. If you use the special
6361 <literal>*</literal> sign, it means that the error margin goes to
6362 both``directions'' in time.
6368 <muttng-doc:pattern name="d"/> 01/01/2005+1y
6369 <muttng-doc:pattern name="d"/> 18/10/2004-2w
6370 <muttng-doc:pattern name="d"/> 28/12/2004*1d</screen>
6375 The first pattern matches all dates between January 1st, 2005 and
6376 January 1st 2006. The second pattern matches all dates between
6377 October 18th, 2004 and October 4th 2004 (2 weeks before 18/10/2004),
6378 while the third pattern matches all dates 1 day around December
6379 28th, 2004 (i.e. Dec 27th, 28th and 29th).
6383 Relative dates are also very important, as they make it possible
6384 to specify date ranges between a fixed number of units and the
6385 current date. How this works can be seen in the following example:
6391 <muttng-doc:pattern name="d"/> >2w # messages older than two weeks
6392 <muttng-doc:pattern name="d"/> <3d # messages newer than 3 days
6393 <muttng-doc:pattern name="d"/> =1m # messages that are exactly one month old</screen>
6405 <sect1 id="formatstrings">
6406 <title>Format Strings</title>
6408 <sect2 id="formatstrings-intro">
6409 <title>Introduction</title>
6412 The so called <emphasis>Format Strings</emphasis> offer great
6414 configuring mutt-ng. In short, they describe what items to print
6415 out how in menus and status messages.
6419 Basically, they work as this: for different menus and bars,
6420 there's a variable specifying the layout. For every item
6421 available, there is a so called <emphasis>expando</emphasis>.
6425 For example, when running mutt-ng on different machines or
6426 different versions for testing purposes, it may be interesting to
6427 have the following information always printed on screen when one
6437 the current hostname
6444 the current mutt-ng version number
6454 The setting for the status bar of the index is controlled via the
6455 <muttng-doc:varref name="status-format"/>
6456 variable. For the hostname and version string, there's an expando
6457 for <literal>$status_format</literal>: <literal>
6461 hostname and <literal>%v</literal> to the version string. When
6467 <muttng-doc:lstconf>
6468 set status_format = "%v on %h: ..."</muttng-doc:lstconf>
6473 mutt-ng will replace the sequence <literal>%v</literal> with
6475 and <literal>%h</literal> with the host's name. When you are,
6476 for example, running
6477 mutt-ng version <literal>1.5.9i</literal> on host <literal>mailhost</literal>, you'll see the
6478 following when you're in the index:
6484 Mutt-ng 1.5.9i on mailhost: ...</screen>
6489 In the index, there're more useful information one could want to
6499 which mailbox is open
6506 how man new, flagged or postponed messages
6523 To include the mailbox' name is as easy as:
6528 <muttng-doc:lstconf>
6529 set status_format = "%v on %h: %B: ...</muttng-doc:lstconf>
6534 When the currently opened mailbox is <literal>Inbox</literal>, this
6542 Mutt-ng 1.5.9i on mailhost: Inbox: ...</screen>
6547 For the number of certain types of messages, one more feature of the
6549 strings is extremely useful. If there aren't messages of a certain
6551 may not be desired to print just that there aren't any but instead
6553 print something if there are any.
6562 <sect2 id="formatstrings-conditional">
6563 <title>Conditional Expansion</title>
6566 To only print the number of messages if there are new messages in
6567 the current mailbox, further extend
6568 <literal>$status_format</literal> to:
6573 <muttng-doc:lstconf>
6574 set status_format = "%v on %h: %B %?n?%n new? ...</muttng-doc:lstconf>
6579 This feature is called <emphasis>nonzero-printing</emphasis> and
6581 some expandos may be optionally printed nonzero, i.e. a portion
6582 of the format string is only evaluated if the value of the expando
6583 is different from zero. The basic syntax is:
6589 %?<item>?<string if nonzero>?</screen>
6594 which tells mutt-ng to only look at <literal><string if
6597 if the value of the <literal>%<item%gt;</literal>
6598 expando is different from zero. In our example, we used <literal>n</literal> as
6599 the expando to check for and <literal>%n new</literal> as the
6605 But this is not all: this feature only offers one alternative:
6606 ``print something if not zero.'' Mutt-ng does, as you might guess,
6607 also provide a logically complete version: ``if zero, print
6608 something and else print something else.'' This is achieved by the
6609 following syntax for those expandos which may be printed nonzero:
6615 %?<item>?<string if nonzero>&<string if zero>?</screen>
6620 Using this we can make mutt-ng to do the following:
6629 make it print ``<emphasis>n</emphasis> new messages'' whereby <emphasis>
6633 count but only if there new ones
6640 and make it print ``no new messages'' if there aren't any
6650 The corresponding configuration is:
6655 <muttng-doc:lstconf>
6656 set status_format = "%v on %h: %B: %?n?%n new messages&no new messages? ...</muttng-doc:lstconf>
6661 This doubles the use of the ``new messages'' string because it'll get
6662 always printed. Thus, it can be shortened to:
6667 <muttng-doc:lstconf>
6668 set status_format = "%v on %h: %B: %?n?%n&no? new messages ...</muttng-doc:lstconf>
6673 As you might see from this rather simple example, one can create
6674 very complex but fancy status messages. Please see the reference
6675 chapter for expandos and those which may be printed nonzero.
6684 <sect2 id="formatstrings-padding">
6685 <title>Modifications and Padding</title>
6688 Besides the information given so far, there're even more features of
6698 When specifying <literal>%_<item></literal>
6700 just <literal>%<item></literal>, mutt-ng will
6702 characters in the expansion of <literal><item></literal>
6711 When specifying <literal>%:<item></literal>
6713 <literal>%<item></literal>, mutt-ng will convert
6715 expansion of <literal><item></literal> to underscores
6716 (<literal>_</literal>).
6726 Also, there's a feature called <emphasis>Padding</emphasis> supplied
6728 following two expandos: <literal>%|X</literal> and <literal>
6739 <literal>%|X</literal>
6743 When this occurs, mutt-ng will fill the
6744 rest of the line with the character <literal>X</literal>. In
6746 filling the rest of the line with dashes is done by setting:
6751 <muttng-doc:lstconf>
6752 set status_format = "%v on %h: %B: %?n?%n&no? new messages %|-"</muttng-doc:lstconf>
6759 <literal>%>X</literal>
6763 Since the previous expando stops at
6764 the end of line, there must be a way to fill the gap between
6765 two items via the <literal>%>X</literal> expando:
6767 characters <literal>X</literal> in between two items so that
6769 the line will be right-justified. For example, to not put the
6770 version string and hostname of our example on the left but on
6771 the right and fill the gap with spaces, one might use (note
6772 the space after <literal>%></literal>):
6777 <muttng-doc:lstconf>
6778 set status_format = "%B: %?n?%n&no? new messages %> (%v on %h)"</muttng-doc:lstconf>
6798 <sect1 id="using-tags">
6799 <title>Using Tags</title>
6802 Sometimes it is desirable to perform an operation on a group of
6803 messages all at once rather than one at a time. An example might be
6804 to save messages to a mailing list to a separate folder, or to
6805 delete all messages with a given subject. To tag all messages
6806 matching a pattern, use the tag-pattern function, which is bound to
6807 ``shift-T'' by default. Or you can select individual messages by
6808 hand using the ``tag-message'' function, which is bound to ``t'' by
6809 default. See <link linkend="tab-patterns">patterns</link> for Mutt-ng's
6815 Once you have tagged the desired messages, you can use the
6816 ``tag-prefix'' operator, which is the ``;'' (semicolon) key by default.
6817 When the ``tag-prefix'' operator is used, the <emphasis role="bold">
6821 be applied to all tagged messages if that operation can be used in that
6822 manner. If the <muttng-doc:varref name="auto-tag"/>
6823 variable is set, the next operation applies to the tagged messages
6824 automatically, without requiring the ``tag-prefix''.
6828 In <muttng-doc:cmdref name="macro"/> or <muttng-doc:cmdref name="push"/> commands,
6829 you can use the ``tag-prefix-cond'' operator. If there are no tagged
6830 messages, mutt will "eat" the rest of the macro to abort it's
6831 execution.Mutt-ng will stop "eating" the macro when it encounters the
6833 operator; after this operator the rest of the macro will be executed
6844 <title>Using Hooks</title>
6847 A <emphasis>hook</emphasis> is a concept borrowed from the EMACS editor
6849 execute arbitrary commands before performing some operation. For
6851 you may wish to tailor your configuration based upon which mailbox you
6853 reading, or to whom you are sending mail. In the Mutt-ng world, a <emphasis>
6856 consists of a <link linkend="advanced-regexp">regexp</link> or
6857 <link linkend="tab-patterns">patterns</link> along with a
6858 configuration option/command. See
6864 <muttng-doc:hook name="folder"/>
6870 <muttng-doc:hook name="send"/>
6876 <muttng-doc:hook name="message"/>
6882 <muttng-doc:hook name="save"/>
6888 <muttng-doc:hook name="mbox"/>
6894 <muttng-doc:hook name="fcc"/>
6900 <muttng-doc:hook name="fcc-save"/>
6906 for specific details on each type of <emphasis>hook</emphasis>
6911 <emphasis role="bold">Note:</emphasis> if a hook changes configuration
6912 settings, these changes remain
6913 effective until the end of the current mutt session. As this is
6915 not desired, a default hook needs to be added before all other hooks to
6916 restore configuration defaults. Here is an example with <muttng-doc:hook name="send"/> and
6923 <muttng-doc:lstconf>
6924 send-hook . 'unmy_hdr From:'
6925 send-hook '~C ^b@b\.b$' my-hdr from: c@c.c</muttng-doc:lstconf>
6929 <sect2 id="pattern-hook">
6930 <title>Message Matching in Hooks</title>
6933 Hooks that act upon messages (<literal><muttng-doc:hook name="send"/>, <muttng-doc:hook name="save"/>,
6934 <muttng-doc:hook name="fcc"/>,<muttng-doc:hook name="message"/>
6936 )are evaluated in a slightly different manner. For the other
6937 types of hooks, a <link linkend="advanced-regexp">regexp</link> is
6938 sufficient. But in dealing with messages a finer grain of control is
6939 needed for matching since for different purposes you want to match
6944 Mutt-ng allows the use of the <link linkend="tab-patterns">patterns</link>
6945 language for matching messages in hook commands. This works in
6946 exactly the same way as it would when <emphasis>limiting</emphasis>
6947 or<emphasis>searching</emphasis> the mailbox, except that you are
6949 operators which match information mutt extracts from the header of
6950 the message (i.e. from, to, cc, date, subject, etc.).
6954 For example, if you wanted to set your return address based upon
6956 mail to a specific address, you could do something like:
6958 <muttng-doc:lstconf>
6959 send-hook '~t ^me@cs\.hmc\.edu$' 'my-hdr From: Mutt-ng User <user@host>'</muttng-doc:lstconf>
6961 which would execute the given command when sending mail to
6962 <emphasis>me@cs.hmc.edu</emphasis>.
6966 However, it is not required that you write the pattern to match using
6968 full searching language. You can still specify a simple <emphasis>
6972 like the other hooks, in which case Mutt-ng will translate your
6973 pattern into the full language, using the translation specified by
6975 <muttng-doc:hook name="default"/> variable. The
6976 pattern is translated at the time the hook is declared, so the value
6978 <muttng-doc:hook name="default"/> that is in effect
6979 at that time will be used.
6990 <sect1 id="sidebar">
6991 <title>Using the sidebar</title>
6994 The sidebar, a feature specific to Mutt-ng, allows you to use a mailbox
6996 which looks very similar to the ones you probably know from GUI mail
6998 The sidebar lists all specified mailboxes, shows the number in each
6999 and highlights the ones with new email
7000 Use the following configuration commands:
7002 <muttng-doc:lstconf>
7003 set sidebar_visible="yes"
7004 set sidebar_width=25</muttng-doc:lstconf>
7009 If you want to specify the mailboxes you can do so with:
7011 <muttng-doc:lstconf>
7016 ...</muttng-doc:lstconf>
7021 You can also specify the colors for mailboxes with new mails by using:
7023 <muttng-doc:lstconf>
7024 color sidebar_new red black
7025 color sidebar white black</muttng-doc:lstconf>
7030 Reasonable key bindings look e.g. like this:
7032 <muttng-doc:lstconf>
7033 bind index \Cp sidebar-prev
7034 bind index \Cn sidebar-next
7035 bind index \Cb sidebar-open
7036 bind pager \Cp sidebar-prev
7037 bind pager \Cn sidebar-next
7038 bind pager \Cb sidebar-open
7040 macro index B ':toggle sidebar_visible^M'
7041 macro pager B ':toggle sidebar_visible^M'</muttng-doc:lstconf>
7046 You can then go up and down by pressing Ctrl-P and Ctrl-N, and
7047 switch on and off the sidebar simply by pressing 'B'.
7057 <title>External Address Queries</title>
7060 Mutt-ng supports connecting to external directory databases such as
7062 ph/qi, bbdb, or NIS through a wrapper script which connects to mutt
7063 using a simple interface. Using the
7064 <muttng-doc:varref name="query-command"/>
7065 variable, you specify the wrapper
7066 command to use. For example:
7071 <muttng-doc:lstconf>
7072 set query_command = "mutt_ldap_query.pl '%s'"</muttng-doc:lstconf>
7077 The wrapper script should accept the query on the command-line. It
7078 should return a one line message, then each matching response on a
7079 single line, each line containing a tab separated address then name
7080 thensome other optional information. On error, or if there are no
7082 addresses, return a non-zero exit code and a one line error message.
7086 An example multiple response output:
7089 Searching database ... 20 entries ... 3 matching:
7090 me@cs.hmc.edu Michael Elkins mutt dude
7091 blong@fiction.net Brandon Long mutt and more
7092 roessler@guug.de Thomas Roessler mutt pgp</screen>
7097 There are two mechanisms for accessing the query function of mutt. One
7098 is to do a query from the index menu using the query function (default:
7100 This will prompt for a query, then bring up the query menu which will
7101 list the matching responses. From the query menu, you can select
7102 addresses to create aliases, or to mail. You can tag multiple
7103 addressesto mail, start a new query, or have a new query appended to
7109 The other mechanism for accessing the query function is for address
7110 completion, similar to the alias completion. In any prompt for address
7111 entry, you can use the complete-query function (default: ^T) to
7113 query based on the current address you have typed. Like aliases, mutt
7114 will look for what you have typed back to the last space or comma. If
7115 there is a single response for that query, mutt will expand the address
7116 in place. If there are multiple responses, mutt will activate the
7117 querymenu. At the query menu, you can select one or more addresses to
7119 added to the prompt.
7128 <sect1 id="mailbox-formats">
7129 <title>Mailbox Formats</title>
7132 Mutt-ng supports reading and writing of four different mailbox formats:
7133 mbox, MMDF, MH and Maildir. The mailbox type is autodetected, so there
7134 is no need to use a flag for different mailbox types. When creating
7135 newmailboxes, Mutt-ng uses the default specified with the
7136 <muttng-doc:varref name="mbox-type"/>
7141 <emphasis role="bold">mbox</emphasis>. This is the most widely used
7142 mailbox format for UNIX. All
7143 messages are stored in a single file. Each message has a line of the
7149 <muttng-doc:lstmail>
7150 From me@cs.hmc.edu Fri, 11 Apr 1997 11:44:56 PST</muttng-doc:lstmail>
7155 to denote the start of a new message (this is often referred to as the
7160 <emphasis role="bold">MMDF</emphasis>. This is a variant of the <emphasis>
7163 format. Each message is
7164 surrounded by lines containing ``^A^A^A^A'' (four
7169 <emphasis role="bold">MH</emphasis>. A radical departure from <emphasis>
7172 and <emphasis>MMDF</emphasis>, a mailbox
7173 consists of a directory and each message is stored in a separate file.
7174 The filename indicates the message number (however, this is may not
7175 correspond to the message number Mutt-ng displays). Deleted messages
7176 arerenamed with a comma (,) prepended to the filename. <emphasis role="bold">
7180 detects this type of mailbox by looking for either <literal>
7183 or <literal>.xmhcache</literal> (needed to distinguish normal
7189 <emphasis role="bold">Maildir</emphasis>. The newest of the mailbox
7190 formats, used by the Qmail MTA (a
7191 replacement for sendmail). Similar to <emphasis>MH</emphasis>, except
7193 subdirectories of the mailbox: <emphasis>tmp</emphasis>, <emphasis>new</emphasis> and <emphasis>
7197 for the messages are chosen in such a way they are unique, even when
7198 twoprograms are writing the mailbox over NFS, which means that no file
7209 <sect1 id="shortcuts">
7210 <title>Mailbox Shortcuts</title>
7213 There are a number of built in shortcuts which refer to specific
7215 These shortcuts can be used anywhere you are prompted for a file or
7226 ! -- refers to your <muttng-doc:varref name="spoolfile"/>
7233 > -- refers to your <muttng-doc:varref name="mbox"/> file
7239 < -- refers to your <muttng-doc:varref name="record"/> file
7245 ^ -- refers to the current mailbox
7251 - or !! -- refers to the file you've last visited
7257 ~ -- refers to your home directory
7263 = or + -- refers to your <muttng-doc:varref name="folder"/>
7270 @<emphasis>alias</emphasis> -- refers to the <muttng-doc:hook name="save"/>
7271 as determined by the address of the alias
7285 <sect1 id="using-lists">
7286 <title>Handling Mailing Lists</title>
7289 Mutt-ng has a few configuration options that make dealing with large
7290 amounts of mail easier. The first thing you must do is to let Mutt
7291 know what addresses you consider to be mailing lists (technically
7292 this does not have to be a mailing list, but that is what it is most
7293 often used for), and what lists you are subscribed to. This is
7294 accomplished through the use of the <muttng-doc:cmdref name="lists"/>
7295 commands in your muttrc.
7299 Now that Mutt-ng knows what your mailing lists are, it can do several
7300 things, the first of which is the ability to show the name of a list
7301 through which you received a message (i.e., of a subscribed list) in
7302 the <emphasis>index</emphasis> menu display. This is useful to
7304 personal and list mail in the same mailbox. In the
7305 <muttng-doc:varref name="index-format"/>
7306 variable, the escape ``%L''
7307 will return the string ``To <list>'' when ``list'' appears in the
7308 ``To'' field, and ``Cc <list>'' when it appears in the ``Cc''
7309 field (otherwise it returns the name of the author).
7313 Often times the ``To'' and ``Cc'' fields in mailing list messages
7314 tend to get quite large. Most people do not bother to remove the
7315 author of the message they are reply to from the list, resulting in
7316 two or more copies being sent to that person. The ``list-reply''
7317 function, which by default is bound to ``L'' in the <emphasis>index</emphasis> menu
7318 and <emphasis>pager</emphasis>, helps reduce the clutter by only
7320 known mailing list addresses instead of all recipients (except as
7321 specified by <literal>Mail-Followup-To</literal>, see below).
7325 Mutt-ng also supports the <literal>Mail-Followup-To</literal> header.
7327 a message to a list of recipients which includes one or several
7328 subscribed mailing lists, and if the <muttng-doc:varref name="followup-to"/>
7329 option is set, mutt will generate
7330 a Mail-Followup-To header which contains all the recipients to whom
7331 you send this message, but not your address. This indicates that
7332 group-replies or list-replies (also known as ``followups'') to this
7333 message should only be sent to the original recipients of the
7334 message, and not separately to you - you'll receive your copy through
7335 one of the mailing lists you are subscribed to.
7339 Conversely, when group-replying or list-replying to a message which
7340 has a <literal>Mail-Followup-To</literal> header, mutt will respect
7342 the <muttng-doc:varref name="honor-followup-to"/>
7344 variable is set. Using list-reply will in this case also make sure
7345 that the reply goes to the mailing list, even if it's not specified
7346 in the list of recipients in the <literal>Mail-Followup-To</literal>.
7350 Note that, when header editing is enabled, you can create a
7351 <literal>Mail-Followup-To</literal> header manually. Mutt-ng will only
7353 this header if it doesn't exist when you send the message.
7357 The other method some mailing list admins use is to generate a
7358 ``Reply-To'' field which points back to the mailing list address rather
7359 than the author of the message. This can create problems when trying
7360 to reply directly to the author in private, since most mail clients
7361 will automatically reply to the address given in the ``Reply-To''
7362 field. Mutt-ng uses the <muttng-doc:varref name="reply-to"/>
7363 variable to help decide which address to use. If set to <emphasis>
7367 <emphasis>ask-no</emphasis>, you will be
7368 prompted as to whether or not you would like to use the address given
7369 inthe ``Reply-To'' field, or reply directly to the address given in the
7370 ``From'' field. When set to <emphasis>yes</emphasis>, the ``Reply-To''
7371 field will be used when
7376 The ``X-Label:'' header field can be used to further identify mailing
7377 lists or list subject matter (or just to annotate messages
7378 individually). The <muttng-doc:varref name="index-format"/>
7379 variable's ``%y'' and
7380 ``%Y'' escapes can be used to expand ``X-Label:'' fields in the
7381 index, and Mutt-ng's pattern-matcher can match regular expressions to
7382 ``X-Label:'' fields with the ``<muttng-doc:pattern name="y"/>'' selector. ``X-Label:'' is
7384 standard message header field, but it can easily be inserted by
7385 procmailand other mail filtering agents.
7389 Lastly, Mutt-ng has the ability to <link linkend="sort">sort</link> the
7391 <link linkend="threads">threads</link>. A thread is a group of
7392 messages which all relate to the same
7393 subject. This is usually organized into a tree-like structure where a
7394 message and all of its replies are represented graphically. If you've
7396 used a threaded news client, this is the same concept. It makes
7397 dealingwith large volume mailing lists easier because you can easily
7399 uninteresting threads and quickly find topics of value.
7408 <sect1 id="editing-threads">
7409 <title>Editing threads</title>
7412 Mutt-ng has the ability to dynamically restructure threads that are
7414 either by misconfigured software or bad behavior from some
7415 correspondents. This allows to clean your mailboxes formats) from these
7416 annoyances which make it hard to follow a discussion.
7419 <sect2 id="editing-threads-link">
7420 <title>Linking threads</title>
7423 Some mailers tend to "forget" to correctly set the "In-Reply-To:" and
7424 "References:" headers when replying to a message. This results in
7426 discussions because Mutt-ng has not enough information to guess the
7429 You can fix this by tagging the reply, then moving to the parent
7431 and using the ``link-threads'' function (bound to & by default).
7433 reply will then be connected to this "parent" message.
7437 You can also connect multiple children at once, tagging them and
7439 tag-prefix command (';') or the auto_tag option.
7444 <sect2 id="editing-threads-break">
7445 <title>Breaking threads</title>
7448 On mailing lists, some people are in the bad habit of starting a new
7449 discussion by hitting "reply" to any message from the list and
7451 the subject to a totally unrelated one.
7452 You can fix such threads by using the ``break-thread'' function
7453 (boundby default to #), which will turn the subthread starting
7455 current message into a whole different thread.
7467 <title>Delivery Status Notification (DSN) Support</title>
7470 <muttng-doc:rfc num="1894"/> defines a set of MIME content types for relaying information
7471 about the status of electronic mail messages. These can be thought of
7473 ``return receipts.''
7477 Users can make use of it in one of the following two ways:
7486 Berkeley sendmail 8.8.x currently has some command line options
7487 in which the mail client can make requests as to what type of
7489 messages should be returned.
7495 The SMTP support via libESMTP supports it, too.
7504 To support this, there are two variables:
7513 <muttng-doc:varref name="dsn-notify"/> is used
7514 to request receipts for different results (such as failed
7515 message,message delivered, etc.).
7522 <muttng-doc:varref name="dsn-return"/> requests
7523 how much of your message should be returned with the receipt
7524 (headers or full message).
7534 Please see the reference chapter for possible values.
7544 <title>POP3 Support (OPTIONAL)</title>
7547 If Mutt-ng was compiled with POP3 support (by running the <emphasis>
7550 script with the <emphasis>--enable-pop</emphasis> flag), it has the
7552 with mailboxes located on a remote POP3 server and fetch mail for local
7557 You can access the remote POP3 mailbox by selecting the folder
7558 <literal>pop://popserver/</literal>.
7562 You can select an alternative port by specifying it with the server,
7564 <literal>pop://popserver:port/</literal>.
7568 You can also specify different username for each folder, i.e.:
7569 <literal>pop://username@popserver[:port]/</literal>.
7573 Polling for new mail is more expensive over POP3 than locally. For this
7574 reason the frequency at which Mutt-ng will check for mail remotely can
7577 <muttng-doc:varref name="pop-mail-check"/>
7578 variable, which defaults to every 60 seconds.
7582 If Mutt-ng was compiled with SSL support (by running the <emphasis>
7585 script with the <emphasis>--with-ssl</emphasis> flag), connections to
7587 can be encrypted. This naturally requires that the server supports
7588 SSL encrypted connections. To access a folder with POP3/SSL, you should
7589 use pops: prefix, ie:
7590 <literal>pops://[username@]popserver[:port]/</literal>.
7594 Another way to access your POP3 mail is the <emphasis>fetch-mail</emphasis> function
7595 (default: G). It allows to connect to <link
7596 linkend="pop-host">pop-host</link>
7597 ,fetch all your new mail and place it in the
7598 local <muttng-doc:varref name="spoolfile"/>. After this
7599 point, Mutt-ng runs exactly as if the mail had always been local.
7603 <emphasis role="bold">Note:</emphasis> If you only need to fetch all
7604 messages to local mailbox
7605 you should consider using a specialized program, such as
7606 <muttng-doc:man name="fetchmail"/>.
7616 <title>IMAP Support (OPTIONAL)</title>
7619 If Mutt-ng was compiled with IMAP support (by running the
7620 <emphasis>configure</emphasis> script with the
7621 <emphasis>--enable-imap</emphasis> flag), it has the
7622 ability to work with folders located on a remote IMAP server.
7626 You can access the remote inbox by selecting the folder via its
7632 imap://imapserver/INBOX</screen>
7636 where <literal>imapserver</literal> is the name of the IMAP
7637 server and <literal>INBOX</literal> is the special name for your
7638 spool mailbox on the IMAP server. If you want to access another
7639 mail folder at the IMAP server, you should use
7644 imap://imapserver/path/to/folder</screen>
7648 where <literal>path/to/folder</literal> is the path
7649 of the folder you want to access. You can select an alternative
7650 port by specifying it with the server, i.e.:
7655 imap://imapserver:port/INBOX</screen>
7659 You can also specify different username for each folder by
7660 prenpending your username and an @ symbol to the server's name.
7664 If Mutt-ng was compiled with SSL support (by running the <emphasis>
7667 script with the <emphasis>--with-ssl</emphasis> flag), connections to
7669 can be encrypted. This naturally requires that the server supports
7670 SSL encrypted connections. To access a folder with IMAP/SSL, you only
7671 need to substitute the initial <literal>imap://</literal> by
7672 <literal>imaps://</literal> in the above examples.
7676 Note that not all servers use / as the hierarchy separator. Mutt-ng
7678 correctly notice which separator is being used by the server and
7679 convertpaths accordingly.
7683 When browsing folders on an IMAP server, you can toggle whether to look
7684 at only the folders you are subscribed to, or all folders with the
7685 <emphasis>toggle-subscribed</emphasis> command. See also the
7686 <muttng-doc:varref name="imap-list-subscribed"/>
7691 Polling for new mail on an IMAP server can cause noticeable delays. So,
7693 want to carefully tune the
7694 <muttng-doc:varref name="imap-mail-check"/>
7696 <muttng-doc:varref name="timeout"/>
7701 Note that if you are using mbox as the mail store on UW servers prior
7702 tov12.250, the server has been reported to disconnect a client if
7704 selects the same folder.
7707 <sect2 id="imap-browser">
7708 <title>The Folder Browser</title>
7711 As of version 1.2, mutt supports browsing mailboxes on an IMAP
7712 server. This is mostly the same as the local file browser, with the
7713 following differences:
7719 Instead of file permissions, mutt displays the string "IMAP",
7720 possibly followed by the symbol "+", indicating
7721 that the entry contains both messages and subfolders. On
7722 Cyrus-like servers folders will often contain both messages and
7729 For the case where an entry can contain both messages and
7730 subfolders, the selection key (bound to <literal>enter</literal> by default)
7731 will choose to descend into the subfolder view. If you wish to
7733 the messages in that folder, you must use <literal>view-file</literal> instead
7734 (bound to <literal>space</literal> by default).
7740 You can create, delete and rename mailboxes with the
7741 <literal>create-mailbox</literal>, <literal>delete-mailbox</literal>, and
7742 <literal>rename-mailbox</literal> commands (default bindings: <literal>
7746 <literal>d</literal> and <literal>r</literal>, respectively).
7748 <literal>subscribe</literal> and <literal>unsubscribe</literal>
7749 to mailboxes (normally
7750 these are bound to <literal>s</literal> and <literal>u</literal>, respectively).
7760 <sect2 id="imap-auth">
7761 <title>Authentication</title>
7764 Mutt-ng supports four authentication methods with IMAP servers: SASL,
7765 GSSAPI, CRAM-MD5, and LOGIN (there is a patch by Grant Edwards to add
7766 NTLM authentication for you poor exchange users out there, but it has
7767 yet to be integrated into the main tree). There is also support for
7768 the pseudo-protocol ANONYMOUS, which allows you to log in to a public
7769 IMAP server without having an account. To use ANONYMOUS, simply make
7770 your username blank or "anonymous".
7774 SASL is a special super-authenticator, which selects among several
7776 (including GSSAPI, CRAM-MD5, ANONYMOUS, and DIGEST-MD5) the most
7778 method available on your host and the server. Using some of these
7780 (including DIGEST-MD5 and possibly GSSAPI), your entire session will
7782 encrypted and invisible to those teeming network snoops. It is the
7784 option if you have it. To use it, you must have the Cyrus SASL
7785 libraryinstalled on your system and compile mutt with the <emphasis>
7792 Mutt-ng will try whichever methods are compiled in and available on
7794 in the following order: SASL, ANONYMOUS, GSSAPI, CRAM-MD5, LOGIN.
7798 There are a few variables which control authentication:
7804 <muttng-doc:varref name="imap-user"/> - controls
7805 the username under which you request authentication on the IMAP
7807 for all authenticators. This is overridden by an explicit
7809 the mailbox path (i.e. by using a mailbox name of the form
7810 <literal>{user@host}</literal>).
7816 <muttng-doc:varref name="imap-pass"/> - a
7817 password which you may preset, used by all authentication
7819 a password is needed.
7825 <muttng-doc:varref name="imap-authenticators"/>
7826 - a colon-delimited list of IMAP
7827 authentication methods to try, in the order you wish to try
7829 specified, this overrides mutt's default (attempt everything,
7848 <title>NNTP Support (OPTIONAL)</title>
7851 If compiled with ``--enable-nntp'' option, Mutt-ng can read news from
7852 a newsserver via NNTP. You can open a newsgroup with the
7853 ``change-newsgroup'' function from the index/pager which is by default
7854 bound to <muttng-doc:key>i</muttng-doc:key>.
7858 The Default newsserver can be obtained from the <muttng-doc:envvar name="NNTPSERVER"/>
7859 environment variable. Like other
7861 info about subscribed newsgroups is saved in a file as specified by the
7862 <muttng-doc:varref name="nntp-newsrc"/> variable.
7863 Article headers are cached and can be loaded from a file when a
7864 newsgroup is entered instead loading from newsserver; currently, this
7865 caching mechanism still is different from the header caching for
7869 <sect2 id="nntp-scoring">
7870 <title>Again: Scoring</title>
7873 Especially for Usenet, people often ask for advanced filtering
7874 and scoring functionality. Of course, mutt-ng has scoring and
7875 allows a killfile, too. How to use a killfile has been discussed
7876 in <link linkend="command-score">Message Scoring</link>.
7880 What has not been discusses in detail is mutt-ng's built-in
7881 realname filter. For may newsreaders including those for
7882 ``advanced users'' like <emphasis>slrn</emphasis> or <emphasis>tin</emphasis>, there are frequent
7883 request for such functionality. The solutions offered often are
7884 complicated regular expressions.
7888 In mutt-ng this is as easy as
7893 <muttng-doc:lstconf>
7894 score ~* =42</muttng-doc:lstconf>
7899 This tells mutt-ng to apply a score of 42 to all messages whose
7900 sender specified a valid realname and a valid email address. Using
7905 <muttng-doc:lstconf>
7906 score !~* =42</muttng-doc:lstconf>
7911 on the contrary applies a score of 42 to all messages <emphasis>not</emphasis>
7912 matching those criteria which are very strict:
7921 Email addresses must be valid according to <muttng-doc:rfc num="2822"/>
7927 the name must consist of at least 2 fields whereby a field
7928 must not end in a dot. This means that ``Joe User'' and ``Joe
7929 A.User'' are valid while ``J. User'' and ``J. A. User'' aren't.
7936 it's assumed that users are interested in reading their
7937 own mail and mail from people who they have defined an alias
7938 forso that those 2 groups of messages are excluded from the
7962 <title>SMTP Support (OPTIONAL)</title>
7965 Mutt-ng can be built using a library called ``libESMTP'' which
7966 provides SMTP functionality. When <literal>configure</literal> was
7968 <literal>--with-libesmtp</literal> or the output <literal>muttng -v</literal> contains
7969 <literal>+USE_LIBESMTP</literal>, this will be or is the case
7971 support includes support for Delivery Status Notification
7972 (see <link linkend="dsn">dsn</link> section) as well as
7973 handling the <literal>8BITMIME</literal> flag controlled via
7974 <muttng-doc:varref name="use-8bitmime"/>.
7978 To enable sending mail directly via SMTP without an MTA such as
7979 Postfix or SSMTP and the like, simply set the <muttng-doc:varref name="smtp-host"/>
7980 variable pointing to your SMTP server.
7984 Authentication mechanisms are available via the <muttng-doc:varref name="smtp-user"/>
7985 and <muttng-doc:varref name="smtp-pass"/> variables.
7989 Transport Encryption via the StartTLS command is also available. For
7990 this to work, first of all Mutt-ng must be built with SSL or GNUTLS.
7991 Secondly, the <muttng-doc:varref name="smtp-use-tls"/> variable
7993 to ``enabled'' or ``required.'' In both cases, StartTLS will be used if
7994 the server supports it: for the second case, the connection will fail
7995 ifit doesn't while switching back to unencrypted communication for the
8000 Some mail providers require user's to set a particular envelope
8001 sender, i.e. they allow for only one value which may not be what the
8002 user wants to send as the <literal>From:</literal> header. In this
8004 <muttng-doc:varref name="smtp-envelope"/> may be used
8005 to set the envelope different from the <literal>From:</literal> header.
8010 <sect1 id="account-hook">
8011 <title>Managing multiple IMAP/POP/NNTP accounts (OPTIONAL)</title>
8014 If you happen to have accounts on multiple IMAP and/or POP servers,
8015 you may find managing all the authentication settings inconvenient and
8016 error-prone. The <muttng-doc:hook name="account"/> command may help. This hook works like
8017 <muttng-doc:hook name="folder"/> but is invoked whenever you access a remote mailbox
8018 (including inside the folder browser), not just when you open the
8028 <muttng-doc:lstconf>
8029 account-hook . 'unset imap_user; unset imap_pass; unset tunnel'
8030 account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo'
8031 account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'</muttng-doc:lstconf>
8041 <sect1 id="urlview">
8042 <title>Start a WWW Browser on URLs (EXTERNAL)</title>
8045 If a message contains URLs (<emphasis>unified resource locator</emphasis> = address in the
8046 WWW space like <emphasis>http://www.mutt.org/</emphasis>), it is
8048 a menu with all the URLs and start a WWW browser on one of them. This
8049 functionality is provided by the external urlview program which can be
8050 retrieved at <muttng-doc:web url="ftp://ftp.mutt.org/mutt/contrib/"/>
8051 and the configuration commands:
8053 <muttng-doc:lstconf>
8054 macro index \cb |urlview\n
8055 macro pager \cb |urlview\n</muttng-doc:lstconf>
8065 <sect1 id="compressed-folders">
8066 <title>Compressed folders Support (OPTIONAL)</title>
8069 If Mutt-ng was compiled with compressed folders support (by running the
8070 <emphasis>configure</emphasis> script with the <emphasis>
8074 can open folders stored in an arbitrary format, provided that the user
8075 has a script to convert from/to this format to one of the accepted.
8079 The most common use is to open compressed archived folders e.g. with
8084 In addition, the user can provide a script that gets a folder in an
8085 accepted format and appends its context to the folder in the
8086 user-defined format, which may be faster than converting the entire
8087 folder to the accepted format, appending to it and converting back to
8088 the user-defined format.
8092 There are three hooks defined (<muttng-doc:hook name="open"/>,
8093 <muttng-doc:hook name="close"/> and <muttng-doc:hook name="append"/>
8094 )which define commands to uncompress and compress
8095 a folder and to append messages to an existing compressed folder
8105 <muttng-doc:lstconf>
8106 open-hook \\.gz$ "gzip -cd %f > %t"
8107 close-hook \\.gz$ "gzip -c %t > %f"
8108 append-hook \\.gz$ "gzip -c %t >> %f" </muttng-doc:lstconf>
8113 You do not have to specify all of the commands. If you omit <muttng-doc:hook name="append"/>
8114 ,the folder will be open and
8115 closed again each time you will add to it. If you omit <muttng-doc:hook name="close"/>
8116 (or give empty command) , the
8117 folder will be open in the mode. If you specify <muttng-doc:hook name="append"/>
8118 though you'll be able to append
8123 Note that Mutt-ng will only try to use hooks if the file is not in one
8125 the accepted formats. In particular, if the file is empty, mutt
8126 supposes it is not compressed. This is important because it allows the
8127 use of programs that do not have well defined extensions. Just use
8128 "." as a regexp. But this may be surprising if your
8129 compressing script produces empty files. In this situation, unset
8130 <muttng-doc:varref name="save-empty"/>
8131 ,so that the compressed file
8132 will be removed if you delete all of the messages.
8135 <sect2 id="open-hook">
8136 <title>Open a compressed mailbox for reading</title>
8139 Usage: <muttng-doc:hook name="open"/> <emphasis>regexp</emphasis> "<emphasis>command</emphasis>"
8143 The <emphasis>command</emphasis> is the command that can be used for
8145 folders whose names match <emphasis>regexp</emphasis>.
8149 The <emphasis>command</emphasis> string is the printf-like format
8151 should accept two parameters: %f, which is replaced with the
8152 (compressed) folder name, and %t which is replaced with the
8153 name of the temporary folder to which to write.
8157 %f and %t can be repeated any number of times in the
8158 command string, and all of the entries are replaced with the
8159 appropriate folder name. In addition, %% is replaced by
8160 %, as in printf, and any other %anything is left as is.
8164 The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis> remove the original compressed file.
8165 The <emphasis>command</emphasis> should return non-zero exit status
8167 mutt knows something's wrong.
8176 <muttng-doc:lstconf>
8177 open-hook \\.gz$ "gzip -cd %f > %t"</muttng-doc:lstconf>
8182 If the <emphasis>command</emphasis> is empty, this operation is
8183 disabled for this file
8189 <sect2 id="close-hook">
8190 <title>Write a compressed mailbox</title>
8193 Usage: <muttng-doc:hook name="close"/> <emphasis>regexp</emphasis>"<emphasis>command</emphasis>"
8197 This is used to close the folder that was open with the <muttng-doc:hook name="open"/>
8198 command after some changes were made to it.
8202 The <emphasis>command</emphasis> string is the command that can be
8203 used for closing the
8204 folders whose names match <emphasis>regexp</emphasis>. It has the
8206 the <muttng-doc:hook name="open"/> command. Temporary
8208 in this case is the folder previously produced by the <muttng-doc:hook name="open"/>
8213 The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis> remove the decompressed file. The
8214 <emphasis>command</emphasis> should return non-zero exit status if it
8216 knows something's wrong.
8225 <muttng-doc:lstconf>
8226 close-hook \\.gz$ "gzip -c %t > %f"</muttng-doc:lstconf>
8231 If the <emphasis>command</emphasis> is empty, this operation is
8232 disabled for this file
8233 type, and the file can only be open in the readonly mode.
8237 <muttng-doc:hook name="close"/> is not called when you
8239 from the folder if the folder was not changed.
8244 <sect2 id="append-hook">
8245 <title>Append a message to a compressed mailbox</title>
8248 Usage: <muttng-doc:hook name="append"/> <emphasis>regexp</emphasis>"<emphasis>command</emphasis>"
8252 This command is used for saving to an existing compressed folder.
8253 The <emphasis>command</emphasis> is the command that can be used for
8255 folders whose names match <emphasis>regexp</emphasis>. It has the
8257 the <muttng-doc:hook name="open"/> command.
8258 The temporary folder in this case contains the messages that are
8263 The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis> remove the decompressed file. The
8264 <emphasis>command</emphasis> should return non-zero exit status if it
8266 knows something's wrong.
8275 <muttng-doc:lstconf>
8276 append-hook \\.gz$ "gzip -c %t >> %f" </muttng-doc:lstconf>
8281 When <muttng-doc:hook name="append"/> is used, the
8283 not opened, which saves time, but this means that we can not find out
8284 what the folder type is. Thus the default (<muttng-doc:varref name="mbox-type"/>
8285 )type is always supposed (i.e.
8286 this is the format used for the temporary folder).
8290 If the file does not exist when you save to it, <muttng-doc:hook name="close"/>
8291 is called, and not <muttng-doc:hook name="append"/>. <muttng-doc:hook name="append"/>
8293 for appending to existing folders.
8297 If the <emphasis>command</emphasis> is empty, this operation is
8298 disabled for this file
8299 type. In this case, the folder will be open and closed again (using
8300 <muttng-doc:hook name="open"/> and <muttng-doc:hook name="close"/>
8301 respectively) each time you will add to it.
8306 <sect2 id="encrypted-folders">
8307 <title>Encrypted folders</title>
8310 The compressed folders support can also be used to handle encrypted
8311 folders. If you want to encrypt a folder with PGP, you may want to
8312 usethe following hooks:
8317 <muttng-doc:lstconf>
8318 open-hook \\.pgp$ "pgp -f < %f > %t"
8319 close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"</muttng-doc:lstconf>
8324 Please note, that PGP does not support appending to an encrypted
8325 folder, so there is no <muttng-doc:hook name="append"/> defined.
8329 <emphasis role="bold">Note:</emphasis> the folder is temporary stored
8330 decrypted in the /tmp
8331 directory, where it can be read by your system administrator. So
8332 thinkabout the security aspects of this.
8350 <chapter id="mime-support"> <!--{{{-->
8351 <title>Mutt-ng's MIME Support</title>
8354 Quite a bit of effort has been made to make Mutt-ng the premier text-mode
8355 MIME MUA. Every effort has been made to provide the functionality that
8356 the discerning MIME user requires, and the conformance to the standards
8357 wherever possible. When configuring Mutt-ng for MIME, there are two
8358 extratypes of configuration files which Mutt-ng uses. One is the
8359 <literal>mime.types</literal> file, which contains the mapping of file
8361 IANA MIME types. The other is the <literal>mailcap</literal> file, which
8363 the external commands to use for handling specific MIME types.
8367 <title>Using MIME in Mutt</title>
8370 There are three areas/menus in Mutt-ng which deal with MIME, they are
8372 pager (while viewing a message), the attachment menu and the compose
8376 <sect2 id="mime-view">
8377 <title>Viewing MIME messages in the pager</title>
8380 When you select a message from the index and view it in the pager,
8382 decodes the message to a text representation. Mutt-ng internally
8384 a number of MIME types, including <literal>text/plain, text/enriched,
8385 message/rfc822, and message/news
8387 .In addition, the export
8388 controlled version of Mutt-ng recognizes a variety of PGP MIME types,
8389 including PGP/MIME and application/pgp.
8393 Mutt-ng will denote attachments with a couple lines describing them.
8394 These lines are of the form:
8397 [-- Attachment #1: Description --]
8398 [-- Type: text/plain, Encoding: 7bit, Size: 10000 --]</screen>
8400 Where the <literal>Description</literal> is the description or
8401 filename given for the
8402 attachment, and the <literal>Encoding</literal> is one of
8403 <literal>7bit/8bit/quoted-printable/base64/binary</literal>.
8407 If Mutt-ng cannot deal with a MIME type, it will display a message
8411 [-- image/gif is unsupported (use 'v' to view this part) --]</screen>
8417 <sect2 id="attach-menu">
8418 <title>The Attachment Menu</title>
8421 The default binding for <literal>view-attachments</literal> is `v',
8423 attachment menu for a message. The attachment menu displays a list
8424 ofthe attachments in a message. From the attachment menu, you can
8426 print, pipe, delete, and view attachments. You can apply these
8427 operations to a group of attachments at once, by tagging the
8429 and by using the ``tag-prefix'' operator. You can also reply to the
8430 current message from this menu, and only the current attachment (or
8432 attachments tagged) will be quoted in your reply. You can view
8433 attachments as text, or view them using the mailcap viewer
8438 Finally, you can apply the usual message-related functions (like
8439 <muttng-doc:funcref name="resend-message"/>, and the reply
8440 and forward functions) to attachments of type <literal>message/rfc822</literal>.
8444 See the help on the attachment menu for more information.
8449 <sect2 id="compose-menu">
8450 <title>The Compose Menu</title>
8453 The compose menu is the menu you see before you send a message. It
8454 allows you to edit the recipient list, the subject, and other aspects
8455 of your message. It also contains a list of the attachments of your
8456 message, including the main body. From this menu, you can print,
8458 filter, pipe, edit, compose, review, and rename an attachment or a
8459 list of tagged attachments. You can also modifying the attachment
8460 information, notably the type, encoding and description.
8464 Attachments appear as follows:
8467 1 [text/plain, 7bit, 1K] /tmp/mutt-euler-8082-0 <no description>
8468 2 [applica/x-gunzip, base64, 422K] ~/src/mutt-0.85.tar.gz <no description></screen>
8473 The '-' denotes that Mutt-ng will delete the file after sending (or
8474 postponing, or canceling) the message. It can be toggled with the
8475 <literal>toggle-unlink</literal> command (default: u). The next
8477 content-type, and can be changed with the <literal>edit-type</literal> command
8478 (default: ^T). The next field is the encoding for the
8480 which allows a binary message to be encoded for transmission on 7bit
8481 links. It can be changed with the <literal>edit-encoding</literal>
8483 (default: ^E). The next field is the size of the attachment,
8484 rounded to kilobytes or megabytes. The next field is the filename,
8485 which can be changed with the <literal>rename-file</literal> command
8487 The final field is the description of the attachment, and can be
8488 changed with the <literal>edit-description</literal> command
8500 <sect1 id="mime-types">
8502 MIME Type configuration with <literal>mime.types</literal>
8506 When you add an attachment to your mail message, Mutt-ng searches your
8507 personal mime.types file within <muttng-doc:envvar name="HOME"/> and then
8508 the system mime.types file at <literal>/usr/local/share/mutt/mime.types</literal> or
8509 <literal>/etc/mime.types</literal>
8513 The mime.types file consist of lines containing a MIME type and a space
8514 separated list of extensions. For example:
8517 application/postscript ps eps
8519 audio/x-aiff aif aifc aiff</screen>
8521 A sample <literal>mime.types</literal> file comes with the Mutt-ng
8523 should contain most of the MIME types you are likely to use.
8527 If Mutt-ng can not determine the mime type by the extension of the file
8529 attach, it will look at the file. If the file is free of binary
8530 information, Mutt-ng will assume that the file is plain text, and mark
8532 as <literal>text/plain</literal>. If the file contains binary
8533 information, then Mutt-ng will
8534 mark it as <literal>application/octet-stream</literal>. You can change
8536 type that Mutt-ng assigns to an attachment by using the <literal>
8539 command from the compose menu (default: ^T). The MIME type is
8541 major mime type followed by the sub-type, separated by a '/'. 6 major
8542 types: application, text, image, video, audio, and model have been
8544 after various internet discussions. Mutt-ng recognises all of these if
8546 appropriate entry is found in the mime.types file. It also recognises
8548 major mime types, such as the chemical type that is widely used in the
8549 molecular modelling community to pass molecular data in various forms
8551 various molecular viewers. Non-recognised mime types should only be
8553 if the recipient of the message is likely to be expecting such
8563 <sect1 id="mime-mailcap">
8565 MIME Viewer configuration with <literal>mailcap</literal>
8569 Mutt-ng supports <muttng-doc:rfc num="1524"/> MIME Configuration, in particular the Unix
8570 specific format specified in Appendix A of the RfC. This file format
8571 is commonly referred to as the mailcap format. Many MIME compliant
8572 programs utilize the mailcap format, allowing you to specify handling
8573 for all MIME types in one place for all programs. Programs known to
8574 use this format include Netscape, XMosaic, lynx and metamail.
8578 In order to handle various MIME types that Mutt-ng can not handle
8579 internally, Mutt-ng parses a series of external configuration files to
8580 find an external handler. The default search string for these files
8581 is a colon delimited list set to
8584 ${HOME}/.mailcap:/usr/local/share/mutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap</screen>
8586 where <muttng-doc:envvar name="HOME"/> is your home directory.
8590 In particular, the metamail distribution will install a mailcap file,
8591 usually as <literal>/usr/local/etc/mailcap</literal>, which contains
8596 <sect2 id="mime-mailcap-basics">
8597 <title>The Basics of the mailcap file</title>
8600 A mailcap file consists of a series of lines which are comments,
8606 A comment line consists of a # character followed by anything you
8611 A blank line is blank.
8615 A definition line consists of a content type, a view command, and any
8616 number of optional fields. Each field of a definition line is
8617 dividedby a semicolon ';' character.
8621 The content type is specified in the MIME standard type/subtype
8624 <literal>text/plain, text/html, image/gif,</literal>
8625 etc. In addition, the mailcap format includes two formats for
8626 wildcards, one using the special '*' subtype, the other is the
8628 wild, where you only include the major type. For example, <literal>
8632 <literal>video,</literal> will match all image types and video types,
8637 The view command is a Unix command for viewing the type specified.
8639 are two different types of commands supported. The default is to send
8640 the body of the MIME message to the command on stdin. You can change
8641 this behavior by using %s as a parameter to your view command.
8642 This will cause Mutt-ng to save the body of the MIME message to a
8644 file, and then call the view command with the %s replaced by
8645 the name of the temporary file. In both cases, Mutt-ng will turn over
8647 terminal to the view program until the program quits, at which time
8649 will remove the temporary file if it exists.
8653 So, in the simplest form, you can send a text/plain message to the
8654 external pager more on stdin:
8657 text/plain; more</screen>
8659 Or, you could send the message as a file:
8662 text/plain; more %s</screen>
8664 Perhaps you would like to use lynx to interactively view a text/html
8668 text/html; lynx %s</screen>
8670 In this case, lynx does not support viewing a file from stdin, so you
8671 must use the %s syntax.
8672 <emphasis role="bold">Note:</emphasis> <emphasis>Some older versions
8673 of lynx contain a bug where they
8674 will check the mailcap file for a viewer for text/html. They will
8676 the line which calls lynx, and run it. This causes lynx to
8678 spawn itself to view the object.
8683 On the other hand, maybe you don't want to use lynx interactively,
8684 youjust want to have it convert the text/html to text/plain, then you
8689 text/html; lynx -dump %s | more</screen>
8694 Perhaps you wish to use lynx to view text/html files, and a pager on
8695 all other text formats, then you would use the following:
8699 text/*; more</screen>
8701 This is the simplest form of a mailcap file.
8706 <sect2 id="mime-mailcap-security">
8707 <title>Secure use of mailcap</title>
8710 The interpretation of shell meta-characters embedded in MIME
8712 can lead to security problems in general. Mutt-ng tries to quote
8714 in expansion of %s syntaxes properly, and avoids risky
8716 substituting them, see the <muttng-doc:varref name="mailcap-sanitize"/>
8721 Although mutt's procedures to invoke programs with mailcap seem to be
8722 safe, there are other applications parsing mailcap, maybe taking less
8724 of it. Therefore you should pay attention to the following rules:
8728 <emphasis>Keep the %-expandos away from shell quoting.</emphasis>
8729 Don't quote them with single or double quotes. Mutt-ng does this for
8730 you, the right way, as should any other program which interprets
8731 mailcap. Don't put them into backtick expansions. Be highly careful
8732 with eval statements, and avoid them if possible at all. Trying to
8734 broken behaviour with quotes introduces new leaks - there is no
8735 alternative to correct quoting in the first place.
8739 If you have to use the %-expandos' values in context where you
8741 quoting or backtick expansions, put that value into a shell variable
8742 and reference the shell variable where necessary, as in the following
8743 example (using <literal>$charset</literal> inside the backtick
8745 since it is not itself subject to any further expansion):
8751 text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \
8752 && test "`echo $charset | tr '[A-Z]' '[a-z]'`" != iso-8859-1</screen>
8758 <sect2 id="mime-mailcap-advanced">
8759 <title>Advanced mailcap Usage</title>
8761 <sect3 id="mime-mailcap-advanced-fields">
8762 <title>Optional Fields</title>
8765 In addition to the required content-type and view command fields,
8767 can add semi-colon ';' separated fields to set flags and other
8769 Mutt-ng recognizes the following optional fields:
8773 <term>copiousoutput</term>
8776 This flag tells Mutt-ng that the command passes possibly
8778 text on stdout. This causes Mutt-ng to invoke a pager
8779 (either the internal
8780 pager or the external pager defined by the pager variable)
8782 of the view command. Without this flag, Mutt-ng assumes
8784 is interactive. One could use this to replace the pipe to <literal>
8787 in the <literal>lynx -dump</literal> example in the Basic
8791 text/html; lynx -dump %s ; copiousoutput</screen>
8793 This will cause lynx to format the text/html output as
8795 and Mutt-ng will use your standard pager to display the
8801 <term>needsterminal</term>
8804 Mutt-ng uses this flag when viewing attachments with <muttng-doc:cmdref name="auto_view"/>,
8805 in order to decide whether it should honor the setting
8806 of the <muttng-doc:varref name="wait-key"/> variable or
8807 not. When an attachment is viewed using an interactive
8809 corresponding mailcap entry has a <emphasis>needsterminal</emphasis> flag, Mutt-ng will use
8810 <muttng-doc:varref name="wait-key"/> and the exit
8811 statusof the program to decide if it will ask you to press
8813 external program has exited. In all other situations it
8820 <term>compose=<command></term>
8823 This flag specifies the command to use to create a new
8825 specific MIME type. Mutt-ng supports this from the compose
8831 <term>composetyped=<command></term>
8834 This flag specifies the command to use to create a new
8836 specific MIME type. This command differs from the compose
8838 that mutt will expect standard MIME headers on the data.
8840 used to specify parameters, filename, description, etc. for
8842 attachment. Mutt-ng supports this from the compose menu.
8847 <term>print=<command></term>
8850 This flag specifies the command to use to print a specific
8852 Mutt-ng supports this from the attachment and compose
8858 <term>edit=<command></term>
8861 This flag specifies the command to use to edit a specific
8863 Mutt-ng supports this from the compose menu, and also uses
8865 new attachments. Mutt-ng will default to the defined
8872 <term>nametemplate=<template></term>
8875 This field specifies the format for the file denoted by
8877 command fields. Certain programs will require a certain
8879 for instance, to correctly view a file. For instance, lynx
8881 interpret a file as <literal>text/html</literal> if the
8882 file ends in <literal>.html</literal>.
8883 So, you would specify lynx as a <literal>text/html</literal> viewer with a line in
8884 the mailcap file like:
8887 text/html; lynx %s; nametemplate=%s.html</screen>
8893 <term>test=<command></term>
8896 This field specifies a command to run to test whether this
8898 entry should be used. The command is defined with the
8900 rules defined in the next section. If the command returns
8902 test passed, and Mutt-ng uses this entry. If the command
8904 then the test failed, and Mutt-ng continues searching for
8906 <emphasis role="bold">Note:</emphasis> <emphasis>the
8907 content-type must match before Mutt-ng performs the test.
8912 text/html; netscape -remote 'openURL(%s)' ; test=RunningX
8913 text/html; lynx %s</screen>
8915 In this example, Mutt-ng will run the program RunningX
8917 if the X Window manager is running, and non-zero if it
8919 RunningX returns 0, then Mutt-ng will call netscape to
8921 text/html object. If RunningX doesn't return 0, then
8923 to the next entry and use lynx to display the text/html
8933 <sect3 id="mime-mailcap-advanced-searchorder">
8934 <title>Search Order</title>
8937 When searching for an entry in the mailcap file, Mutt-ng will
8939 the most useful entry for its purpose. For instance, if you are
8940 attempting to print an <literal>image/gif</literal>, and you have
8942 entries in your mailcap file, Mutt-ng will search for an entry with
8948 image/gif; ; print= anytopnm %s | pnmtops | lpr; \
8949 nametemplate=%s.gif</screen>
8951 Mutt-ng will skip the <literal>image/*</literal> entry and use the <literal>
8954 entry with the print command.
8958 In addition, you can use this with <muttng-doc:cmdref name="auto_view"/>
8959 to denote two commands for viewing an attachment, one to be viewed
8960 automatically, the other to be viewed interactively from the
8962 menu. In addition, you can then use the test feature to determine
8964 viewer to use interactively depending on your environment.
8967 text/html; netscape -remote 'openURL(%s)' ; test=RunningX
8968 text/html; lynx %s; nametemplate=%s.html
8969 text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput</screen>
8971 For <muttng-doc:cmdref name="auto_view"/>, Mutt-ng will choose
8973 entry because of the copiousoutput tag. For interactive viewing,
8975 will run the program RunningX to determine if it should use the
8977 entry. If the program returns non-zero, Mutt-ng will use the
8979 for interactive viewing.
8984 <sect3 id="mime-mailcap-advanced-expansion">
8985 <title>Command Expansion</title>
8988 The various commands defined in the mailcap files are passed to the
8989 <literal>/bin/sh</literal> shell using the system() function.
8991 command is passed to <literal>/bin/sh -c</literal>, it is parsed to
8993 various special parameters with information from Mutt-ng. The
8995 Mutt-ng expands are:
9002 As seen in the basic mailcap section, this variable is
9004 to a filename specified by the calling program. This file
9006 the body of the message to view/print/edit or where the
9008 program should place the results of composition. In
9010 use of this keyword causes Mutt-ng to not pass the body of
9012 to the view/print/edit program on stdin.
9020 Mutt-ng will expand %t to the text representation of
9022 type of the message in the same form as the first parameter
9024 mailcap definition line, ie <literal>text/html</literal> or
9025 <literal>image/gif</literal>.
9030 <term>%{<parameter>}</term>
9033 Mutt-ng will expand this to the value of the specified
9035 from the Content-Type: line of the mail message. For
9037 Your mail message contains:
9039 <muttng-doc:lstmail>
9040 Content-Type: text/plain; charset=iso-8859-1</muttng-doc:lstmail>
9042 then Mutt-ng will expand %{charset} to
9043 iso-8859-1. The default metamail
9044 mailcap file uses this feature to test the charset to spawn
9046 using the right charset to view the message.
9054 This will be replaced by a %
9059 Mutt-ng does not currently support the %F and %n
9061 specified in <muttng-doc:rfc num="1524"/>. The main purpose of these parameters is for
9062 multipart messages, which is handled internally by Mutt-ng.
9069 <sect2 id="mime-mailcap-examples">
9070 <title>Example mailcap files</title>
9073 This mailcap file is fairly simple and standard:
9076 # I'm always running X :)
9077 video/*; xanim %s > /dev/null
9078 image/*; xv %s > /dev/null
9080 # I'm always running netscape (if my computer had more memory, maybe)
9081 text/html; netscape -remote 'openURL(%s)'</screen>
9086 This mailcap file shows quite a number of examples:
9092 # Use xanim to view all videos Xanim produces a header on startup,
9093 # send that to /dev/null so I don't see it
9094 video/*; xanim %s > /dev/null
9096 # Send html to a running netscape by remote
9097 text/html; netscape -remote 'openURL(%s)'; test=RunningNetscape
9098 # If I'm not running netscape but I am running X, start netscape on the
9100 text/html; netscape %s; test=RunningX
9102 # Else use lynx to view it as text
9105 # This version would convert the text/html to text/plain
9106 text/html; lynx -dump %s; copiousoutput
9108 # I use enscript to print text in two columns to a page
9109 text/*; more %s; print=enscript -2Gr %s
9111 # Netscape adds a flag to tell itself to view jpegs internally
9112 image/jpeg;xv %s; x-mozilla-flags=internal
9114 # Use xv to view images if I'm running X
9115 # In addition, this uses the \ to extend the line and set my editor
9117 image/*;xv %s; test=RunningX; edit=xpaint %s
9119 # Convert images to text using the netpbm tools
9120 image/*; (anytopnm %s | pnmscale -xysize 80 46 | ppmtopgm | \
9121 pgmtopbm | pbmtoascii -1x2 ) 2>&1 ; copiousoutput
9123 # Send excel spreadsheets to my NT box
9124 application/ms-excel; open.pl %s</screen>
9137 <title>MIME Autoview</title>
9140 <muttng-doc:cmddef name="auto_view">mime-type [mime-type ...]</muttng-doc:cmddef>
9144 <muttng-doc:cmddef name="unauto_view">mime-type [mime-type ...]</muttng-doc:cmddef>
9148 In addition to explicitly telling Mutt-ng to view an attachment with
9149 theMIME viewer defined in the mailcap file, Mutt-ng has support for
9150 automatically viewing MIME attachments while in the pager.
9154 To work, you must define a viewer in the mailcap file which uses the
9155 <literal>copiousoutput</literal> option to denote that it is
9157 Usually, you also use the entry to convert the attachment to a text
9158 representation which you can view in the pager.
9162 You then use the <literal>auto_view</literal> muttrc command to
9164 content-types that you wish to view automatically.
9168 For instance, if you set auto_view to:
9170 <muttng-doc:lstconf>
9171 auto_view text/html application/x-gunzip application/postscript
9172 image/gif application/x-tar-gz</muttng-doc:lstconf>
9177 Mutt-ng could use the following mailcap entries to automatically view
9178 attachments of these types.
9181 text/html; lynx -dump %s; copiousoutput; nametemplate=%s.html
9182 image/*; anytopnm %s | pnmscale -xsize 80 -ysize 50 | ppmtopgm | pgmtopbm | pbmtoascii ; copiousoutput
9183 application/x-gunzip; gzcat; copiousoutput
9184 application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput
9185 application/postscript; ps2ascii %s; copiousoutput</screen>
9190 ``unauto_view'' can be used to remove previous entries from the
9192 This can be used with <muttng-doc:hook name="message"/> to autoview messages based on size,
9194 ``unauto_view *'' will remove all previous entries.
9204 <title>MIME Multipart/Alternative</title>
9207 <muttng-doc:cmddef name="alternative_order">mime-type [mime-type ...]</muttng-doc:cmddef>
9211 <muttng-doc:cmddef name="unalternative_order">mime-type [mime-type ...]</muttng-doc:cmddef>
9215 Mutt-ng has some heuristics for determining which attachment of a
9216 multipart/alternative type to display. First, mutt will check the
9217 alternative_order list to determine if one of the available
9218 typesis preferred. The alternative_order list consists of a
9220 MIME types in order, including support for implicit and explicit
9221 wildcards, for example:
9223 <muttng-doc:lstconf>
9224 alternative_order text/enriched text/plain text
9225 application/postscript image/*</muttng-doc:lstconf>
9230 Next, mutt will check if any of the types have a defined
9231 <muttng-doc:cmdref name="auto_view"/>, and use that. Failing
9232 that, Mutt-ng will look for any text type. As a last attempt, mutt
9233 willlook for any type it knows how to handle.
9237 To remove a MIME type from the <literal>alternative_order</literal> list, use the
9238 <literal>unalternative_order</literal> command.
9247 <sect1 id="attachments">
9248 <title>Attachment Searching and Counting</title>
9251 If you ever lose track of attachments in your mailboxes, Mutt's
9252 attachment-counting and -searching support might be for you. You
9253 can make your message index display the number of qualifying
9254 attachments in each message, or search for messages by
9255 attachment count. You also can configure what kinds of
9256 attachments qualify for this feature with the attachments and
9257 unattachments commands.
9265 <muttng-doc:cmddef name="attachments">
9266 ( {+|-}disposition mime-type | ? )
9267 </muttng-doc:cmddef>
9270 <muttng-doc:cmddef name="unattachments">
9271 {+|-}disposition mime-type
9272 </muttng-doc:cmddef>
9276 Disposition is the attachment's Content-disposition type -- either
9277 "inline" or "attachment". You can abbreviate this to I or A.
9281 Disposition is prefixed by either a + symbolor a - symbol. If it's
9282 a +, you're saying that you want to allow this disposition and MIME
9283 type to qualify. If it's a -, you're saying that this disposition
9284 and MIME type is an exception to previous + rules. There are examples
9285 below of how this is useful.
9289 Mime-type is, unsurprisingly, the MIME type of the attachment you want
9290 to affect. A MIME type is always of the format "major/minor", where
9291 "major" describes the broad category of document you're looking at, and
9292 "minor" describes the specific type within that category. The major
9293 part of mim-type must be literal text (or the special token "*"), but
9294 the minor part may be a regular expression. (Therefore, "*/.*" matches
9299 The MIME types you give to the attachments directive are a kind of
9300 pattern. When you use the attachments directive, the patterns you
9301 specify are added to a list. When you use unattachments, the pattern
9302 is removed from the list. The patterns are not expanded and matched
9303 to specific MIME types at this time -- they're just text in a list.
9304 They're only matched when actually evaluating a message.
9308 Some examples might help to illustrate. The examples that are not
9309 commented out define the default configuration of the lists.
9313 ## Removing a pattern from a list removes that pattern literally. It
9314 ## does not remove any type matching the pattern.
9316 ## attachments +A */.*
9317 ## attachments +A image/jpeg
9318 ## unattachments +A */.*
9320 ## This leaves "attached" image/jpeg files on the allowed attachments
9321 ## list. It does not remove all items, as you might expect, because the
9322 ## second */.* is not a matching expression at this time.
9324 ## Remember: "unattachments" only undoes what "attachments" has done!
9325 ## It does not trigger any matching on actual messages.
9328 ## Qualify any MIME part with an "attachment" disposition, EXCEPT for
9329 ## text/x-vcard and application/pgp parts. (PGP parts are already known
9330 ## to mutt, and can be searched for with ~g, ~G, and ~k.)
9332 ## I've added x-pkcs7 to this, since it functions (for S/MIME)
9333 ## analogously to PGP signature attachments. S/MIME isn't supported
9334 ## in a stock mutt build, but we can still treat it specially here.
9337 attachments -A text/x-vcard application/pgp.*
9338 attachments -A application/x-pkcs7-.*
9340 ## Discount all MIME parts with an "inline" disposition, unless they're
9341 ## text/plain. (Why inline a text/plain part unless it's external to the
9344 attachments +I text/plain
9346 ## These two lines make Mutt qualify MIME containers. (So, for example,
9347 ## a message/rfc822 forward will count as an attachment.) The first
9348 ## line is unnecessary if you already have "attach-allow */.*", of
9349 ## course. These are off by default! The MIME elements contained
9350 ## within a message/* or multipart/* are still examined, even if the
9351 ## containers themseves don't qualify.
9353 #attachments +A message/.* multipart/.*
9354 #attachments +I message/.* multipart/.*
9356 ## You probably don't really care to know about deleted attachments.
9357 attachments -A message/external-body
9358 attachments -I message/external-body
9362 "attachments ?" will list your current settings in Muttrc format, so
9363 that it can be pasted elsewhere.
9367 Please note that counting attachments may require lots of data be
9368 loaded. This may cause noticeable slowdowns over network links
9369 depending on the connection speed and message sizes. To fine-tune the
9370 behavior on a per-folder or other basis, the <muttng-doc:varref
9371 name="count-attachments"/> variable may be used.
9377 <title>MIME Lookup</title>
9380 <muttng-doc:cmddef name="mime_lookup">mime-type [mime-type ...]</muttng-doc:cmddef>
9384 <muttng-doc:cmddef name="unmime_lookup">mime-type [mime-type ...]</muttng-doc:cmddef>
9388 Mutt-ng's mime_lookup list specifies a list of mime-types that
9390 be treated according to their mailcap entry. This option is designed
9391 todeal with binary types such as application/octet-stream. When an
9393 mime-type is listed in mime_lookup, then the extension of the
9395 be compared to the list of extensions in the mime.types file. The
9397 associated with this extension will then be used to process the
9399 according to the rules in the mailcap file and according to any other
9401 options (such as auto_view) specified. Common usage would be:
9403 <muttng-doc:lstconf>
9404 mime_lookup application/octet-stream application/X-Lotus-Manuscript</muttng-doc:lstconf>
9409 In addition, the unmime_lookup command may be used to disable
9411 for any particular mime-type if it had been set, for example, in a
9429 <chapter id="security"> <!--{{{-->
9430 <title>Security Considerations</title>
9433 First of all, mutt-ng contains no security holes included by
9434 intention but may contain unknown security holes. As a consequence,
9435 please run mutt-ng only with as few permissions as possible.
9439 Please do not run mutt-ng as the super user.
9443 When configuring mutt-ng, there're some points to note about secure
9448 In practice, mutt-ng can be easily made as vulnerable as even the
9449 most insecure mail user agents (in their default configuration) just
9450 by changing mutt-ng's configuration files: it then can execute
9451 arbitrary programs and scripts attached to messages, send out private
9452 data on its own, etc. Although this is not believed to the common type
9453 of setup, please read this chapter carefully.
9456 <sect1 id="security-passwords">
9457 <title>Passwords</title>
9460 Although mutt-ng can be told the various passwords for accounts,
9461 please never store passwords in configuration files. Besides the
9462 fact that the system's operator can always read them, you could
9463 forget to replace the actual password with asterisks when reporting
9464 a bug or asking for help via, for example, a mailing list so that
9465 your mail including your password could be archived by internet
9466 search engines, etc. Please never store passwords on disk.
9471 <sect1 id="security-tempfiles">
9472 <title>Temporary Files</title>
9475 Mutt-ng uses many temporary files for viewing messages, verifying
9476 digital signatures, etc. The <muttng-doc:varref name="umask"/>
9477 variable can be used to change the default permissions of these
9478 files. Please only change it if you really know what you are doing.
9479 Also, a different location for these files may be desired which can
9480 be changed via the <muttng-doc:varref name="tmpdir"/> variable.
9485 <sect1 id="security-leaks">
9486 <title>Information Leaks</title>
9488 <sect2 id="security-leaks-mid">
9489 <title>Message-ID: headers</title>
9492 In the default configuration, mutt-ng will leak some information
9493 to the outside world when sending messages: the generation of
9494 <literal>Message-ID:</literal> headers includes a step counter which
9496 (and rotated) with every message sent. If you'd like to hide this
9497 information probably telling others how many mail you sent in which
9498 time, you at least need to remove the <literal>%P</literal>
9500 default setting of the <muttng-doc:varref name="msgid-format"/> variable. Please make sure that
9501 you really know how local parts of these <literal>Message-ID:</literal> headers
9507 <sect2 id="security-leaks-mailto">
9508 <title>mailto:-style links</title>
9511 As mutt-ng be can be set up to be the mail client to handle
9512 <literal>mailto:</literal> style links in websites, there're security
9513 considerations, too. To keep the old behavior by default, mutt-ng
9514 will be strict in interpreting them which means that arbitrary
9515 header fields can be embedded in these links which could override
9516 existing header fields or attach arbitrary files. This may be
9517 problematic if the <muttng-doc:varref name="edit-headers"/>
9518 variable is <emphasis>unset</emphasis>, i.e. the
9519 user doesn't want to see header fields while editing the message.
9523 For example, following a link like
9529 mailto:joe@host?Attach=~/.gnupg/secring.gpg</screen>
9534 will send out the user's private gnupg keyring to <literal>joe@host</literal> if
9535 the user doesn't follow the information on screen carefully
9540 When <emphasis>unsetting</emphasis> the <muttng-doc:varref name="strict-mailto"/>
9541 variable, mutt-ng will
9550 be less strict when interpreting these links by
9551 prepending a <literal>X-Mailto-</literal> string to all header
9553 embedded in such a link <emphasis>and</emphasis>
9560 turn on the <muttng-doc:varref name="edit-headers"/>
9562 force to let the user see all the headers
9563 (because they still may leak information.)
9576 <sect1 id="security-external">
9577 <title>External applications</title>
9580 Mutt-ng in many places has to rely on external applications or
9581 for convenience supports mechanisms involving external
9585 <sect2 id="security-external-mailcap">
9586 <title>mailcap</title>
9589 One of these is the <literal>mailcap</literal> mechanism as defined
9590 by <muttng-doc:rfc num="1524"/>. Mutt-ng can be set up to <emphasis>automatically</emphasis>
9592 given utility as listed in one of the mailcap files (see the
9593 <muttng-doc:varref name="mailcap-path"/>
9594 variable for details.)
9598 These utilities may have a variety of security vulnerabilities,
9599 including overwriting of arbitrary files, information leaks or
9600 other exploitable bugs. These vulnerabilities may go unnoticed by
9601 the user, especially when they are called automatically (and
9602 without interactive prompting) from the mailcap file(s). When
9603 using mutt-ng's autoview mechanism in combination with mailcap
9604 files, please be sure to...
9613 manually select trustworth applications with a reasonable
9621 periodically check the contents of mailcap files,
9622 especially after software installations or upgrades
9629 keep the software packages referenced in the mailcap file up to
9637 leave the <muttng-doc:varref name="mailcap-sanitize"/> variable in its default
9638 state to restrict mailcap expandos to a safe set of characters
9649 <sect2 id="security-external-other">
9650 <title>Other</title>
9653 Besides the mailcap mechanism, mutt-ng uses a number of other
9654 external utilities for operation.
9658 The same security considerations apply for these as for tools
9659 involved via mailcap (for example, mutt-ng is vulnerable to Denial
9660 of Service Attacks with compressed folders support if the
9661 uncompressed mailbox is too large for the disk it is saved to.)
9665 As already noted, most of these problems are not built in but
9666 caused by wrong configuration, so please check your configuration.
9676 <chapter id="reference"> <!--{{{-->
9677 <title>Reference</title>
9679 <sect1 id="commandline">
9680 <title>Command line options</title>
9683 Running <literal>mutt</literal> with no arguments will make Mutt-ng
9684 attempt to read your spool
9685 mailbox. However, it is possible to read other mailboxes and
9686 to send messages from the command line as well.
9691 <table frame="none" rowsep="1" texstr="l|l">
9692 <title>Reference: Command Line Options</title>
9693 <tgroup cols="2" align="left" colsep="1" rowsep="1">
9696 <entry>Option</entry>
9697 <entry>Description</entry>
9702 <entry><literal>-A</literal></entry>
9703 <entry>expand an alias</entry>
9706 <entry><literal>-a</literal></entry>
9707 <entry>attach a file to a message</entry>
9710 <entry><literal>-b</literal></entry>
9711 <entry>specify a blind carbon-copy (BCC) address</entry>
9714 <entry><literal>-c</literal></entry>
9715 <entry>specify a carbon-copy (Cc) address</entry>
9718 <entry><literal>-e</literal></entry>
9719 <entry>specify a config command to be run after initialization files are read</entry>
9722 <entry><literal>-f</literal></entry>
9723 <entry>specify a mailbox to load</entry>
9726 <entry><literal>-F</literal></entry>
9727 <entry>specify an alternate file to read initialization commands</entry>
9730 <entry><literal>-h</literal></entry>
9731 <entry>print help on command line options</entry>
9734 <entry><literal>-H</literal></entry>
9735 <entry>specify a draft file from which to read a header and body</entry>
9738 <entry><literal>-i</literal></entry>
9739 <entry>specify a file to include in a message composition</entry>
9742 <entry><literal>-m</literal></entry>
9743 <entry>specify a default mailbox type</entry>
9746 <entry><literal>-n</literal></entry>
9747 <entry>do not read the system Muttngrc</entry>
9750 <entry><literal>-p</literal></entry>
9751 <entry>recall a postponed message</entry>
9754 <entry><literal>-Q</literal></entry>
9755 <entry>query a configuration variable</entry>
9758 <entry><literal>-R</literal></entry>
9759 <entry>open mailbox in read-only mode</entry>
9762 <entry><literal>-s</literal></entry>
9763 <entry>specify a subject (enclose in quotes if it contains spaces)</entry>
9766 <entry><literal>-t</literal></entry>
9767 <entry>dump the value of all variables to stdout</entry>
9770 <entry><literal>-T</literal></entry>
9771 <entry>dump the value of all changed variables to stdout</entry>
9774 <entry><literal>-v</literal></entry>
9775 <entry>show version number and compile-time definitions</entry>
9778 <entry><literal>-x</literal></entry>
9779 <entry>simulate the mailx(1) compose mode</entry>
9782 <entry><literal>-y</literal></entry>
9783 <entry>show a menu containing the files specified by the mailboxes command</entry>
9786 <entry><literal>-z</literal></entry>
9787 <entry>exit immediately if there are no messages in the mailbox</entry>
9790 <entry><literal>-Z</literal></entry>
9791 <entry>open the first folder with new message,exit immediately if none</entry>
9800 To read messages in a mailbox
9804 <literal>mutt</literal> ] -nz ] ] -F <emphasis>muttrc</emphasis> ] ] -m <emphasis>
9807 ] ] -f <emphasis>mailbox</emphasis> ]
9811 To compose a new message
9815 <literal>mutt</literal> ] -n ] ] -F <emphasis>muttrc</emphasis> ] ] -a <emphasis>
9818 ] ] -c <emphasis>address</emphasis> ] ] -i <emphasis>
9821 ] ] -s <emphasis>subject</emphasis> ] <emphasis>address</emphasis> ] <emphasis>
9828 Mutt-ng also supports a ``batch'' mode to send prepared messages.
9830 input from the file you wish to send. For example,
9834 <literal>mutt -s "data set for run #2"
9835 professor@bigschool.edu
9841 This command will send a message to ``professor@bigschool.edu'' with a
9843 of ``data set for run #2''. In the body of the message will be the
9845 of the file ``~/run2.dat''.
9854 <sect1 id="patterns">
9855 <title>Patterns</title>
9859 <table frame="none" rowsep="1" id="tab-patterns" texstr="l|l|l">
9860 <title>Reference: Patterns</title>
9861 <tgroup cols="2" align="left" colsep="1" rowsep="1">
9864 <entry>Pattern Modifier</entry>
9865 <entry>Argument</entry>
9866 <entry>Description</entry>
9871 <entry><muttng-doc:pattern full="1" name="A"/></entry>
9872 <entry><literal></literal></entry>
9873 <entry>all messages</entry>
9876 <entry><muttng-doc:pattern full="1" name="b"/></entry>
9877 <entry><literal>EXPR</literal></entry>
9878 <entry>messages which contain EXPR in the message body</entry>
9881 <entry><muttng-doc:pattern full="1" name="B"/></entry>
9882 <entry><literal>EXPR</literal></entry>
9883 <entry>messages which contain EXPR in the whole message</entry>
9886 <entry><muttng-doc:pattern full="1" name="c"/></entry>
9887 <entry><literal>EXPR</literal></entry>
9888 <entry>messages carbon-copied to EXPR</entry>
9891 <entry><muttng-doc:pattern full="1" name="C"/></entry>
9892 <entry><literal>EXPR</literal></entry>
9893 <entry>message is either to: or cc: EXPR</entry>
9896 <entry><muttng-doc:pattern full="1" name="D"/></entry>
9897 <entry><literal></literal></entry>
9898 <entry>deleted messages</entry>
9901 <entry><muttng-doc:pattern full="1" name="d"/></entry>
9902 <entry><literal>[MIN]-[MAX]</literal></entry>
9903 <entry>messages with ``date-sent'' in a Date range</entry>
9906 <entry><muttng-doc:pattern full="1" name="E"/></entry>
9907 <entry><literal></literal></entry>
9908 <entry>expired messages</entry>
9911 <entry><muttng-doc:pattern full="1" name="e"/></entry>
9912 <entry><literal>EXPR</literal></entry>
9913 <entry>message which contains EXPR in the ``Sender'' field</entry>
9916 <entry><muttng-doc:pattern full="1" name="F"/></entry>
9917 <entry><literal></literal></entry>
9918 <entry>flagged messages</entry>
9921 <entry><muttng-doc:pattern full="1" name="f"/></entry>
9922 <entry><literal>EXPR</literal></entry>
9923 <entry>messages originating from EXPR</entry>
9926 <entry><muttng-doc:pattern full="1" name="g"/></entry>
9927 <entry><literal></literal></entry>
9928 <entry>cryptographically signed messages</entry>
9931 <entry><muttng-doc:pattern full="1" name="G"/></entry>
9932 <entry><literal></literal></entry>
9933 <entry>cryptographically encrypted messages</entry>
9936 <entry><muttng-doc:pattern full="1" name="H"/></entry>
9937 <entry><literal>EXPR</literal></entry>
9938 <entry>messages with a spam attribute matching EXPR</entry>
9941 <entry><muttng-doc:pattern full="1" name="h"/></entry>
9942 <entry><literal>EXPR</literal></entry>
9943 <entry>messages which contain EXPR in the message header</entry>
9946 <entry><muttng-doc:pattern full="1" name="k"/></entry>
9947 <entry><literal></literal></entry>
9948 <entry>message contains PGP key material</entry>
9951 <entry><muttng-doc:pattern full="1" name="i"/></entry>
9952 <entry><literal>EXPR</literal></entry>
9953 <entry>message which match ID in the ``Message-ID'' field</entry>
9956 <entry><muttng-doc:pattern full="1" name="L"/></entry>
9957 <entry><literal>EXPR</literal></entry>
9958 <entry>message is either originated or received by EXPR</entry>
9961 <entry><muttng-doc:pattern full="1" name="l"/></entry>
9962 <entry><literal></literal></entry>
9963 <entry>message is addressed to a known mailing list</entry>
9966 <entry><muttng-doc:pattern full="1" name="m"/></entry>
9967 <entry><literal>[MIN]-[MAX]</literal></entry>
9968 <entry>message in the range MIN to MAX *)</entry>
9971 <entry><muttng-doc:pattern full="1" name="M"/></entry>
9972 <entry><literal></literal></entry>
9973 <entry>multipart messages</entry>
9976 <entry><muttng-doc:pattern full="1" name="n"/></entry>
9977 <entry><literal>[MIN]-[MAX]</literal></entry>
9978 <entry>messages with a score in the range MIN to MAX *)</entry>
9981 <entry><muttng-doc:pattern full="1" name="N"/></entry>
9982 <entry><literal></literal></entry>
9983 <entry>new messages</entry>
9986 <entry><muttng-doc:pattern full="1" name="O"/></entry>
9987 <entry><literal></literal></entry>
9988 <entry>old messages</entry>
9991 <entry><muttng-doc:pattern full="1" name="p"/></entry>
9992 <entry><literal></literal></entry>
9993 <entry>message is addressed to you (consults alternates)</entry>
9996 <entry><muttng-doc:pattern full="1" name="P"/></entry>
9997 <entry><literal></literal></entry>
9998 <entry>message is from you (consults alternates)</entry>
10001 <entry><muttng-doc:pattern full="1" name="Q"/></entry>
10002 <entry><literal></literal></entry>
10003 <entry>messages which have been replied to</entry>
10006 <entry><muttng-doc:pattern full="1" name="R"/></entry>
10007 <entry><literal></literal></entry>
10008 <entry>read messages</entry>
10011 <entry><muttng-doc:pattern full="1" name="r"/></entry>
10012 <entry><literal>[MIN]-[MAX]</literal></entry>
10013 <entry>messages with ``date-received'' in a Date range</entry>
10016 <entry><muttng-doc:pattern full="1" name="S"/></entry>
10017 <entry><literal></literal></entry>
10018 <entry>superseded messages</entry>
10021 <entry><muttng-doc:pattern full="1" name="s"/></entry>
10022 <entry><literal>EXPR</literal></entry>
10023 <entry>messages having EXPR in the ``Subject'' field.</entry>
10026 <entry><muttng-doc:pattern full="1" name="T"/></entry>
10027 <entry><literal></literal></entry>
10028 <entry>tagged messages</entry>
10031 <entry><muttng-doc:pattern full="1" name="t"/></entry>
10032 <entry><literal>EXPR</literal></entry>
10033 <entry>messages addressed to EXPR</entry>
10036 <entry><muttng-doc:pattern full="1" name="U"/></entry>
10037 <entry><literal></literal></entry>
10038 <entry>unread messages</entry>
10041 <entry><muttng-doc:pattern full="1" name="u"/></entry>
10042 <entry><literal></literal></entry>
10043 <entry>message is addressed to a subscribed mailing list</entry>
10046 <entry><muttng-doc:pattern full="1" name="v"/></entry>
10047 <entry><literal></literal></entry>
10048 <entry>message is part of a collapsed thread.</entry>
10051 <entry><muttng-doc:pattern full="1" name="V"/></entry>
10052 <entry><literal></literal></entry>
10053 <entry>cryptographically verified messages</entry>
10056 <entry><muttng-doc:pattern full="1" name="w"/></entry>
10057 <entry><literal>EXPR</literal></entry>
10058 <entry>messages which contain EXPR in the `Newsgroups' field (if compiled with NNTP support)</entry>
10061 <entry><muttng-doc:pattern full="1" name="x"/></entry>
10062 <entry><literal>EXPR</literal></entry>
10063 <entry>messages which contain EXPR in the `References' field</entry>
10066 <entry><muttng-doc:pattern full="1" name="X"/></entry>
10067 <entry><literal>[MIN]-[MAX]</literal></entry>
10068 <entry>messages with MIN to MAX attachments *)</entry>
10071 <entry><muttng-doc:pattern full="1" name="y"/></entry>
10072 <entry><literal>EXPR</literal></entry>
10073 <entry>messages which contain EXPR in the `X-Label' field</entry>
10076 <entry><muttng-doc:pattern full="1" name="z"/></entry>
10077 <entry><literal>[MIN]-[MAX]</literal></entry>
10078 <entry>messages with a size in the range MIN to MAX *)</entry>
10081 <entry><muttng-doc:pattern full="1" name="="/></entry>
10082 <entry><literal></literal></entry>
10083 <entry>duplicated messages (see $duplicate_threads)</entry>
10086 <entry><muttng-doc:pattern full="1" name="$"/></entry>
10087 <entry><literal></literal></entry>
10088 <entry>unreferenced messages (requires threaded view)</entry>
10091 <entry><muttng-doc:pattern full="1" name="*"/></entry>
10092 <entry><literal></literal></entry>
10093 <entry>``From'' contains realname and (syntactically) valid address
10094 (excluded are addresses matching against alternates or any alias)</entry>
10103 <link linkend="advanced-regexp">regexp</link>. Special attention has to be
10104 made when using regular expressions inside of patterns. Specifically,
10105 Mutt-ng's parser for these patterns will strip one level of backslash
10107 which is normally used for quoting. If it is your intention to use a
10108 backslash in the regular expression, you will need to use two
10114 *) The forms <literal><[MAX]</literal>, <literal>>[MIN]</literal>,
10115 <literal>[MIN]-</literal> and <literal>-[MAX]</literal>
10121 <sect1 id="commands">
10122 <title>Configuration Commands</title>
10125 The following are the commands understood by mutt.
10134 <literal><muttng-doc:hook name="account"/></literal> <emphasis>pattern</emphasis> <emphasis>command</emphasis>
10140 <literal><muttng-doc:cmdref name="alias"/></literal> <emphasis>key</emphasis> <emphasis>address</emphasis> [, <emphasis>address</emphasis>, ... ]
10146 <literal><muttng-doc:cmdref name="unalias"/></literal> [ * | <emphasis>key</emphasis> ... ]
10152 <literal><muttng-doc:cmdref name="alternates"/></literal> <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis> ... ]
10158 <literal><muttng-doc:cmdref name="unalternates"/></literal> [ * | <emphasis>regexp</emphasis> ... ]
10164 <literal><muttng-doc:cmdref name="alternative_order"/></literal> <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
10170 <literal><muttng-doc:cmdref name="unalternative_order"/></literal> <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
10176 <literal><muttng-doc:hook name="append"/></literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
10182 <literal><muttng-doc:cmdref name="auto_view"/></literal> <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
10188 <literal><muttng-doc:cmdref name="unauto_view"/></literal><emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
10194 <literal><muttng-doc:cmdref name="bind"/></literal> <emphasis>map</emphasis> <emphasis>key</emphasis> <emphasis>function</emphasis>
10200 <literal><muttng-doc:hook name="charset"/></literal> <emphasis>alias</emphasis> <emphasis>charset</emphasis>
10206 <literal><muttng-doc:hook name="close"/></literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
10212 <literal><muttng-doc:cmdref name="color"/></literal> <emphasis>object</emphasis> <emphasis>foreground</emphasis> <emphasis>background</emphasis> [ <emphasis>regexp</emphasis> ]
10218 <literal><muttng-doc:cmdref name="uncolor"/></literal> <emphasis>index</emphasis> <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis> ... ]
10224 <literal><muttng-doc:cmdref name="exec"/></literal> <emphasis>function</emphasis> [ <emphasis>function</emphasis> ... ]
10230 <literal><muttng-doc:hook name="fcc"/></literal> <emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
10236 <literal><muttng-doc:hook name="fcc-save"/></literal> <emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
10242 <literal><muttng-doc:hook name="folder"/></literal> <emphasis>pattern</emphasis> <emphasis>command</emphasis>
10248 <literal><muttng-doc:cmdref name="hdr_order"/></literal> <emphasis>header</emphasis> [ <emphasis>header</emphasis> ... ]
10254 <literal><muttng-doc:cmdref name="unhdr_order"/></literal> <emphasis>header</emphasis> [ <emphasis>header</emphasis> ... ]
10260 <literal><muttng-doc:hook name="charset"/></literal> <emphasis>charset</emphasis> <emphasis>local-charset</emphasis>
10266 <literal><muttng-doc:cmdref name="ignore"/></literal> <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis> ... ]
10272 <literal><muttng-doc:cmdref name="unignore"/></literal> <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis> ... ]
10278 <literal><muttng-doc:cmdref name="lists"/></literal> <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis> ... ]
10284 <literal><muttng-doc:cmdref name="unlists"/></literal> <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis> ... ]
10290 <literal><muttng-doc:cmdref name="macro"/></literal> <emphasis>menu</emphasis> <emphasis>key</emphasis> <emphasis>sequence</emphasis> [ <emphasis>description</emphasis> ]
10296 <literal><muttng-doc:cmdref name="mailboxes"/></literal> <emphasis>filename</emphasis> [ <emphasis>filename</emphasis> ... ]
10302 <literal><muttng-doc:hook name="mbox"/></literal> <emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
10308 <literal><muttng-doc:hook name="message"/></literal> <emphasis>pattern</emphasis> <emphasis>command</emphasis>
10314 <literal><muttng-doc:cmdref name="mime_lookup"/></literal> <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
10321 <muttng-doc:cmdref name="unmime_lookup"/></literal> <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
10327 <literal><muttng-doc:cmdref name="mono"/></literal> <emphasis>object attribute</emphasis> [ <emphasis>regexp</emphasis> ]
10333 <literal><muttng-doc:cmdref name="unmono"/></literal> <emphasis>index</emphasis> <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis> ... ]
10339 <literal><muttng-doc:cmdref name="my_hdr"/></literal> <emphasis>string</emphasis>
10345 <literal><muttng-doc:cmdref name="unmy_hdr"/></literal> <emphasis>field</emphasis> [ <emphasis>field</emphasis> ... ]
10351 <literal><muttng-doc:hook name="open"/></literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
10357 <literal><muttng-doc:hook name="crypt"/></literal> <emphasis>pattern</emphasis> <emphasis>key-id</emphasis>
10363 <literal><muttng-doc:cmdref name="push"/></literal> <emphasis>string</emphasis>
10369 <literal><muttng-doc:cmdref name="reset"/> </literal><emphasis>variable</emphasis> [ <emphasis>variable</emphasis> ... ]
10375 <literal><muttng-doc:hook name="save"/></literal> <emphasis>regexp</emphasis> <emphasis>filename</emphasis>
10381 <literal><muttng-doc:cmdref name="score"/> </literal> <emphasis>pattern</emphasis> <emphasis>value</emphasis>
10387 <literal><muttng-doc:cmdref name="unscore"/></literal> <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis> ... ]
10393 <literal><muttng-doc:hook name="send"/></literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
10399 <literal><muttng-doc:hook name="reply"/></literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
10405 <literal><muttng-doc:cmdref name="set"/></literal> [no|inv]<emphasis>variable</emphasis>[ =<emphasis>value</emphasis> ] [ <emphasis>variable</emphasis> ... ]
10411 <literal><muttng-doc:cmdref name="unset"/></literal> <emphasis>variable</emphasis> [ <emphasis>variable</emphasis> ... ]
10417 <literal><muttng-doc:cmdref name="source"/></literal> <emphasis>filename</emphasis>
10423 <literal><muttng-doc:cmdref name="spam"/></literal> <emphasis>pattern</emphasis> <emphasis>format</emphasis>
10429 <literal><muttng-doc:cmdref name="nospam"/></literal> <emphasis>pattern</emphasis>
10435 <literal><muttng-doc:cmdref name="subscribe"/></literal> <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis> ... ]
10441 <literal><muttng-doc:cmdref name="unsubscribe"/></literal> <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis> ... ]
10447 <literal><muttng-doc:cmdref name="toggle"/></literal> <emphasis>variable</emphasis> [ <emphasis>variable</emphasis> ... ]
10453 <literal><muttng-doc:cmdref name="unhook"/></literal> <emphasis>hook-type</emphasis>
10463 <sect1 id="variables">
10464 <title>Configuration variables</title>
10467 The following list contains all variables which, in the process of
10468 providing more consistency, have been renamed and are partially even
10469 removed already. The left column contains the old synonym variables,
10470 the right column the full/new name:
10474 <anchor id="sect-obsolete"/>
10476 <table frame="none" rowsep="1" texstr="l|l">
10477 <title>Reference: Obsolete Variables</title>
10478 <tgroup cols="2" align="left" colsep="1" rowsep="1">
10481 <entry>Old Name</entry>
10482 <entry>New Name</entry>
10487 <entry><literal>edit_hdrs</literal></entry>
10488 <entry><muttng-doc:varref name="edit-headers"/></entry>
10491 <entry><literal>forw_decode</literal></entry>
10492 <entry><muttng-doc:varref name="forward-decode"/></entry>
10495 <entry><literal>forw_format</literal></entry>
10496 <entry><muttng-doc:varref name="forward-format"/></entry>
10499 <entry><literal>forw_quote</literal></entry>
10500 <entry><muttng-doc:varref name="forward-quote"/></entry>
10503 <entry><literal>hdr_format</literal></entry>
10504 <entry><muttng-doc:varref name="index-format"/></entry>
10507 <entry><literal>indent_str</literal></entry>
10508 <entry><muttng-doc:varref name="indent-string"/></entry>
10511 <entry><literal>mime_fwd</literal></entry>
10512 <entry><muttng-doc:varref name="mime-forward"/></entry>
10515 <entry><literal>msg_format</literal></entry>
10516 <entry><muttng-doc:varref name="message-format"/></entry>
10519 <entry><literal>pgp_autosign</literal></entry>
10520 <entry><muttng-doc:varref name="crypt-autosign"/></entry>
10523 <entry><literal>pgp_autoencrypt</literal></entry>
10524 <entry><muttng-doc:varref name="crypt-autoencrypt"/></entry>
10527 <entry><literal>pgp_replyencrypt</literal></entry>
10528 <entry><muttng-doc:varref name="crypt-replyencrypt"/></entry>
10531 <entry><literal>pgp_replysign</literal></entry>
10532 <entry><muttng-doc:varref name="crypt-replysign"/></entry>
10535 <entry><literal>pgp_replysignencrypted</literal></entry>
10536 <entry><muttng-doc:varref name="crypt-replysignencrypted"/></entry>
10539 <entry><literal>pgp_verify_sig</literal></entry>
10540 <entry><muttng-doc:varref name="crypt-verify-sig"/></entry>
10543 <entry><literal>pgp_create_traditional</literal></entry>
10544 <entry><muttng-doc:varref name="pgp-autoinline"/></entry>
10547 <entry><literal>pgp_auto_traditional</literal></entry>
10548 <entry><muttng-doc:varref name="pgp-replyinline"/></entry>
10551 <entry><literal>forw_decrypt</literal></entry>
10552 <entry><muttng-doc:varref name="forward-decrypt"/></entry>
10555 <entry><literal>smime_sign_as</literal></entry>
10556 <entry><muttng-doc:varref name="smime-default-key"/></entry>
10559 <entry><literal>post_indent_str</literal></entry>
10560 <entry><muttng-doc:varref name="post-indent-string"/></entry>
10563 <entry><literal>print_cmd</literal></entry>
10564 <entry><muttng-doc:varref name="print-command"/></entry>
10567 <entry><literal>shorten_hierarchy</literal></entry>
10568 <entry><muttng-doc:varref name="sidebar-shorten-hierarchy"/></entry>
10571 <entry><literal>ask_followup_to</literal></entry>
10572 <entry><muttng-doc:varref name="nntp-ask-followup-to"/></entry>
10575 <entry><literal>ask_x_comment_to</literal></entry>
10576 <entry><muttng-doc:varref name="nntp-ask-x-comment-to"/></entry>
10579 <entry><literal>catchup_newsgroup</literal></entry>
10580 <entry><muttng-doc:varref name="nntp-catchup"/></entry>
10583 <entry><literal>followup_to_poster</literal></entry>
10584 <entry><muttng-doc:varref name="nntp-followup-to-poster"/></entry>
10587 <entry><literal>group_index_format</literal></entry>
10588 <entry><muttng-doc:varref name="nntp-group-index-format"/></entry>
10591 <entry><literal>inews</literal></entry>
10592 <entry><muttng-doc:varref name="nntp-inews"/></entry>
10595 <entry><literal>mime_subject</literal></entry>
10596 <entry><muttng-doc:varref name="nntp-mime-subject"/></entry>
10599 <entry><literal>news_cache_dir</literal></entry>
10600 <entry><muttng-doc:varref name="nntp-cache-dir"/></entry>
10603 <entry><literal>news_server</literal></entry>
10604 <entry><muttng-doc:varref name="nntp-host"/></entry>
10607 <entry><literal>newsrc</literal></entry>
10608 <entry><muttng-doc:varref name="nntp-newsrc"/></entry>
10611 <entry><literal>nntp_poll</literal></entry>
10612 <entry><muttng-doc:varref name="nntp-mail-check"/></entry>
10615 <entry><literal>pop_checkinterval</literal></entry>
10616 <entry><muttng-doc:varref name="pop-mail-check"/></entry>
10619 <entry><literal>post_moderated</literal></entry>
10620 <entry><muttng-doc:varref name="nntp-post-moderated"/></entry>
10623 <entry><literal>save_unsubscribed</literal></entry>
10624 <entry><muttng-doc:varref name="nntp-save-unsubscribed"/></entry>
10627 <entry><literal>show_new_news</literal></entry>
10628 <entry><muttng-doc:varref name="nntp-show-new-news"/></entry>
10631 <entry><literal>show_only_unread</literal></entry>
10632 <entry><muttng-doc:varref name="nntp-show-only-unread"/></entry>
10635 <entry><literal>x_comment_to</literal></entry>
10636 <entry><muttng-doc:varref name="nntp-x-comment-to"/></entry>
10639 <entry><literal>smtp_auth_username</literal></entry>
10640 <entry><muttng-doc:varref name="smtp-user"/></entry>
10643 <entry><literal>smtp_auth_password</literal></entry>
10644 <entry><muttng-doc:varref name="smtp-pass"/></entry>
10647 <entry><literal>envelope_from_address</literal></entry>
10648 <entry><muttng-doc:varref name="smtp-envelope"/></entry>
10651 <entry><literal>user_agent</literal></entry>
10652 <entry><muttng-doc:varref name="agent-string"/></entry>
10661 The <literal>contrib</literal> subdirectory contains a script named
10662 <literal>update-config.pl</literal> which eases migration.
10666 A complete list of current variables follows.