Rocco Rutte:
[apps/madmutt.git] / doc / manual.xml.head
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">
6
7 <bookinfo> <!--{{{-->
8   <title>The Mutt Next Generation E-Mail Client</title>
9   <author>
10     <firstname>Andreas</firstname><surname>Krennmair</surname>
11     <email>ak@synflood.at</email>
12   </author>
13   <author>
14     <firstname>Michael</firstname><surname>Elkins</surname>
15     <email>me@cs.hmc.edu</email>
16   </author>
17   <pubdate>version @VERSION@</pubdate>
18   <abstract>
19     <para>
20       Michael Elinks on mutt, circa 1995:
21       ``All mail clients suck. This one just sucks less.''
22     </para>
23     <para>
24       Sven Guckes on mutt, ca. 2003: ``But it still sucks!''
25     </para>
26   </abstract>
27 </bookinfo> <!--}}}-->
28
29 <chapter id="introduction"> <!--{{{-->
30   <title>Introduction</title>
31
32   <sect1 id="overview">
33     <title>Overview</title>
34     
35     <para>
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.
42     </para>
43     
44     <para>
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.
53     </para>
54     
55     <para>
56       
57     </para>
58     
59   </sect1>
60   
61   <sect1 id="homepage">
62     <title>Mutt-ng Home Page</title>
63     
64     <para>
65       <muttng-doc:web url="http://www.muttng.org/"/>
66     </para>
67     
68     <para>
69       
70     </para>
71     
72   </sect1>
73   
74   <sect1 id="mailinglists">
75     <title>Mailing Lists</title>
76     
77     <para>
78       
79       <itemizedlist>
80         <listitem>
81           
82           <para>
83             <email>mutt-ng-users@lists.berlios.de</email>: This is
84             where the mutt-ng user support happens.
85           </para>
86         </listitem>
87         <listitem>
88           
89           <para>
90             <email>mutt-ng-devel@lists.berlios.de</email>: The
91             development mailing list for mutt-ng
92           </para>
93         </listitem>
94         
95       </itemizedlist>
96       
97     </para>
98     
99     <para>
100       
101     </para>
102     
103   </sect1>
104   
105   <sect1 id="distrib-sites">
106     <title>Software Distribution Sites</title>
107     
108     <para>
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/"/>
111     </para>
112     
113     <para>
114       
115     </para>
116     
117   </sect1>
118   
119   <sect1 id="irc">
120     <title>IRC</title>
121     
122     <para>
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.  
127     </para>
128     
129   </sect1>
130   
131   <sect1 id="weblog">
132     <title>Weblog</title>
133     
134     <para>
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
140         weblog</ulink>.
141     </para>
142     
143   </sect1>
144   
145   <sect1 id="copyright">
146     <title>Copyright</title>
147     
148     <para>
149       Mutt is Copyright (C) 1996-2000 Michael R. Elkins
150       &lt;me@cs.hmc.edu&gt; and others
151     </para>
152     
153     <para>
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.
158     </para>
159     
160     <para>
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.
165     </para>
166     
167     <para>
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.
171     </para>
172     
173   </sect1>
174
175   <sect1 id="conventions">
176     <title>Manual Conventions</title>
177
178     <para>
179       This manual contains several (hopefully consistent) conventions to
180       specially layout different items in different fashions.
181     </para>
182
183     <para>
184       <itemizedlist>
185         <listitem>
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
193             variable.</para>
194         </listitem>
195         <listitem>
196           <para>Muttng-specific functions are enclosed in
197           <literal>&lt;&gt;</literal> and printed in a typewriter font,
198           too, as in <muttng-doc:funcref name="sync-mailbox"/>.</para>
199         </listitem>
200         <listitem>
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>
206         </listitem>
207         <listitem>
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>.
216           </para>
217         </listitem>
218       </itemizedlist>
219     </para>
220
221     <para>
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.
225     </para>
226
227   </sect1>
228
229 </chapter>
230 <!--}}}-->
231
232 <chapter id="getting-started"> <!--{{{-->
233   <title>Getting Started</title>
234   
235   <sect1 id="basic-concepts"> <!--{{{-->
236     <title>Basic Concepts</title>
237     
238     <sect2 id="concept-screens-and-menus"> <!--{{{-->
239       <title>Screens and Menus</title>
240       
241       <para>
242         mutt-ng offers different screens of which every has its special
243         purpose:
244       </para>
245       
246       <para>
247         
248         <itemizedlist>
249           <listitem>
250             
251             <para>
252               The <emphasis>index</emphasis> displays the contents of the
253               currently opened
254               mailbox.
255               
256             </para>
257           </listitem>
258           <listitem>
259             
260             <para>
261               The <emphasis>pager</emphasis> is responsible for displaying
262               messages, that
263               is, the header, the body and all attached parts.
264               
265             </para>
266           </listitem>
267           <listitem>
268             
269             <para>
270               The <emphasis>file browser</emphasis> offers operations on and
271               displays
272               information of all folders mutt-ng should watch for mail.
273               
274             </para>
275           </listitem>
276           <listitem>
277             
278             <para>
279               The <emphasis>sidebar</emphasis> offers a permanent view of
280               which mailboxes
281               contain how many total, new and/or flagged mails.
282               
283             </para>
284           </listitem>
285           <listitem>
286             
287             <para>
288               The <emphasis>help screen</emphasis> lists for all currently
289               available
290               commands how to invoke them as well as a short description.
291               
292             </para>
293           </listitem>
294           <listitem>
295             
296             <para>
297               The <emphasis>compose</emphasis> menu is a comfortable
298               interface take last
299               actions before sending mail: change subjects, attach files,
300               remove
301               attachements, etc.
302               
303             </para>
304           </listitem>
305           <listitem>
306             
307             <para>
308               The <emphasis>attachement</emphasis> menu gives a summary and
309               the tree
310               structure of the attachements of the current message.
311               
312             </para>
313           </listitem>
314           <listitem>
315             
316             <para>
317               The <emphasis>alias</emphasis> menu lists all or a fraction of
318               the aliases
319               a user has defined.
320               
321             </para>
322           </listitem>
323           <listitem>
324             
325             <para>
326               The <emphasis>key</emphasis> menu used in connection with
327               encryption lets
328               users choose the right key to encrypt with.
329               
330             </para>
331           </listitem>
332           
333         </itemizedlist>
334         
335       </para>
336       
337       <para>
338         When mutt-ng is started without any further options, it'll open
339         the users default mailbox and display the index.
340       </para>
341       
342       <para>
343         
344       </para>
345       
346     </sect2>
347       <!--}}}-->
348     
349     <sect2 id="concept-configuration"> <!--{{{-->
350       <title>Configuration</title>
351       
352       <para>
353         Mutt-ng does <emphasis>not</emphasis> feature an internal
354         configuration
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.)
358       </para>
359       
360       <para>
361         Mutt-ng is configured using configuration files which allow
362         users to add comments or manage them via version control systems
363         to ease maintenance.
364       </para>
365       
366       <para>
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.
372       </para>
373       
374       <para>
375         
376       </para>
377       
378     </sect2>
379       <!--}}}-->
380     
381     <sect2 id="concept-functions"> <!--{{{-->
382       <title>Functions</title>
383       
384       <para>
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.
392       </para>
393       
394       <para>
395         
396       </para>
397       
398     </sect2>
399       <!--}}}-->
400     
401     <sect2 id="concept-interaction"> <!--{{{-->
402       <title>Interaction</title>
403       
404       <para>
405         Mutt-ng has two basic concepts of user interaction:
406       </para>
407       
408       <para>
409         
410         <orderedlist>
411           <listitem>
412             
413             <para>
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
418               input.
419               
420             </para>
421           </listitem>
422           <listitem>
423             
424             <para>
425               The automatized interface for interaction are the so
426               called <emphasis>hooks</emphasis>. Hooks specify actions the
427               user wants to be
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.
432               
433             </para>
434           </listitem>
435           
436         </orderedlist>
437         
438       </para>
439       
440       <para>
441         
442       </para>
443       
444     </sect2>
445       <!--}}}-->
446     
447     <sect2 id="concept-modularization"> <!--{{{-->
448       <title>Modularization</title>
449       
450       <para>
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.
461       </para>
462       
463       <para>
464         
465       </para>
466       
467     </sect2>
468       <!--}}}-->
469     
470     <sect2 id="concept-patterns"> <!--{{{-->
471       <title>Patterns</title>
472       
473       <para>
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.
478       </para>
479       
480       <para>
481         
482       </para>
483       
484       <para>
485         
486       </para>
487       
488     </sect2>
489       <!--}}}-->
490     
491   </sect1>
492   
493   <!--}}}-->
494   
495   <sect1 id="screens-and-menus"> <!--{{{-->
496     <title>Screens and Menus</title>
497     
498     <sect2 id="intro-index">
499       <title>Index</title>
500       
501       <para>
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.
514       </para>
515       
516       <para>
517         
518       </para>
519       
520     </sect2>
521     
522     <sect2 id="intro-pager">
523       <title>Pager</title>
524       
525       <para>
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.
531       </para>
532       
533       <para>
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
538         pager.
539       </para>
540       
541       <para>
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.
546       </para>
547       
548       <para>
549         
550       </para>
551       
552     </sect2>
553     
554     <sect2 id="intro-browser">
555       <title>File Browser</title>
556       
557       <para>
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.
565       </para>
566       
567       <para>
568         
569       </para>
570       
571     </sect2>
572     
573     <sect2 id="intro-sidebar">
574       <title>Sidebar</title>
575       
576       <para>
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.
585       </para>
586       
587       <para>
588         
589       </para>
590       
591     </sect2>
592     
593     <sect2 id="intro-help">
594       <title>Help</title>
595       
596       <para>
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
602         command prompt).
603       </para>
604       
605       <para>
606         
607       </para>
608       
609     </sect2>
610     
611     <sect2 id="intro-compose">
612       <title>Compose Menu</title>
613       
614       <para>
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
621         with/for what keys.
622       </para>
623       
624       <para>
625         Also, it's used to attach messages, news articles or files to
626         a message, to re-edit any attachment including the message
627         itself.
628       </para>
629       
630       <para>
631         
632       </para>
633       
634     </sect2>
635     
636     <sect2 id="intro-alias">
637       <title>Alias Menu</title>
638       
639       <para>
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.
647       </para>
648       
649       <para>
650         
651       </para>
652       
653     </sect2>
654     
655     <sect2 id="intro-attach">
656       <title>Attachment Menu</title>
657       
658       <para>
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.
667       </para>
668       
669       <para>
670         
671       </para>
672       
673     </sect2>
674     
675     <sect2 id="intro-keysel">
676       <title>Key Menu</title>
677       
678       <para>
679         <literal>FIXME</literal>
680       </para>
681       
682       <para>
683         
684       </para>
685       
686       <para>
687         
688       </para>
689       
690     </sect2>
691     
692   </sect1>
693     <!--}}}-->
694   
695   <sect1 id="moving"> <!--{{{-->
696     <title>Moving Around in Menus</title>
697     
698     <para>
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.
701     </para>
702     
703     <para>
704
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">
708         <thead>
709           <row>
710             <entry>Key</entry>
711             <entry>Function</entry>
712             <entry>Description</entry>
713           </row>
714         </thead>
715         <tbody>
716           <row>
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>
720           </row>
721           <row>
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>
725           </row>
726           <row>
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>
730           </row>
731           <row>
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>
735           </row>
736           <row>
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>
740           </row>
741           <row>
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>
745           </row>
746           <row>
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>
750           </row>
751           <row>
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>
755           </row>
756         </tbody>
757       </tgroup>
758     </table>
759
760
761     </para>
762     
763     <para>
764       
765     </para>
766     
767   </sect1>
768     <!--}}}-->
769   
770   <sect1 id="editing"> <!--{{{-->
771     <title>Editing Input Fields</title>
772     
773     <para>
774       Mutt-ng has a builtin line editor which is used as the primary way to
775       input
776       textual data such as email addresses or filenames.  The keys used to
777       move
778       around while editing are very similar to those of Emacs.
779     </para>
780     
781     <para>
782
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">
786         <thead>
787           <row>
788             <entry>Key</entry>
789             <entry>Function</entry>
790             <entry>Description</entry>
791           </row>
792         </thead>
793         <tbody>
794           <row>
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>
798           </row>
799           <row>
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>
803           </row>
804           <row>
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>
808           </row>
809           <row>
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>
813           </row>
814           <row>
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>
818           </row>
819           <row>
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>
823           </row>
824           <row>
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>
828           </row>
829           <row>
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>
833           </row>
834           <row>
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>
838           </row>
839           <row>
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>
843           </row>
844           <row>
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>
848           </row>
849           <row>
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>
853           </row>
854           <row>
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>
858           </row>
859           <row>
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>
863           </row>
864           <row>
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>
868           </row>
869           <row>
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>
873           </row>
874           <row>
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>
878           </row>
879           <row>
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>
883           </row>
884           <row>
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>
888           </row>
889           <row>
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>
893           </row>
894           <row>
895             <entry><muttng-doc:key mod="C">G</muttng-doc:key></entry>
896             <entry></entry>
897             <entry>abort</entry>
898           </row>
899           <row>
900             <entry><muttng-doc:key>Return</muttng-doc:key></entry>
901             <entry></entry>
902             <entry>finish editing</entry>
903           </row>
904         </tbody>
905       </tgroup>
906     </table>
907
908     </para>
909     
910     <para>
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
915     </para>
916     
917     <para>
918       <literal>bind editor &lt;delete&gt; backspace</literal>
919     </para>
920     
921   </sect1>
922     <!--}}}-->
923   
924   <sect1 id="reading"> <!--{{{-->
925     <title>Reading Mail - The Index and Pager</title>
926     
927     <para>
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,
930       which is
931       called the ``index'' in Mutt-ng.  The second mode is the display of the
932       message contents.  This is called the ``pager.''
933     </para>
934     
935     <para>
936       The next few sections describe the functions provided in each of these
937       modes.
938     </para>
939     
940     <sect2 id="reading-index">
941       <title>The Message Index</title>
942       
943       <para>
944
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">
948         <thead>
949           <row>
950             <entry>Key</entry>
951             <entry>Function</entry>
952             <entry>Description</entry>
953           </row>
954         </thead>
955         <tbody>
956           <row>
957             <entry><muttng-doc:key>c</muttng-doc:key></entry>
958             <entry><literal></literal></entry>
959             <entry>change to a different mailbox</entry>
960           </row>
961           <row>
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>
965           </row>
966           <row>
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>
970           </row>
971           <row>
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>
975           </row>
976           <row>
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>
980           </row>
981           <row>
982             <entry><muttng-doc:key>D</muttng-doc:key></entry>
983             <entry><literal></literal></entry>
984             <entry>delete messages matching a pattern</entry>
985           </row>
986           <row>
987             <entry><muttng-doc:key>d</muttng-doc:key></entry>
988             <entry><literal></literal></entry>
989             <entry>delete the current message</entry>
990           </row>
991           <row>
992             <entry><muttng-doc:key>F</muttng-doc:key></entry>
993             <entry><literal></literal></entry>
994             <entry>mark as important</entry>
995           </row>
996           <row>
997             <entry><muttng-doc:key>l</muttng-doc:key></entry>
998             <entry><literal></literal></entry>
999             <entry>show messages matching a pattern</entry>
1000           </row>
1001           <row>
1002             <entry><muttng-doc:key>N</muttng-doc:key></entry>
1003             <entry><literal></literal></entry>
1004             <entry>mark message as new</entry>
1005           </row>
1006           <row>
1007             <entry><muttng-doc:key>o</muttng-doc:key></entry>
1008             <entry><literal></literal></entry>
1009             <entry>change the current sort method</entry>
1010           </row>
1011           <row>
1012             <entry><muttng-doc:key>O</muttng-doc:key></entry>
1013             <entry><literal></literal></entry>
1014             <entry>reverse sort the mailbox</entry>
1015           </row>
1016           <row>
1017             <entry><muttng-doc:key>q</muttng-doc:key></entry>
1018             <entry><literal></literal></entry>
1019             <entry>save changes and exit</entry>
1020           </row>
1021           <row>
1022             <entry><muttng-doc:key>s</muttng-doc:key></entry>
1023             <entry><literal></literal></entry>
1024             <entry>save-message</entry>
1025           </row>
1026           <row>
1027             <entry><muttng-doc:key>T</muttng-doc:key></entry>
1028             <entry><literal></literal></entry>
1029             <entry>tag messages matching a pattern</entry>
1030           </row>
1031           <row>
1032             <entry><muttng-doc:key>t</muttng-doc:key></entry>
1033             <entry><literal></literal></entry>
1034             <entry>toggle the tag on a message</entry>
1035           </row>
1036           <row>
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>
1040           </row>
1041           <row>
1042             <entry><muttng-doc:key>U</muttng-doc:key></entry>
1043             <entry><literal></literal></entry>
1044             <entry>undelete messages matching a pattern</entry>
1045           </row>
1046           <row>
1047             <entry><muttng-doc:key>u</muttng-doc:key></entry>
1048             <entry><literal></literal></entry>
1049             <entry>undelete-message</entry>
1050           </row>
1051           <row>
1052             <entry><muttng-doc:key>v</muttng-doc:key></entry>
1053             <entry><literal></literal></entry>
1054             <entry>view-attachments</entry>
1055           </row>
1056           <row>
1057             <entry><muttng-doc:key>x</muttng-doc:key></entry>
1058             <entry><literal></literal></entry>
1059             <entry>abort changes and exit</entry>
1060           </row>
1061           <row>
1062             <entry><muttng-doc:key>Return</muttng-doc:key></entry>
1063             <entry><literal></literal></entry>
1064             <entry>display-message</entry>
1065           </row>
1066           <row>
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>
1070           </row>
1071           <row>
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>
1075           </row>
1076           <row>
1077             <entry><muttng-doc:key>$</muttng-doc:key></entry>
1078             <entry><literal></literal></entry>
1079             <entry>save changes to mailbox</entry>
1080           </row>
1081           <row>
1082             <entry><muttng-doc:key>/</muttng-doc:key></entry>
1083             <entry><literal></literal></entry>
1084             <entry>search</entry>
1085           </row>
1086           <row>
1087             <entry><muttng-doc:key mod="E">/</muttng-doc:key></entry>
1088             <entry><literal></literal></entry>
1089             <entry>search-reverse</entry>
1090           </row>
1091           <row>
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>
1095           </row>
1096           <row>
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>
1100           </row>
1101         </tbody>
1102       </tgroup>
1103     </table>
1104
1105       </para>
1106       
1107       <sect3>
1108         <title>Status Flags</title> <!--{{{-->
1109         
1110         <para>
1111           In addition to who sent the message and the subject, a short
1112           summary of
1113           the disposition of each message is printed beside the message
1114           number.
1115           Zero or more of the following ``flags'' may appear, which mean:
1116         </para>
1117         
1118         <para>
1119
1120           <variablelist>
1121             
1122             <varlistentry>
1123               <term>D</term>
1124               <listitem>
1125                 <para>
1126                   message is deleted (is marked for deletion)
1127                 </para>
1128               </listitem>
1129             </varlistentry>
1130             <varlistentry>
1131               <term>d</term>
1132               <listitem>
1133                 <para>
1134                   message have attachments marked for deletion
1135                 </para>
1136               </listitem>
1137             </varlistentry>
1138             <varlistentry>
1139               <term>K</term>
1140               <listitem>
1141                 <para>
1142                   contains a PGP public key
1143                 </para>
1144               </listitem>
1145             </varlistentry>
1146             <varlistentry>
1147               <term>N</term>
1148               <listitem>
1149                 <para>
1150                   message is new
1151                 </para>
1152               </listitem>
1153             </varlistentry>
1154             <varlistentry>
1155               <term>O</term>
1156               <listitem>
1157                 <para>
1158                   message is old
1159                 </para>
1160               </listitem>
1161             </varlistentry>
1162             <varlistentry>
1163               <term>P</term>
1164               <listitem>
1165                 <para>
1166                   message is PGP encrypted
1167                 </para>
1168               </listitem>
1169             </varlistentry>
1170             <varlistentry>
1171               <term>r</term>
1172               <listitem>
1173                 <para>
1174                   message has been replied to
1175                 </para>
1176               </listitem>
1177             </varlistentry>
1178             <varlistentry>
1179               <term>A</term>
1180               <listitem>
1181                 <para>
1182                 message has one or more attachments.
1183                 </para>
1184               </listitem>
1185             </varlistentry>
1186
1187             <varlistentry>
1188               <term>S</term>
1189               <listitem>
1190                 <para>
1191                   message is signed, and the signature is succesfully
1192                   verified
1193                 </para>
1194               </listitem>
1195             </varlistentry>
1196             <varlistentry>
1197               <term>s</term>
1198               <listitem>
1199                 <para>
1200                   message is signed
1201                 </para>
1202               </listitem>
1203             </varlistentry>
1204             <varlistentry>
1205               <term>!</term>
1206               <listitem>
1207                 <para>
1208                   message is flagged
1209                 </para>
1210               </listitem>
1211             </varlistentry>
1212             <varlistentry>
1213               <term>*</term>
1214               <listitem>
1215                 <para>
1216                   message is tagged
1217                 </para>
1218               </listitem>
1219             </varlistentry>
1220           </variablelist>
1221         </para>
1222         
1223         <para>
1224           Some of the status flags can be turned on or off using
1225           
1226           <itemizedlist>
1227             <listitem>
1228               
1229               <para>
1230                 <emphasis role="bold">set-flag</emphasis> (default: w)
1231               </para>
1232             </listitem>
1233             <listitem>
1234               
1235               <para>
1236                 <emphasis role="bold">clear-flag</emphasis> (default: W)
1237               </para>
1238             </listitem>
1239             
1240           </itemizedlist>
1241           
1242         </para>
1243         
1244         <para>
1245           Furthermore, the following flags reflect who the message is
1246           addressed
1247           to.  They can be customized with the
1248           <muttng-doc:varref name="to-chars"/> variable.
1249         </para>
1250         
1251         <para>
1252           <variablelist>
1253             
1254             <varlistentry>
1255               <term>+</term>
1256               <listitem>
1257                 <para>
1258                   message is to you and you only
1259                 </para>
1260               </listitem>
1261             </varlistentry>
1262             <varlistentry>
1263               <term>T</term>
1264               <listitem>
1265                 <para>
1266                   message is to you, but also to or cc'ed to others
1267                 </para>
1268               </listitem>
1269             </varlistentry>
1270             <varlistentry>
1271               <term>C</term>
1272               <listitem>
1273                 <para>
1274                   message is cc'ed to you
1275                 </para>
1276               </listitem>
1277             </varlistentry>
1278             <varlistentry>
1279               <term>F</term>
1280               <listitem>
1281                 <para>
1282                   message is from you
1283                 </para>
1284               </listitem>
1285             </varlistentry>
1286             <varlistentry>
1287               <term>L</term>
1288               <listitem>
1289                 <para>
1290                   message is sent to a subscribed mailing list
1291                 </para>
1292               </listitem>
1293             </varlistentry>
1294           </variablelist>
1295         </para>
1296         
1297       </sect3>
1298       
1299     </sect2>
1300     
1301     <sect2 id="reading-pager">
1302       <title>The Pager</title>
1303       
1304       <para>
1305         By default, Mutt-ng uses its builtin pager to display the body of
1306         messages.
1307         The pager is very similar to the Unix program <emphasis>less</emphasis> though not nearly as
1308         featureful.
1309       </para>
1310       
1311       <para>
1312
1313       <table frame="none" rowsep="1" texstr="l|l|l">
1314         <title>Most commonly used Pager Bindings</title>
1315         <tgroup cols="3" align="left" colsep="1" rowsep="1">
1316         <thead>
1317           <row>
1318             <entry>Key</entry>
1319             <entry>Function</entry>
1320             <entry>Description</entry>
1321           </row>
1322         </thead>
1323         <tbody>
1324           <row>
1325             <entry><muttng-doc:key>Return</muttng-doc:key></entry>
1326             <entry><literal></literal></entry>
1327             <entry>go down one line</entry>
1328           </row>
1329           <row>
1330             <entry><muttng-doc:key>Space</muttng-doc:key></entry>
1331             <entry><literal></literal></entry>
1332             <entry>display the next page (or next message if at the end of a message)</entry>
1333           </row>
1334           <row>
1335             <entry><muttng-doc:key>-</muttng-doc:key></entry>
1336             <entry><literal></literal></entry>
1337             <entry>go back to the previous page</entry>
1338           </row>
1339           <row>
1340             <entry><muttng-doc:key>n</muttng-doc:key></entry>
1341             <entry><literal></literal></entry>
1342             <entry>search for next match</entry>
1343           </row>
1344           <row>
1345             <entry><muttng-doc:key>S</muttng-doc:key></entry>
1346             <entry><literal></literal></entry>
1347             <entry>skip beyond quoted text</entry>
1348           </row>
1349           <row>
1350             <entry><muttng-doc:key>T</muttng-doc:key></entry>
1351             <entry><literal></literal></entry>
1352             <entry>toggle display of quoted text</entry>
1353           </row>
1354           <row>
1355             <entry><muttng-doc:key>?</muttng-doc:key></entry>
1356             <entry><literal></literal></entry>
1357             <entry>show key bindings</entry>
1358           </row>
1359           <row>
1360             <entry><muttng-doc:key>/</muttng-doc:key></entry>
1361             <entry><literal></literal></entry>
1362             <entry>search for a regular expression (pattern)</entry>
1363           </row>
1364           <row>
1365             <entry><muttng-doc:key mod="E">/</muttng-doc:key></entry>
1366             <entry><literal></literal></entry>
1367             <entry>search backwards for a regular expression</entry>
1368           </row>
1369           <row>
1370             <entry><muttng-doc:key>\</muttng-doc:key></entry>
1371             <entry><literal></literal></entry>
1372             <entry>toggle search pattern coloring</entry>
1373           </row>
1374           <row>
1375             <entry><muttng-doc:key>^</muttng-doc:key></entry>
1376             <entry><literal></literal></entry>
1377             <entry>jump to the top of the message</entry>
1378           </row>
1379         </tbody>
1380       </tgroup>
1381     </table>
1382
1383
1384       </para>
1385       
1386       <para>
1387         In addition, many of the functions from the <emphasis>index</emphasis> are available in
1388         the pager, such as <emphasis>delete-message</emphasis> or <emphasis>
1389           copy-message
1390         </emphasis>
1391         (this is one
1392         advantage over using an external pager to view messages).
1393       </para>
1394       
1395       <para>
1396         Also, the internal pager supports a couple other advanced
1397         features.  For one, it will accept and translate the
1398         ``standard'' nroff sequences forbold and underline. These
1399         sequences are a series of either the letter, backspace
1400         (<muttng-doc:key mod="C">H</muttng-doc:key>), the letter again for bold
1401         or the letter, backspace, <muttng-doc:key>_</muttng-doc:key> for denoting
1402         underline. Mutt-ng will attempt to display these in bold and
1403         underline respectively if your terminal supports them. If not,
1404         you can use the bold and underline <muttng-doc:cmdref
1405           name="color"/> objects to specify a color or mono attribute
1406         for them.
1407       </para>
1408       
1409       <para>
1410         Additionally, the internal pager supports the ANSI escape
1411         sequences for character attributes.  Mutt-ng translates them
1412         into the correct color and character settings.  The sequences
1413         Mutt-ng supports are: <literal>ESC [ Ps;Ps;Ps;...;Ps
1414           m</literal> (see table below for possible values for
1415         <literal>Ps</literal>).
1416       </para>
1417       
1418       <para>
1419
1420       <table frame="none" rowsep="1" texstr="l|l">
1421         <title>ANSI Escape Sequences</title>
1422         <tgroup cols="2" align="left" colsep="1" rowsep="1">
1423         <thead>
1424           <row>
1425             <entry>Value</entry>
1426             <entry>Attribute</entry>
1427           </row>
1428         </thead>
1429         <tbody>
1430           <row>
1431             <entry><literal>0</literal></entry>
1432             <entry>All Attributes Off</entry>
1433           </row>
1434           <row>
1435             <entry><literal>1</literal></entry>
1436             <entry>Bold on</entry>
1437           </row>
1438           <row>
1439             <entry><literal>4</literal></entry>
1440             <entry>Underline on</entry>
1441           </row>
1442           <row>
1443             <entry><literal>5</literal></entry>
1444             <entry>Blink on</entry>
1445           </row>
1446           <row>
1447             <entry><literal>7</literal></entry>
1448             <entry>Reverse video on</entry>
1449           </row>
1450           <row>
1451             <entry><literal>3x</literal></entry>
1452             <entry>Foreground color is x (see table below)</entry>
1453           </row>
1454           <row>
1455             <entry><literal>4x</literal></entry>
1456             <entry>Background color is x (see table below)</entry>
1457           </row>
1458         </tbody>
1459       </tgroup>
1460     </table>
1461
1462     
1463       <table frame="none" rowsep="1" texstr="l|l">
1464         <title>ANSI Colors</title>
1465         <tgroup cols="2" align="left" colsep="1" rowsep="1">
1466         <thead>
1467           <row>
1468             <entry>Number</entry>
1469             <entry>Color</entry>
1470           </row>
1471         </thead>
1472         <tbody>
1473           <row>
1474             <entry><literal>0</literal></entry>
1475             <entry>black</entry>
1476           </row>
1477           <row>
1478             <entry><literal>1</literal></entry>
1479             <entry>red</entry>
1480           </row>
1481           <row>
1482             <entry><literal>2</literal></entry>
1483             <entry>green</entry>
1484           </row>
1485           <row>
1486             <entry><literal>3</literal></entry>
1487             <entry>yellow</entry>
1488           </row>
1489           <row>
1490             <entry><literal>4</literal></entry>
1491             <entry>blue</entry>
1492           </row>
1493           <row>
1494             <entry><literal>5</literal></entry>
1495             <entry>magenta</entry>
1496           </row>
1497           <row>
1498             <entry><literal>6</literal></entry>
1499             <entry>cyan</entry>
1500           </row>
1501           <row>
1502             <entry><literal>7</literal></entry>
1503             <entry>white</entry>
1504           </row>
1505         </tbody>
1506       </tgroup>
1507     </table>
1508
1509
1510         </para>
1511         
1512         <para>
1513           Mutt-ng uses these attributes for handling text/enriched messages,
1514           and they
1515           can also be used by an external <muttng-doc:cmdref name="auto_view"/>
1516           script for highlighting purposes.  <emphasis role="bold">Note:</emphasis> If you change the colors for your
1517           display, for example by changing the color associated with color2 for
1518           your xterm, then that color will be used instead of green.
1519         </para>
1520         
1521       </sect2>
1522       
1523       <sect2 id="threads">
1524         <title>Threaded Mode</title>
1525         
1526         <para>
1527           When the mailbox is <link linkend="sort">sorted</link> by <emphasis>
1528             threads
1529           </emphasis>
1530           ,there are
1531           a few additional functions available in the <emphasis>index</emphasis> and <emphasis>
1532             pager
1533           </emphasis>
1534           modes.
1535         </para>
1536         
1537         <para>
1538
1539         <table frame="none" rowsep="1" texstr="l|l|l">
1540           <title>Most commonly used thread-related bindings</title>
1541           <tgroup cols="3" align="left" colsep="1" rowsep="1">
1542           <thead>
1543             <row>
1544               <entry>Key</entry>
1545               <entry>Function</entry>
1546               <entry>Description</entry>
1547             </row>
1548           </thead>
1549           <tbody>
1550             <row>
1551               <entry><muttng-doc:key mod="C">D</muttng-doc:key></entry>
1552               <entry><muttng-doc:funcref name="delete-thread"/></entry>
1553                 <entry>delete all messages in the current  thread</entry>
1554               </row>
1555             <row>
1556               <entry><muttng-doc:key mod="C">U</muttng-doc:key></entry>
1557               <entry><muttng-doc:funcref name="undelete-thread"/></entry>
1558                 <entry>undelete all messages in the current thread</entry>
1559               </row>
1560             <row>
1561               <entry><muttng-doc:key mod="C">N</muttng-doc:key></entry>
1562               <entry><muttng-doc:funcref name="next-thread"/></entry>
1563                 <entry>jump to the start of the next thread</entry>
1564               </row>
1565             <row>
1566               <entry><muttng-doc:key mod="C">P</muttng-doc:key></entry>
1567               <entry><muttng-doc:funcref name="previous-thread"/></entry>
1568                 <entry>jump to the start of the previous thread</entry>
1569               </row>
1570             <row>
1571               <entry><muttng-doc:key mod="C">R</muttng-doc:key></entry>
1572               <entry><muttng-doc:funcref name="read-thread"/></entry>
1573                 <entry>mark the current thread as read</entry>
1574               </row>
1575             <row>
1576               <entry><muttng-doc:key mod="E">d</muttng-doc:key></entry>
1577               <entry><muttng-doc:funcref name="delete-subthread"/></entry>
1578                 <entry>delete all messages in the current subthread</entry>
1579               </row>
1580             <row>
1581               <entry><muttng-doc:key mod="E">u</muttng-doc:key></entry>
1582               <entry><muttng-doc:funcref name="undelete-subthread"/></entry>
1583                 <entry>undelete all messages in the current subthread</entry>
1584               </row>
1585             <row>
1586               <entry><muttng-doc:key mod="E">n</muttng-doc:key></entry>
1587               <entry><muttng-doc:funcref name="next-subthread"/></entry>
1588                 <entry>jump to the start of the next subthread</entry>
1589               </row>
1590             <row>
1591               <entry><muttng-doc:key mod="E">p</muttng-doc:key></entry>
1592               <entry><muttng-doc:funcref name="previous-subthread"/></entry>
1593                 <entry>jump to the start of the previous subthread</entry>
1594               </row>
1595             <row>
1596               <entry><muttng-doc:key mod="E">r</muttng-doc:key></entry>
1597               <entry><muttng-doc:funcref name="read-subthread"/></entry>
1598                 <entry>mark the current subthread as read </entry>
1599               </row>
1600             <row>
1601               <entry><muttng-doc:key mod="E">t</muttng-doc:key></entry>
1602               <entry><muttng-doc:funcref name="tag-thread"/></entry>
1603                 <entry>toggle the tag on the current thread</entry>
1604               </row>
1605             <row>
1606               <entry><muttng-doc:key mod="E">v</muttng-doc:key></entry>
1607               <entry><muttng-doc:funcref name="collapse-thread"/></entry>
1608                 <entry>toggle collapse for the current thread</entry>
1609               </row>
1610             <row>
1611               <entry><muttng-doc:key mod="E">V</muttng-doc:key></entry>
1612               <entry><muttng-doc:funcref name="collapse-all"/></entry>
1613                 <entry>toggle collapse for all threads</entry>
1614               </row>
1615             <row>
1616               <entry><muttng-doc:key>P</muttng-doc:key></entry>
1617               <entry><muttng-doc:funcref name="parent-message"/></entry>
1618                 <entry>jump to parent message in thread</entry>
1619               </row>
1620           </tbody>
1621         </tgroup>
1622       </table>
1623
1624           
1625         </para>
1626         
1627         <para>
1628           <emphasis role="bold">Note:</emphasis> Collapsing a thread displays
1629           only the first message
1630           in the thread and hides the others. This is useful when threads
1631           contain so many messages that you can only see a handful of threads
1632           onthe screen. See <literal>%M</literal> in
1633           <muttng-doc:varref name="index-format"/>.
1634         </para>
1635
1636         <para>
1637           For example, you could use
1638           <literal>%?M?(#%03M)&amp;(%4l)?</literal> in <muttng-doc:varref name="index-format"/>
1639           to optionally
1640           display the number of hidden messages if the thread is collapsed.
1641         </para>
1642         
1643         <para>
1644           See also the <muttng-doc:varref name="strict-threads"/> variable.
1645         </para>
1646         
1647       </sect2>
1648       
1649       <sect2 id="pager-functions">
1650         <title>Miscellaneous Functions</title>
1651         
1652         <para>
1653           <muttng-doc:funcdef name="create-alias"><muttng-doc:key>a</muttng-doc:key></muttng-doc:funcdef>
1654         </para>
1655         
1656         <para>
1657           Creates a new alias based upon the current message (or prompts for a
1658           new one).  Once editing is complete, an <muttng-doc:cmdref name="alias"/>
1659           command is added to the file specified by the <muttng-doc:varref name="alias-file"/>
1660           variable for future use. <emphasis role="bold">Note:</emphasis>
1661           Specifying an <muttng-doc:varref name="alias-file"/>
1662           does not add the aliases specified there-in, you must also <muttng-doc:cmdref name="source"/>
1663           the file.
1664         </para>
1665         
1666         <para>
1667           <muttng-doc:funcdef name="check-traditional-pgp"><muttng-doc:key mod="E">P</muttng-doc:key></muttng-doc:funcdef>
1668         </para>
1669         
1670         <para>
1671           This function will search the current message for content signed or
1672           encrypted with PGP the "traditional" way, that is, without proper
1673           MIME tagging.  Technically, this function will temporarily change
1674           the MIME content types of the body parts containing PGP data; this
1675           is similar to the <muttng-doc:funcref name="edit-type"/>
1676           function's
1677           effect.
1678         </para>
1679         
1680         <para>
1681           <muttng-doc:funcdef name="display-toggle-weed"><muttng-doc:key>h</muttng-doc:key></muttng-doc:funcdef>
1682         </para>
1683         
1684         <para>
1685           Toggles the weeding of message header fields specified by <muttng-doc:cmdref name="ignore"/>
1686           commands.
1687         </para>
1688         
1689         <para>
1690           <muttng-doc:funcdef name="edit"><muttng-doc:key>e</muttng-doc:key></muttng-doc:funcdef>
1691         </para>
1692         
1693         <para>
1694           This command (available in the ``index'' and ``pager'') allows you to
1695           edit the raw current message as it's present in the mail folder.
1696           After you have finished editing, the changed message will be
1697           appended to the current folder, and the original message will be
1698           marked for deletion.
1699         </para>
1700         
1701         <para>
1702           <muttng-doc:funcdef name="edit-type"/>
1703           (default: <muttng-doc:key mod="C">E</muttng-doc:key> on the attachment menu, and in the pager and index
1704           menus; <muttng-doc:key mod="C">T</muttng-doc:key> on the compose menu)
1705         </para>
1706         
1707         <para>
1708           This command is used to temporarily edit an attachment's content
1709           type to fix, for instance, bogus character set parameters.  When
1710           invoked from the index or from the pager, you'll have the
1711           opportunity to edit the top-level attachment's content type.  On the
1712           <link linkend="attach-menu">attach-menu</link>, you can change any
1713           attachment's content type. These changes are not persistent, and get
1714           lost upon changing folders.
1715         </para>
1716         
1717         <para>
1718           Note that this command is also available on the <link linkend="compose-menu">compose-menu</link>
1719           .There, it's used to
1720           fine-tune the properties of attachments you are going to send.
1721         </para>
1722         
1723         <para>
1724           <muttng-doc:funcdef name="enter-command"><muttng-doc:key>:</muttng-doc:key></muttng-doc:funcdef>
1725         </para>
1726         
1727         <para>
1728           This command is used to execute any command you would normally put in
1729           a
1730           configuration file.  A common use is to check the settings of
1731           variables, or
1732           in conjunction with <muttng-doc:cmdref name="macro"/> to change
1733           settings on the
1734           fly.
1735         </para>
1736         
1737         <para>
1738           <muttng-doc:funcdef name="extract-keys"><muttng-doc:key mod="C">K</muttng-doc:key></muttng-doc:funcdef>
1739         </para>
1740         
1741         <para>
1742           This command extracts PGP public keys from the current or tagged
1743           message(s) and adds them to your PGP public key ring.
1744         </para>
1745         
1746         <para>
1747           <muttng-doc:funcdef name="forget-passphrase"><muttng-doc:key mod="C">F</muttng-doc:key></muttng-doc:funcdef>
1748         </para>
1749         
1750         <para>
1751           This command wipes the passphrase(s) from memory. It is useful, if
1752           you misspelled the passphrase.
1753         </para>
1754         
1755         <para>
1756           <muttng-doc:funcdef name="list-reply"><muttng-doc:key>L</muttng-doc:key></muttng-doc:funcdef>
1757         </para>
1758         
1759         <para>
1760           Reply to the current or tagged message(s) by extracting any addresses
1761           which
1762           match the regular expressions given by the <muttng-doc:cmdref name="lists"/>
1763           commands, but also honor any <literal>Mail-Followup-To</literal>
1764           header(s) if the
1765           <muttng-doc:varref name="honor-followup-to"/>
1766           configuration variable is set.  Using this when replying to messages
1767           posted
1768           to mailing lists helps avoid duplicate copies being sent to the
1769           author of
1770           the message you are replying to.
1771         </para>
1772         
1773         <para>
1774           <muttng-doc:funcdef name="pipe-message" default="|"/>
1775         </para>
1776         
1777         <para>
1778           Asks for an external Unix command and pipes the current or
1779           tagged message(s) to it. The variables
1780           <muttng-doc:varref name="pipe-decode"/>,
1781           <muttng-doc:varref name="pipe-split"/>,
1782           <muttng-doc:varref name="pipe-decode"/> and
1783           <muttng-doc:varref name="wait-key"/> 
1784           control the exact behavior of this function.
1785         </para>
1786         
1787         <para>
1788           <muttng-doc:funcdef name="resend-message"><muttng-doc:key mod="E">e</muttng-doc:key></muttng-doc:funcdef>
1789         </para>
1790         
1791         <para>
1792           With resend-message, mutt takes the current message as a template for
1793           a
1794           new message.  This function is best described as "recall from
1795           arbitrary
1796           folders".  It can conveniently be used to forward MIME messages while
1797           preserving the original mail structure. Note that the amount of
1798           headers
1799           included here depends on the value of the <muttng-doc:varref name="weed"/>
1800           variable.
1801         </para>
1802         
1803         <para>
1804           This function is also available from the attachment menu. You can use
1805           this
1806           to easily resend a message which was included with a bounce message
1807           as a message/rfc822 body part.
1808         </para>
1809         
1810         <para>
1811           <muttng-doc:funcdef name="shell-escape"><muttng-doc:key>!</muttng-doc:key></muttng-doc:funcdef>
1812         </para>
1813         
1814         <para>
1815           Asks for an external Unix command and executes it.  The
1816           <muttng-doc:varref name="wait-key"/>
1817           can be used to control
1818           whether Mutt-ng will wait for a key to be pressed when the command
1819           returns
1820           (presumably to let the user read the output of the command), based on
1821           the return status of the named command.
1822         </para>
1823         
1824         <para>
1825           <muttng-doc:funcdef name="toggle-quoted"><muttng-doc:key>T</muttng-doc:key></muttng-doc:funcdef>
1826         </para>
1827         
1828         <para>
1829           The <emphasis>pager</emphasis> uses the
1830           <muttng-doc:varref name="quote-regexp"/>
1831           variable to detect quoted text when
1832           displaying the body of the message.  This function toggles the
1833           displayof the quoted material in the message.  It is particularly
1834           useful when
1835           are interested in just the response and there is a large amount of
1836           quoted text in the way.
1837         </para>
1838         
1839         <para>
1840           <muttng-doc:funcdef name="skip-quoted"><muttng-doc:key>S</muttng-doc:key></muttng-doc:funcdef>
1841         </para>
1842         
1843         <para>
1844           This function will go to the next line of non-quoted text which come
1845           after a line of quoted text in the internal pager.
1846         </para>
1847         
1848         <para>
1849           
1850         </para>
1851         
1852       </sect2>
1853       
1854     </sect1>
1855     <!--}}}-->
1856     
1857     <sect1 id="sending"> <!--{{{-->
1858       <title>Sending Mail</title>
1859       
1860       <para>
1861         The following bindings are available in the <emphasis>index</emphasis>
1862         for sending
1863         messages.
1864       </para>
1865       
1866       <para>
1867
1868         <table frame="none" rowsep="1" texstr="l|l|l">
1869           <title>Most commonly used Mail Composition Bindings</title>
1870           <tgroup cols="3" align="left" colsep="1" rowsep="1">
1871           <thead>
1872             <row>
1873               <entry>Key</entry>
1874               <entry>Function</entry>
1875               <entry>Description</entry>
1876             </row>
1877           </thead>
1878           <tbody>
1879             <row>
1880               <entry><muttng-doc:key>m</muttng-doc:key></entry>
1881               <entry><muttng-doc:funcref name="compose"/></entry>
1882               <entry>compose a new message</entry>
1883             </row>
1884             <row>
1885               <entry><muttng-doc:key>r</muttng-doc:key></entry>
1886               <entry><muttng-doc:funcref name="reply"/></entry>
1887               <entry>reply to sender</entry>
1888             </row>
1889             <row>
1890               <entry><muttng-doc:key>g</muttng-doc:key></entry>
1891               <entry><muttng-doc:funcref name="group-reply"/></entry>
1892               <entry>reply to all recipients</entry>
1893             </row>
1894             <row>
1895               <entry><muttng-doc:key>L</muttng-doc:key></entry>
1896               <entry><muttng-doc:funcref name="list-reply"/></entry>
1897               <entry>reply to mailing list address</entry>
1898             </row>
1899             <row>
1900               <entry><muttng-doc:key>f</muttng-doc:key></entry>
1901               <entry><muttng-doc:funcref name="forward"/></entry>
1902               <entry>forward message</entry>
1903             </row>
1904             <row>
1905               <entry><muttng-doc:key>b</muttng-doc:key></entry>
1906               <entry><muttng-doc:funcref name="bounce"/></entry>
1907               <entry>bounce (remail) message</entry>
1908             </row>
1909             <row>
1910               <entry><muttng-doc:key mod="E">k</muttng-doc:key></entry>
1911               <entry><muttng-doc:funcref name="mail-key"/></entry>
1912               <entry>mail a PGP public key to someone</entry>
1913             </row>
1914           </tbody>
1915         </tgroup>
1916       </table>
1917
1918       </para>
1919       
1920       <para>
1921         Bouncing a message sends the message as is to the recipient you
1922         specify.  Forwarding a message allows you to add comments or
1923         modify the message you are forwarding.  These items are discussed
1924         in greater detail in the next chapter <link linkend="forwarding-mail">forwarding-mail</link>.
1925       </para>
1926       
1927       <sect2 id="sending-compose">
1928         <title>Composing new messages</title>
1929         
1930         <para>
1931           When you want to send an email using mutt-ng, simply press <muttng-doc:key>m</muttng-doc:key> on
1932           your keyboard. Then, mutt-ng asks for the recipient via a prompt in
1933           the last line:
1934         </para>
1935         
1936         <para>
1937           
1938           <muttng-doc:lstmail>
1939 To:</muttng-doc:lstmail>
1940           
1941         </para>
1942         
1943         <para>
1944           After you've finished entering the recipient(s), press return. If you
1945           want to send an email to more than one recipient, separate the email
1946           addresses using the comma "<literal>,</literal>". Mutt-ng then asks
1947           you for the email
1948           subject. Again, press return after you've entered it. After that,
1949           mutt-ng
1950           got the most important information from you, and starts up an editor
1951           where you can then enter your email.
1952         </para>
1953         
1954         <para>
1955           The editor that is called is selected in the following way: you
1956           can e.g. set it in the mutt-ng configuration:
1957         </para>
1958         
1959         <para>
1960           
1961           <muttng-doc:lstconf>
1962 set editor = "vim +/^$/ -c ':set tw=72'"
1963 set editor = "nano"
1964 set editor = "emacs"</muttng-doc:lstconf>
1965           
1966         </para>
1967         
1968         <para>
1969           If you don't set your preferred editor in your configuration, mutt-ng
1970           first looks whether the environment variable <muttng-doc:envvar name="VISUAL"/> is set, and if
1971           so, it takes its value as editor command. Otherwise, it has a look
1972           at <muttng-doc:envvar name="EDITOR"/> and takes its value if it is set. If no
1973           editor command
1974           can be found, mutt-ng simply assumes <muttng-doc:man name="vi"/> to be the
1975           default editor,
1976           since it's the most widespread editor in the Unix world and it's
1977           pretty
1978           safe to assume that it is installed and available.
1979         </para>
1980         
1981         <para>
1982           When you've finished entering your message, save it and quit your 
1983           editor. Mutt-ng will then present you with a summary screen, the
1984           compose menu. 
1985           On the top, you see a summary of the most important available key
1986           commands.
1987           Below that, you see the sender, the recipient(s), Cc and/or Bcc 
1988           recipient(s), the subject, the reply-to address, and optionally
1989           information where the sent email will be stored and whether it should
1990           be digitally signed and/or encrypted.
1991         </para>
1992         
1993         <para>
1994           Below that, you see a list of "attachments". The mail you've just
1995           entered before is also an attachment, but due to its special type
1996           (it's plain text), it will be displayed as the normal message on
1997           the receiver's side.
1998         </para>
1999         
2000         <para>
2001           At this point, you can add more attachments, pressing <muttng-doc:key>a</muttng-doc:key>, you
2002           can edit the recipient addresses, pressing <muttng-doc:key>t</muttng-doc:key> for
2003           the "To:" field,
2004           <muttng-doc:key>c</muttng-doc:key> for the "Cc:" field, and <muttng-doc:key>b</muttng-doc:key>
2005           for the "Bcc: field. You can
2006           also edit the subject the subject by simply pressing <muttng-doc:key>s</muttng-doc:key> or the
2007           email message that you've entered before by pressing <muttng-doc:key>e</muttng-doc:key>. You will
2008           then again return to the editor. You can even edit the sender, by
2009           pressing
2010           <literal>&lt;esc&gt;f</literal>, but this shall only be used with
2011           caution.
2012         </para>
2013         
2014         <para>
2015           Alternatively, you can configure mutt-ng in a way that most of the
2016           above settings can be edited using the editor. Therefore, you only
2017           need to add the following to your configuration:
2018         </para>
2019         
2020         <para>
2021           
2022           <muttng-doc:lstconf>
2023 set edit_headers</muttng-doc:lstconf>
2024           
2025         </para>
2026         
2027         <para>
2028           Once you have finished editing the body of your mail message, you are
2029           returned to the <emphasis>compose</emphasis> menu.  The following
2030           options are available:
2031         </para>
2032         
2033         <para>
2034
2035         <table frame="none" rowsep="1" texstr="l|l|l">
2036           <title>Most commonly used Compose Menu Bindings</title>
2037           <tgroup cols="3" align="left" colsep="1" rowsep="1">
2038           <thead>
2039             <row>
2040               <entry>Key</entry>
2041               <entry>Function</entry>
2042               <entry>Description</entry>
2043             </row>
2044           </thead>
2045           <tbody>
2046             <row>
2047               <entry><muttng-doc:key>a</muttng-doc:key></entry>
2048               <entry><muttng-doc:funcref name="attach-file"/></entry>
2049               <entry>attach a file</entry>
2050             </row>
2051             <row>
2052               <entry><muttng-doc:key>A</muttng-doc:key></entry>
2053               <entry><muttng-doc:funcref name="attach-message"/></entry>
2054               <entry>attach message(s) to the message</entry>
2055             </row>
2056             <row>
2057               <entry><muttng-doc:key mod="E">k</muttng-doc:key></entry>
2058               <entry><muttng-doc:funcref name="attach-key"/></entry>
2059               <entry>attach a PGP public key</entry>
2060             </row>
2061             <row>
2062               <entry><muttng-doc:key>d</muttng-doc:key></entry>
2063               <entry><muttng-doc:funcref name="edit-description"/></entry>
2064               <entry>edit description on attachment</entry>
2065             </row>
2066             <row>
2067               <entry><muttng-doc:key>D</muttng-doc:key></entry>
2068               <entry><muttng-doc:funcref name="detach-file"/></entry>
2069               <entry>detach a file</entry>
2070             </row>
2071             <row>
2072               <entry><muttng-doc:key>t</muttng-doc:key></entry>
2073               <entry><muttng-doc:funcref name="edit-to"/></entry>
2074               <entry>edit the To field</entry>
2075             </row>
2076             <row>
2077               <entry><muttng-doc:key mod="E">f</muttng-doc:key></entry>
2078               <entry><muttng-doc:funcref name="edit-from"/></entry>
2079               <entry>edit the From field</entry>
2080             </row>
2081             <row>
2082               <entry><muttng-doc:key>r</muttng-doc:key></entry>
2083               <entry><muttng-doc:funcref name="edit-reply-to"/></entry>
2084               <entry>edit the Reply-To field</entry>
2085             </row>
2086             <row>
2087               <entry><muttng-doc:key>c</muttng-doc:key></entry>
2088               <entry><muttng-doc:funcref name="edit-cc"/></entry>
2089               <entry>edit the Cc field</entry>
2090             </row>
2091             <row>
2092               <entry><muttng-doc:key>b</muttng-doc:key></entry>
2093               <entry><muttng-doc:funcref name="edit-bcc"/></entry>
2094               <entry>edit the Bcc field</entry>
2095             </row>
2096             <row>
2097               <entry><muttng-doc:key>y</muttng-doc:key></entry>
2098               <entry><muttng-doc:funcref name="send-message"/></entry>
2099               <entry>send the message</entry>
2100             </row>
2101             <row>
2102               <entry><muttng-doc:key>s</muttng-doc:key></entry>
2103               <entry><muttng-doc:funcref name="edit-subject"/></entry>
2104               <entry>edit the Subject</entry>
2105             </row>
2106             <row>
2107               <entry><muttng-doc:key>S</muttng-doc:key></entry>
2108               <entry><muttng-doc:funcref name="smime-menu"/></entry>
2109               <entry>select S/MIME options</entry>
2110             </row>
2111             <row>
2112               <entry><muttng-doc:key>f</muttng-doc:key></entry>
2113               <entry><muttng-doc:funcref name="edit-fcc"/></entry>
2114               <entry>specify an ``Fcc'' mailbox</entry>
2115             </row>
2116             <row>
2117               <entry><muttng-doc:key>p</muttng-doc:key></entry>
2118               <entry><muttng-doc:funcref name="pgp-menu"/></entry>
2119               <entry>select PGP options</entry>
2120             </row>
2121             <row>
2122               <entry><muttng-doc:key>P</muttng-doc:key></entry>
2123               <entry><muttng-doc:funcref name="postpone-message"/></entry>
2124               <entry>postpone this message until later</entry>
2125             </row>
2126             <row>
2127               <entry><muttng-doc:key>q</muttng-doc:key></entry>
2128               <entry><muttng-doc:funcref name="quit"/></entry>
2129               <entry>quit (abort) sending the message</entry>
2130             </row>
2131             <row>
2132               <entry><muttng-doc:key>w</muttng-doc:key></entry>
2133               <entry><muttng-doc:funcref name="write-fcc"/></entry>
2134               <entry>write the message to a folder</entry>
2135             </row>
2136             <row>
2137               <entry><muttng-doc:key>i</muttng-doc:key></entry>
2138               <entry><muttng-doc:funcref name="ispell"/></entry>
2139               <entry>check spelling (if available on your system)</entry>
2140             </row>
2141             <row>
2142               <entry><muttng-doc:key mod="C">F</muttng-doc:key></entry>
2143               <entry><muttng-doc:funcref name="forget-passphrase"/></entry>
2144               <entry>wipe passphrase(s) from memory</entry>
2145             </row>
2146           </tbody>
2147         </tgroup>
2148       </table>
2149
2150         </para>
2151         
2152         <para>
2153           <emphasis role="bold">Note:</emphasis> The attach-message function
2154           will prompt you for a folder to
2155           attach messages from. You can now tag messages in that folder and
2156           theywill be attached to the message you are sending. Note that
2157           certainoperations like composing a new mail, replying, forwarding,
2158           etc. are
2159           not permitted when you are in that folder. The <literal>%r</literal>
2160           in <muttng-doc:varref name="status-format"/>
2161           will change to
2162           a 'A' to indicate that you are in attach-message mode.
2163         </para>
2164         
2165         <para>
2166           
2167         </para>
2168         
2169       </sect2>
2170       
2171       <sect2 id="sending-reply">
2172         <title>Replying</title>
2173         
2174         <sect3 id="sending-simple-reply">
2175           <title>Simple Replies</title>
2176           
2177           <para>
2178             When you want to reply to an email message, select it in the index
2179             menu and then press <muttng-doc:key>r</muttng-doc:key>. Mutt-ng's behaviour is
2180             then similar to the 
2181             behaviour when you compose a message: first, you will be asked for
2182             the recipient, then for the subject, and then, mutt-ng will start
2183             the editor with the quote attribution and the quoted message. This
2184             can e.g. look like the example below.
2185           </para>
2186           
2187           <para>
2188             
2189             <muttng-doc:lstmail>
2190 On Mon, Mar 07, 2005 at 05:02:12PM +0100, Michael Svensson wrote:
2191 &gt; Bill, can you please send last month's progress report to Mr. 
2192 &gt; Morgan? We also urgently need the cost estimation for the new 
2193 &gt; production server that we want to set up before our customer's 
2194 &gt; project will go live.</muttng-doc:lstmail>
2195             
2196           </para>
2197           
2198           <para>
2199             You can start editing the email message. It is strongly
2200             recommended to put your answer <emphasis>below</emphasis> the
2201             quoted text and to
2202             only quote what is really necessary and that you refer to. Putting
2203             your answer on top of the quoted message, is, although very
2204             widespread, very often not considered to be a polite way to answer
2205             emails.
2206           </para>
2207           
2208           <para>
2209             The quote attribution is configurable, by default it is set to
2210             
2211             <muttng-doc:lstconf>
2212 set attribution = "On %d, %n wrote:"</muttng-doc:lstconf>
2213             
2214           </para>
2215           
2216           <para>
2217             It can also be set to something more compact, e.g.
2218             
2219             <muttng-doc:lstconf>
2220 set attribution = "attribution="* %n &lt;%a&gt; [%(%y-%m-%d %H:%M)]:"</muttng-doc:lstconf>
2221             
2222           </para>
2223           
2224           <para>
2225             The example above results in the following attribution:
2226             
2227             <muttng-doc:lstmail>
2228 * Michael Svensson &lt;svensson@foobar.com&gt; [05-03-06 17:02]:
2229 &gt; Bill, can you please send last month's progress report to Mr. 
2230 &gt; Morgan? We also urgently need the cost estimation for the new 
2231 &gt; production server that we want to set up before our customer's 
2232 &gt; project will go live.</muttng-doc:lstmail>
2233             
2234           </para>
2235           
2236           <para>
2237             Generally, try to keep your attribution short yet
2238             information-rich. It is <emphasis>not</emphasis> the right place
2239             for witty quotes,
2240             long "attribution" novels or anything like that: the right place
2241             for such things is - if at all - the email signature at the very
2242             bottom of the message.
2243           </para>
2244           
2245           <para>
2246             When you're done with writing your message, save and quit the
2247             editor. As before, you will return to the compose menu, which is
2248             used in the same way as before.
2249           </para>
2250           
2251           <para>
2252             
2253           </para>
2254           
2255         </sect3>
2256         
2257         <sect3 id="sending-group-reply">
2258           <title>Group Replies</title>
2259           
2260           <para>
2261             In the situation where a group of people uses email as a
2262             discussion, most of the emails will have one or more recipients,
2263             and probably several "Cc:" recipients. The group reply
2264             functionalityensures that when you press <muttng-doc:key>g</muttng-doc:key>
2265             instead of <muttng-doc:key>r</muttng-doc:key> to do a reply,
2266             each and every recipient that is contained in the original message
2267             will receive a copy of the message, either as normal recipient or
2268             as "Cc:" recipient.
2269           </para>
2270           
2271           <para>
2272             
2273           </para>
2274           
2275         </sect3>
2276         
2277         <sect3 id="sending-list-reply">
2278           <title>List Replies</title>
2279           
2280           <para>
2281             When you use mailing lists, it's generally better to send your
2282             reply to a message only to the list instead of the list and the
2283             original author. To make this easy to use, mutt-ng features list
2284             replies.
2285           </para>
2286           
2287           <para>
2288             To do a list reply, simply press <muttng-doc:key>L</muttng-doc:key>. If the email
2289             contains
2290             a <literal>Mail-Followup-To:</literal> header, its value will be
2291             used as reply
2292             address. Otherwise, mutt-ng searches through all mail addresses in
2293             the original message and tries to match them a list of regular
2294             expressions which can be specified using the <literal>lists</literal> command. 
2295             If any of the regular expression matches, a mailing
2296             list address has been found, and it will be used as reply address.
2297           </para>
2298           
2299           <para>
2300             
2301             <muttng-doc:lstconf>
2302 lists linuxevent@luga\.at vuln-dev@ mutt-ng-users@</muttng-doc:lstconf>
2303             
2304           </para>
2305           
2306           <para>
2307             Nowadays, most mailing list software like GNU Mailman adds a
2308             <literal>Mail-Followup-To:</literal> header to their emails anyway,
2309             so setting
2310             <literal>lists</literal> is hardly ever necessary in practice.
2311           </para>
2312           
2313           <para>
2314             
2315           </para>
2316           
2317           <para>
2318             
2319           </para>
2320           
2321         </sect3>
2322         
2323       </sect2>
2324       
2325       <sect2 id="sending-edit-header">
2326         <title>Editing the message header</title>
2327         
2328         <para>
2329           When editing the header of your outgoing message, there are a couple
2330           of
2331           special features available.
2332         </para>
2333         
2334         <para>
2335           If you specify
2336           
2337           <literal>Fcc:</literal> <emphasis>filename</emphasis>
2338           
2339           Mutt-ng will pick up <emphasis>filename</emphasis>
2340           just as if you had used the <emphasis>edit-fcc</emphasis> function in
2341           the <emphasis>compose</emphasis> menu.
2342         </para>
2343         
2344         <para>
2345           You can also attach files to your message by specifying
2346
2347           <muttng-doc:lstmail>
2348 Attach: filename [description]</muttng-doc:lstmail>
2349
2350           where <emphasis>filename</emphasis> is the file to attach and <emphasis>
2351             description
2352           </emphasis>
2353           is an
2354           optional string to use as the description of the attached file.
2355         </para>
2356         
2357         <para>
2358           When replying to messages, if you remove the <emphasis>In-Reply-To:</emphasis> field from
2359           the header field, Mutt-ng will not generate a <emphasis>References:</emphasis> field, which
2360           allows you to create a new message thread.
2361         </para>
2362         
2363         <para>
2364           Also see the <muttng-doc:varref name="edit-headers"/> and
2365           <muttng-doc:varref name="editor-headers"/> variables
2366         </para>
2367         
2368         <para>
2369           
2370         </para>
2371         
2372       </sect2>
2373       
2374       <sect2 id="sending-crypto">
2375         <title>Using Mutt-ng with PGP</title>
2376         
2377         <para>
2378           If you want to use PGP, you can specify 
2379         
2380           <muttng-doc:lstmail>
2381 Pgp: [E | S | S id]</muttng-doc:lstmail>
2382
2383           ``E'' encrypts, ``S'' signs and
2384           ``S&lt;id&gt;'' signs with the given key, setting
2385           <muttng-doc:varref name="pgp-sign-as"/>
2386           permanently.
2387         </para>
2388         
2389         <para>
2390           If you have told mutt to PGP encrypt a message, it will guide you
2391           through a key selection process when you try to send the message.
2392           Mutt-ng will not ask you any questions about keys which have a
2393           certified user ID matching one of the message recipients' mail
2394           addresses.  However, there may be situations in which there are
2395           several keys, weakly certified user ID fields, or where no matching
2396           keys can be found.
2397         </para>
2398         
2399         <para>
2400           In these cases, you are dropped into a menu with a list of keys from
2401           which you can select one.  When you quit this menu, or mutt can't
2402           find any matching keys, you are prompted for a user ID.  You can, as
2403           usually, abort this prompt using <muttng-doc:key mod="C">G</muttng-doc:key>.  When
2404           you do so, mutt will
2405           return to the compose screen.
2406         </para>
2407         
2408         <para>
2409           Once you have successfully finished the key selection, the message
2410           will be encrypted using the selected public keys, and sent out.
2411         </para>
2412         
2413         <para>
2414           Most fields of the entries in the key selection menu (see also 
2415           <muttng-doc:varref name="pgp-entry-format"/>)
2416           have obvious meanings.  But some explanations on the capabilities,
2417           flags, 
2418           and validity fields are in order.
2419         </para>
2420         
2421         <para>
2422           The flags sequence (%f) will expand to one of the following
2423           flags:
2424
2425
2426         <table frame="none" rowsep="1" texstr="l|l">
2427           <title>PGP Key Menu Flags</title>
2428           <tgroup cols="2" align="left" colsep="1" rowsep="1">
2429           <thead>
2430             <row>
2431               <entry>Flag</entry>
2432               <entry>Description</entry>
2433             </row>
2434           </thead>
2435           <tbody>
2436             <row>
2437               <entry><literal>R</literal></entry>
2438               <entry>The key has been revoked and can't be used.</entry>
2439             </row>
2440             <row>
2441               <entry><literal>X</literal></entry>
2442               <entry>The key is expired and can't be used.</entry>
2443             </row>
2444             <row>
2445               <entry><literal>d</literal></entry>
2446               <entry>You have marked the key as disabled.</entry>
2447             </row>
2448             <row>
2449               <entry><literal>c</literal></entry>
2450               <entry>There are unknown critical self-signature packets.</entry>
2451             </row>
2452           </tbody>
2453         </tgroup>
2454       </table>
2455
2456         </para>
2457         
2458         <para>
2459           The capabilities field (%c) expands to a two-character
2460           sequencerepresenting a key's capabilities.  The first character gives
2461           the key's encryption capabilities: A minus sign (<emphasis role="bold">
2462             -
2463           </emphasis>
2464           )means 
2465           that the key cannot be used for encryption.  A dot (<emphasis role="bold">
2466             .
2467           </emphasis>
2468           )means that
2469           it's marked as a signature key in one of the user IDs, but may 
2470           also be used for encryption.  The letter <emphasis role="bold">e</emphasis> indicates that 
2471           this key can be used for encryption.
2472         </para>
2473         
2474         <para>
2475           The second character indicates the key's signing capabilities.  Once 
2476           again, a ``<emphasis role="bold">-</emphasis>'' implies ``not for
2477           signing'', ``<emphasis role="bold">.</emphasis>'' implies
2478           that the key is marked as an encryption key in one of the user-ids,
2479           and
2480           ``<emphasis role="bold">s</emphasis>'' denotes a key which can be
2481           used for signing.
2482         </para>
2483         
2484         <para>
2485           Finally, the validity field (%t) indicates how well-certified
2486           a user-id
2487           is.  A question mark (<emphasis role="bold">?</emphasis>) indicates
2488           undefined validity, a minus 
2489           character (<emphasis role="bold">-</emphasis>) marks an untrusted
2490           association, a space character 
2491           means a partially trusted association, and a plus character (<emphasis role="bold">
2492             +
2493           </emphasis>
2494           )
2495           indicates complete validity.
2496         </para>
2497         
2498         <para>
2499           
2500         </para>
2501         
2502       </sect2>
2503       
2504       <sect2 id="sending-mixmaster">
2505         <title>Sending anonymous messages via mixmaster</title>
2506         
2507         <para>
2508           You may also have configured mutt to co-operate with Mixmaster, an
2509           anonymous remailer.  Mixmaster permits you to send your messages
2510           anonymously using a chain of remailers. Mixmaster support in mutt is
2511           for 
2512           mixmaster version 2.04 (beta 45 appears to be the latest) and 2.03. 
2513           It does not support earlier versions or the later so-called version 3
2514           betas, 
2515           of which the latest appears to be called 2.9b23.
2516         </para>
2517         
2518         <para>
2519           To use it, you'll have to obey certain restrictions.  Most
2520           important, you cannot use the <literal>Cc</literal> and <literal>Bcc</literal> headers.  To tell
2521           Mutt-ng to use mixmaster, you have to select a remailer chain, using
2522           the mix function on the compose menu.  
2523         </para>
2524         
2525         <para>
2526           The chain selection screen is divided into two parts.  In the
2527           (larger) upper part, you get a list of remailers you may use.  In
2528           the lower part, you see the currently selected chain of remailers.
2529         </para>
2530         
2531         <para>
2532           You can navigate in the chain using the <literal>chain-prev</literal>
2533           and
2534           <literal>chain-next</literal> functions, which are by default bound
2535           to the left
2536           and right arrows and to the <muttng-doc:key>h</muttng-doc:key> and <muttng-doc:key>l</muttng-doc:key> keys (think vi
2537           keyboard bindings).  To insert a remailer at the current chain
2538           position, use the <literal>insert</literal> function.  To append a
2539           remailer behind
2540           the current chain position, use <literal>select-entry</literal> or <literal>
2541             append
2542           </literal>
2543           .
2544           You can also delete entries from the chain, using the corresponding
2545           function.  Finally, to abandon your changes, leave the menu, or
2546           <literal>accept</literal> them pressing (by default) the <literal>
2547             Return
2548           </literal>
2549           key.
2550         </para>
2551         
2552         <para>
2553           Note that different remailers do have different capabilities,
2554           indicated in the <literal>%c</literal> entry of the remailer menu lines (see
2555           <muttng-doc:varref name="mix-entry-format"/>).
2556           Most important is
2557           the ``middleman'' capability, indicated by a capital ``M'': This
2558           means that the remailer in question cannot be used as the final
2559           element of a chain, but will only forward messages to other
2560           mixmaster remailers.  For details on the other capabilities, please
2561           have a look at the mixmaster documentation.
2562         </para>
2563         
2564         <para>
2565           
2566         </para>
2567         
2568         <para>
2569           
2570         </para>
2571         
2572       </sect2>
2573       
2574     </sect1>
2575     
2576     <sect1 id="forwarding-mail">
2577       <title>Forwarding and Bouncing Mail</title>
2578       
2579       <para>
2580         Often, it is necessary to forward mails to other people.
2581         Therefore, mutt-ng supports forwarding messages in two different
2582         ways.
2583       </para>
2584       
2585       <para>
2586         The first one is regular forwarding, as you probably know it from
2587         other mail clients. You simply press <muttng-doc:key>f</muttng-doc:key>, enter the
2588         recipient
2589         email address, the subject of the forwarded email, and then you can
2590         edit the message to be forwarded in the editor. The forwarded
2591         message is separated from the rest of the message via the two
2592         following markers:
2593       </para>
2594       
2595       <para>
2596         
2597         <muttng-doc:lstmail>
2598 ----- Forwarded message from Lucas User &lt;luser@example.com&gt; -----
2599
2600 From: Lucas User &lt;luser@example.com&gt;
2601 Date: Thu, 02 Dec 2004 03:08:34 +0100
2602 To: Michael Random &lt;mrandom@example.com&gt;
2603 Subject: Re: blackmail
2604
2605 Pay me EUR 50,000.- cash or your favorite stuffed animal will die
2606 a horrible death.
2607
2608 ----- End forwarded message -----</muttng-doc:lstmail>
2609         
2610       </para>
2611       
2612       <para>
2613         When you're done with editing the mail, save and quit the editor,
2614         and you will return to the compose menu, the same menu you also
2615         encounter when composing or replying to mails.
2616       </para>
2617       
2618       <para>
2619         The second mode of forwarding emails with mutt-ng is the
2620         so-called <emphasis>bouncing</emphasis>: when you bounce an email to
2621         another
2622         address, it will be sent in practically the same format you send it
2623         (except for headers that are created during transporting the
2624         message). To bounce a message, press <muttng-doc:key>b</muttng-doc:key> and enter the
2625         recipient
2626         email address. By default, you are then asked whether you really
2627         want to bounce the message to the specified recipient. If you answer
2628         with yes, the message will then be bounced.
2629       </para>
2630       
2631       <para>
2632         To the recipient, the bounced email will look as if he got it
2633         like a regular email where he was <literal>Bcc:</literal> recipient.
2634         The only
2635         possibility to find out whether it was a bounced email is to
2636         carefully study the email headers and to find out which host really
2637         sent the email.
2638       </para>
2639       
2640       <para>
2641         
2642       </para>
2643       
2644     </sect1>
2645     
2646     <sect1 id="postponing-mail">
2647       <title>Postponing Mail</title>
2648       
2649       <para>
2650         At times it is desirable to delay sending a message that you have
2651         already begun to compose.  When the <emphasis>postpone-message</emphasis> function is
2652         used in the <emphasis>compose</emphasis> menu, the body of your message
2653         and attachments
2654         are stored in the mailbox specified by the
2655         <muttng-doc:varref name="postponed"/> variable.  This means that you can recall the
2656         message even if you exit Mutt-ng and then restart it at a later time.
2657       </para>
2658       
2659       <para>
2660         Once a message is postponed, there are several ways to resume it.  From
2661         the
2662         command line you can use the ``-p'' option, or if you <emphasis>compose</emphasis> a new
2663         message from the <emphasis>index</emphasis> or <emphasis>pager</emphasis> you will be prompted if postponed
2664         messages exist.  If multiple messages are currently postponed, the
2665         <emphasis>postponed</emphasis> menu will pop up and you can select
2666         which message you would
2667         like to resume.
2668       </para>
2669       
2670       <para>
2671         <emphasis role="bold">Note:</emphasis> If you postpone a reply to a
2672         message, the reply setting of
2673         the message is only updated when you actually finish the message and
2674         send it.  Also, you must be in the same folder with the message you
2675         replied to for the status of the message to be updated.
2676       </para>
2677       
2678       <para>
2679         See also the <muttng-doc:varref name="postpone"/> quad-option.
2680       </para>
2681       
2682       <para>
2683         
2684       </para>
2685       
2686       <para>
2687         
2688       </para>
2689       
2690     </sect1>
2691
2692     <!--}}}-->
2693     
2694 </chapter>
2695 <!--}}}-->
2696   
2697 <chapter id="configuration"> <!--{{{-->
2698     <title>Configuration</title>
2699     
2700     <sect1 id="configuration-files">
2701       <title>Locations of Configuration Files</title>
2702       
2703       <para>
2704         While the default configuration (or ``preferences'') make Mutt-ng
2705         usable right out
2706         of the box, it is often desirable to tailor Mutt-ng to suit your own
2707         tastes. When
2708         Mutt-ng is first invoked, it will attempt to read the ``system''
2709         configuration
2710         file (defaults set by your local system administrator), unless the
2711         ``-n'' <link linkend="commandline">commandline</link> option is
2712         specified.  This file is
2713         typically <literal>/usr/local/share/muttng/Muttngrc</literal> or <literal>
2714           /etc/Muttngrc
2715         </literal>
2716         ,
2717         Mutt-ng users will find this file in <literal>
2718           /usr/local/share/muttng/Muttrc
2719         </literal>
2720         or
2721         <literal>/etc/Muttngrc</literal>. Mutt will next look for a file named <literal>
2722           .muttrc
2723         </literal>
2724         in your home directory, Mutt-ng will look for <literal>.muttngrc</literal>.  If this file
2725         does not exist and your home directory has a subdirectory named <literal>
2726           .mutt
2727         </literal>
2728         ,
2729         mutt try to load a file named <literal>.muttng/muttngrc</literal>. 
2730       </para>
2731       
2732       <para>
2733         <literal>.muttrc</literal> (or <literal>.muttngrc</literal> for
2734         Mutt-ng) is the file where you will
2735         usually place your <link linkend="commands">commands</link> to
2736         configure Mutt-ng.
2737       </para>
2738       
2739       <para>
2740         
2741       </para>
2742       
2743     </sect1>
2744     
2745     <sect1 id="configuration-syntax">
2746       <title>Basic Syntax of Initialization Files</title>
2747       
2748       <para>
2749         An initialization file consists of a series of <link linkend="commands">commands</link>. Each line of the file may contain one or more commands.
2750         When multiple commands are used, they must be separated by a semicolon
2751         (;).
2752         
2753         <muttng-doc:lstconf>
2754 set realname='Mutt-ng user' ; ignore x-</muttng-doc:lstconf>
2755         
2756         The hash mark, or pound sign
2757         (``#''), is used as a ``comment'' character. You can use it to
2758         annotate your initialization file. All text after the comment character
2759         to the end of the line is ignored. For example,
2760       </para>
2761       
2762       <para>
2763         
2764         <muttng-doc:lstconf>
2765 my_hdr X-Disclaimer: Why are you listening to me? # This is a comment</muttng-doc:lstconf>
2766         
2767       </para>
2768       
2769       <para>
2770         Single quotes (') and double quotes (&quot;) can be used to quote
2771         strings
2772         which contain spaces or other special characters.  The difference
2773         between
2774         the two types of quotes is similar to that of many popular shell
2775         programs,
2776         namely that a single quote is used to specify a literal string (one
2777         that is
2778         not interpreted for shell variables or quoting with a backslash
2779         (see
2780         next paragraph), while double quotes indicate a string for which
2781         should be evaluated.  For example, backtics are evaluated inside of
2782         double
2783         quotes, but <emphasis role="bold">not</emphasis> for single quotes.
2784       </para>
2785       
2786       <para>
2787         \ quotes the next character, just as in shells such as bash and
2788         zsh.
2789         For example, if want to put quotes ``&quot;'' inside of a string, you
2790         can use
2791         ``\'' to force the next character to be a literal instead of
2792         interpreted
2793         character.
2794         
2795         <muttng-doc:lstconf>
2796 set realname="Michael \"MuttDude\" Elkins"</muttng-doc:lstconf>
2797         
2798       </para>
2799       
2800       <para>
2801         ``\\'' means to insert a literal ``\'' into the line.
2802         ``\n'' and ``\r'' have their usual C meanings of linefeed and
2803         carriage-return, respectively.
2804       </para>
2805       
2806       <para>
2807         A \ at the end of a line can be used to split commands over
2808         multiple lines, provided that the split points don't appear in the
2809         middle of command names.
2810       </para>
2811       
2812       <para>
2813         Please note that, unlike the various shells, mutt-ng interprets a
2814         ``\''
2815         at the end of a line also in comments. This allows you to disable a
2816         command
2817         split over multiple lines with only one ``#''.
2818       </para>
2819       
2820       <para>
2821         
2822         <muttng-doc:lstconf>
2823 # folder-hook . \
2824 set realname="Michael \"MuttDude\" Elkins"</muttng-doc:lstconf>
2825         
2826       </para>
2827       
2828       <para>
2829         When testing your config files, beware the following caveat. The
2830         backslash
2831         at the end of the commented line extends the current line with the next
2832         line
2833         - then referred to as a ``continuation line''.  As the first line is
2834         commented with a hash (#) all following continuation lines are also
2835         part of a comment and therefore are ignored, too. So take care of
2836         comments
2837         when continuation lines are involved within your setup files!
2838       </para>
2839       
2840       <para>
2841         Abstract example:
2842       </para>
2843       
2844       <para>
2845         
2846         <muttng-doc:lstconf>
2847 line1\
2848 line2a # line2b\
2849 line3\
2850 line4
2851 line5</muttng-doc:lstconf>
2852         
2853       </para>
2854       
2855       <para>
2856         line1 ``continues'' until line4. however, the part after the # is a
2857         comment which includes line3 and line4. line5 is a new line of its own
2858         and
2859         thus is interpreted again.
2860       </para>
2861       
2862       <para>
2863         The commands understood by mutt are explained in the next paragraphs.
2864         For a complete list, see the <link linkend="commands">commands</link>.
2865       </para>
2866       
2867       <para>
2868         
2869       </para>
2870       
2871     </sect1>
2872     
2873     <sect1 id="configuration-expansion">
2874       <title>Expansion within variables</title>
2875       
2876       <para>
2877         Besides just assign static content to variables, there's plenty of
2878         ways of adding external and more or less dynamic content.
2879       </para>
2880       
2881       <sect2 id="configuration-expansion-commands">
2882         <title>Commands' Output</title>
2883         
2884         <para>
2885           It is possible to substitute the output of a Unix command in an
2886           initialization file.  This is accomplished by enclosing the command
2887           in backquotes (``) as in, for example:
2888         </para>
2889         
2890         <para>
2891           
2892           <muttng-doc:lstconf>
2893 my_hdr X-Operating-System: `uname -a`</muttng-doc:lstconf>
2894           
2895         </para>
2896         
2897         <para>
2898           The output of the Unix command ``uname -a'' will be substituted
2899           before the line is parsed. Note that since initialization files are
2900           line oriented, only the first line of output from the Unix command
2901           will be substituted.
2902         </para>
2903         
2904       </sect2>
2905       
2906       <sect2 id="configuration-expansion-environment">
2907         <title>Environment Variables</title>
2908         
2909         <para>
2910           UNIX environments can be accessed like the way it is done in
2911           shells like sh and bash: Prepend the name of the environment by a
2912           ``$'' sign. For example,
2913         </para>
2914         
2915         <para>
2916           
2917           <muttng-doc:lstconf>
2918 set record=+sent_on_$HOSTNAME</muttng-doc:lstconf>
2919           
2920         </para>
2921         
2922         <para>
2923           sets the <muttng-doc:varref name="record"/> variable to the
2924           string <emphasis>+sent_on_</emphasis> and appends the
2925           value of the evironment
2926           variable <muttng-doc:envvar name="HOSTNAME"/>.
2927         </para>
2928         
2929         <para>
2930           <emphasis role="bold">Note:</emphasis> There will be no warning if an
2931           environment variable
2932           is not defined. The result will of the expansion will then be empty.
2933         </para>
2934         
2935       </sect2>
2936       
2937       <sect2 id="configuration-expansion-config">
2938         <title>Configuration Variables</title>
2939         
2940         <para>
2941           As for environment variables, the values of all configuration
2942           variables as string can be used in the same way, too. For example,
2943         </para>
2944         
2945         <para>
2946           
2947           <muttng-doc:lstconf>
2948 set imap_home_namespace = $folder</muttng-doc:lstconf>
2949           
2950         </para>
2951         
2952         <para>
2953           would set the value of <muttng-doc:varref name="imap-home-namespace"/>
2954           to the value to which <muttng-doc:varref name="folder"/>
2955           is <emphasis>currently</emphasis> set to.
2956         </para>
2957         
2958         <para>
2959           <emphasis role="bold">Note:</emphasis> There're no logical links
2960           established in such cases so
2961           that the the value for <muttng-doc:varref name="imap-home-namespace"/>
2962           won't change even
2963           if <muttng-doc:varref name="folder"/> gets changed.
2964         </para>
2965         
2966         <para>
2967           <emphasis role="bold">Note:</emphasis> There will be no warning if a
2968           configuration variable
2969           is not defined or is empty. The result will of the expansion will
2970           then be empty.
2971         </para>
2972         
2973       </sect2>
2974       
2975       <sect2 id="configuration-expansion-self">
2976         <title>Self-Defined Variables</title>
2977         
2978         <para>
2979           Mutt-ng flexibly allows users to define their own variables. To
2980           avoid conflicts with the standard set and to prevent misleading
2981           error messages, there's a reserved namespace for them: all
2982           user-defined variables must be prefixed with <literal>user_</literal> and can be
2983           used just like any ordinary configuration or environment
2984           variable.
2985         </para>
2986         
2987         <para>
2988           For example, to view the manual, users can either define two
2989           macros like the following
2990         </para>
2991         
2992         <para>
2993           
2994           <muttng-doc:lstconf>
2995 macro generic &lt;F1&gt; "!less -r /path/to/manual" "Show manual"
2996 macro pager &lt;F1&gt; "!less -r /path/to/manual" "Show manual"</muttng-doc:lstconf>
2997           
2998         </para>
2999         
3000         <para>
3001           for <literal>generic</literal>, <literal>pager</literal> and <literal>
3002             index
3003           </literal>
3004           .The alternative is to
3005           define a custom variable like so:
3006         </para>
3007         
3008         <para>
3009           
3010           <muttng-doc:lstconf>
3011 set user_manualcmd = "!less -r /path/to_manual" 
3012 macro generic &lt;F1&gt; "$user_manualcmd&lt;enter&gt;" "Show manual"
3013 macro pager &lt;F1&gt; "$user_manualcmd&lt;enter&gt;" "Show manual"
3014 macro index &lt;F1&gt; "$user_manualcmd&lt;enter&gt;" "Show manual"</muttng-doc:lstconf>
3015           
3016         </para>
3017         
3018         <para>
3019           to re-use the command sequence as in:
3020         </para>
3021         
3022         <para>
3023           
3024           <muttng-doc:lstconf>
3025 macro index &lt;F2&gt; "$user_manualcmd | grep '\^[ ]\\+~. '" "Show Patterns"</muttng-doc:lstconf>
3026           
3027         </para>
3028         
3029         <para>
3030           Using this feature, arbitrary sequences can be defined once and
3031           recalled and reused where necessary. More advanced scenarios could
3032           include to save a variable's value at the beginning of macro
3033           sequence and restore it at end.
3034         </para>
3035         
3036         <para>
3037           When the variable is first defined, the first value it gets
3038           assigned is also the initial value to which it can be reset using
3039           the <literal>reset</literal> command.
3040         </para>
3041         
3042         <para>
3043           The complete removal is done via the <literal>unset</literal>
3044           keyword.
3045         </para>
3046         
3047         <para>
3048           After the following sequence:
3049         </para>
3050         
3051         <para>
3052           
3053           <muttng-doc:lstconf>
3054 set user_foo = 42
3055 set user_foo = 666</muttng-doc:lstconf>
3056           
3057         </para>
3058         
3059         <para>
3060           the variable <literal>$user_foo</literal> has a current value
3061           of 666 and an
3062           initial of 42. The query
3063         </para>
3064         
3065         <para>
3066           
3067           <muttng-doc:lstconf>
3068 set ?user_foo</muttng-doc:lstconf>
3069           
3070         </para>
3071         
3072         <para>
3073           will show 666. After doing the reset via
3074         </para>
3075         
3076         <para>
3077           
3078           <muttng-doc:lstconf>
3079 reset user_foo</muttng-doc:lstconf>
3080           
3081         </para>
3082         
3083         <para>
3084           a following query will give 42 as the result. After unsetting it
3085           via
3086         </para>
3087         
3088         <para>
3089           
3090           <muttng-doc:lstconf>
3091 unset user_foo</muttng-doc:lstconf>
3092           
3093         </para>
3094         
3095         <para>
3096           any query or operation (except the noted expansion within other
3097           statements) will lead to an error message.
3098         </para>
3099         
3100       </sect2>
3101       
3102       <sect2 id="configuration-expansion-predef">
3103         <title>Pre-Defined Variables</title>
3104         
3105         <para>
3106           In order to allow users to share one setup over a number of
3107           different machines without having to change its contents, there's a
3108           number of pre-defined variables. These are prefixed with
3109           <literal>muttng_</literal> and are read-only, i.e. they cannot
3110           be set, unset or
3111           reset. The reference chapter lists all available variables.
3112         </para>
3113         
3114         <para>
3115           <emphasis> Please consult the local copy of your manual for their
3116             values as they may differ from different manual sources.
3117           </emphasis>
3118           Where
3119           the manual is installed in can be queried (already using such a
3120           variable) by running:
3121         </para>
3122         
3123         <para>
3124           
3125           <muttng-doc:lstshell>
3126 $ muttng -Q muttng_docdir</muttng-doc:lstshell>
3127           
3128         </para>
3129         
3130         <para>
3131           To extend the example for viewing the manual via self-defined
3132           variables, it can be made more readable and more portable by
3133           changing the real path in:
3134         </para>
3135         
3136         <para>
3137           
3138           <muttng-doc:lstconf>
3139 set user_manualcmd = '!less -r /path/to_manual'</muttng-doc:lstconf>
3140           
3141         </para>
3142         
3143         <para>
3144           to:
3145         </para>
3146         
3147         <para>
3148           
3149           <muttng-doc:lstconf>
3150 set user_manualcmd = "!less -r $muttng_docdir/manual.txt"</muttng-doc:lstconf>
3151           
3152         </para>
3153         
3154         <para>
3155           which works everywhere if a manual is installed.
3156         </para>
3157         
3158         <para>
3159           Please note that by the type of quoting, muttng determines when
3160           to expand these values: when it finds double quotes, the value will
3161           be expanded during reading the setup files but when it finds single
3162           quotes, it'll expand it at runtime as needed.
3163         </para>
3164         
3165         <para>
3166           For example, the statement
3167         </para>
3168         
3169         <para>
3170           
3171           <muttng-doc:lstconf>
3172 folder-hook . "set user_current_folder = $muttng_folder_name"</muttng-doc:lstconf>
3173           
3174         </para>
3175         
3176         <para>
3177           will be already be translated to the following when reading the
3178           startup files:
3179         </para>
3180         
3181         <para>
3182           
3183           <muttng-doc:lstconf>
3184 folder-hook . "set user_current_folder = some_folder"</muttng-doc:lstconf>
3185           
3186         </para>
3187         
3188         <para>
3189           with <literal>some_folder</literal> being the name of the
3190           first folder muttng
3191           opens. On the contrary,
3192         </para>
3193         
3194         <para>
3195           
3196           <muttng-doc:lstconf>
3197 folder-hook . 'set user_current_folder = $muttng_folder_name'</muttng-doc:lstconf>
3198           
3199         </para>
3200         
3201         <para>
3202           will be executed at runtime because of the single quotes so that
3203           <literal>user_current_folder</literal> will always have
3204           the value of the currently
3205           opened folder.
3206         </para>
3207         
3208         <para>
3209           A more practical example is:
3210         </para>
3211         
3212         <para>
3213           
3214           <muttng-doc:lstconf>
3215 folder-hook . 'source ~/.mutt/score-$muttng_folder_name'</muttng-doc:lstconf>
3216           
3217         </para>
3218         
3219         <para>
3220           which can be used to source files containing score commands
3221           depending on the folder the user enters.
3222         </para>
3223         
3224       </sect2>
3225       
3226       <sect2 id="configuration-expansion-typeconv">
3227         <title>Type Conversions</title>
3228         
3229         <para>
3230           A note about variable's types during conversion: internally
3231           values are stored in internal types but for any dump/query or set
3232           operation they're converted to and from string. That means that
3233           there's no need to worry about types when referencing any variable.
3234           As an example, the following can be used without harm (besides
3235           makeing muttng very likely behave strange):
3236         </para>
3237         
3238         <para>
3239           
3240           <muttng-doc:lstconf>
3241 set read_inc = 100
3242 set folder = $read_inc
3243 set read_inc = $folder
3244 set user_magic_number = 42
3245 set folder = $user_magic_number</muttng-doc:lstconf>
3246           
3247         </para>
3248         
3249       </sect2>
3250       
3251     </sect1>
3252     
3253     <sect1>
3254       <title>Defining/Using aliases</title>
3255
3256       <para>
3257         <muttng-doc:cmddef name="alias">
3258           key address [, address,...]
3259         </muttng-doc:cmddef>
3260       </para>
3261       
3262       <para>
3263         It's usually very cumbersome to remember or type out the address of
3264         someone
3265         you are communicating with.  Mutt-ng allows you to create ``aliases''
3266         which map
3267         a short string to a full address.
3268       </para>
3269       
3270       <para>
3271         <emphasis role="bold">Note:</emphasis> if you want to create an alias
3272         for a group (by specifying more than
3273         one address), you <emphasis role="bold">must</emphasis> separate the
3274         addresses with a comma (``,'').
3275       </para>
3276       
3277       <para>
3278         To remove an alias or aliases (``*'' means all aliases):
3279       </para>
3280       
3281       <para>
3282         <muttng-doc:cmddef name="unalias">
3283           [* | key ... ]
3284         </muttng-doc:cmddef>
3285       </para>
3286       
3287       <para>
3288         
3289         <muttng-doc:lstconf>
3290 alias muttdude me@cs.hmc.edu (Michael Elkins)
3291 alias theguys manny, moe, jack</muttng-doc:lstconf>
3292         
3293       </para>
3294       
3295       <para>
3296         Unlike other mailers, Mutt-ng doesn't require aliases to be defined
3297         in a special file.  The <literal>alias</literal> command can appear
3298         anywhere in
3299         a configuration file, as long as this file is <muttng-doc:cmdref name="source"/>.
3300         Consequently, you can have multiple alias files, or
3301         you can have all aliases defined in your muttrc.
3302       </para>
3303       
3304       <para>
3305         On the other hand, the <muttng-doc:funcref name="create-alias"/>
3306         function can use only one file, the one pointed to by the
3307         <muttng-doc:varref name="alias-file"/>
3308         variable (which is
3309         <literal>~/.muttrc</literal> by default). This file is not
3310         special either,
3311         in the sense that Mutt-ng will happily append aliases to any file, but
3312         in
3313         order for the new aliases to take effect you need to explicitly <muttng-doc:cmdref name="source"/>
3314         this file too.
3315       </para>
3316       
3317       <para>
3318         For example:
3319       </para>
3320       
3321       <para>
3322         
3323         <muttng-doc:lstconf>
3324 source /usr/local/share/Mutt-ng.aliases
3325 source ~/.mail_aliases
3326 set alias_file=~/.mail_aliases</muttng-doc:lstconf>
3327         
3328       </para>
3329       
3330       <para>
3331         To use aliases, you merely use the alias at any place in mutt where
3332         muttprompts for addresses, such as the <emphasis>To:</emphasis> or <emphasis>
3333           Cc:
3334         </emphasis>
3335         prompt.  You can
3336         also enter aliases in your editor at the appropriate headers if you
3337         have the
3338         <muttng-doc:varref name="editor-headers"/>
3339         variable set.
3340       </para>
3341       
3342       <para>
3343         In addition, at the various address prompts, you can use the tab
3344         character
3345         to expand a partial alias to the full alias.  If there are multiple
3346         matches,
3347         mutt will bring up a menu with the matching aliases.  In order to be
3348         presented with the full list of aliases, you must hit tab with out a
3349         partial
3350         alias, such as at the beginning of the prompt or after a comma denoting
3351         multiple addresses.
3352       </para>
3353       
3354       <para>
3355         In the alias menu, you can select as many aliases as you want with the
3356         <emphasis>select-entry</emphasis> key (default: RET), and use the <emphasis>
3357           exit
3358         </emphasis>
3359         key
3360         (default: q) to return to the address prompt.
3361       </para>
3362       
3363       <para>
3364         
3365       </para>
3366       
3367     </sect1>
3368     
3369     <sect1>
3370       <title>Changing the default key bindings</title>
3371       
3372       <para>
3373         <muttng-doc:cmddef name="bind">
3374           map key function
3375         </muttng-doc:cmddef>
3376       </para>
3377       
3378       <para>
3379         This command allows you to change the default key bindings (operation
3380         invoked when pressing a key).
3381       </para>
3382       
3383       <para>
3384         <emphasis>map</emphasis> specifies in which menu the binding belongs. 
3385         Multiple maps may
3386         be specified by separating them with commas (no additional whitespace
3387         isallowed). The currently defined maps are:
3388       </para>
3389       
3390       <para>
3391         <anchor id="maps"/>
3392         <variablelist>
3393           
3394           <varlistentry>
3395             <term>generic</term>
3396             <listitem>
3397               <para>
3398                 This is not a real menu, but is used as a fallback for all of
3399                 the other
3400                 menus except for the pager and editor modes.  If a key is not
3401                 defined in
3402                 another menu, Mutt-ng will look for a binding to use in this
3403                 menu.  This allows
3404                 you to bind a key to a certain function in multiple menus
3405                 instead of having
3406                 multiple bind statements to accomplish the same task.
3407               </para>
3408             </listitem>
3409           </varlistentry>
3410           <varlistentry>
3411             <term>alias</term>
3412             <listitem>
3413               <para>
3414                 The alias menu is the list of your personal aliases as defined
3415                 in your
3416                 muttrc.  It is the mapping from a short alias name to the full
3417                 email
3418                 address(es) of the recipient(s).
3419               </para>
3420             </listitem>
3421           </varlistentry>
3422           <varlistentry>
3423             <term>attach</term>
3424             <listitem>
3425               <para>
3426                 The attachment menu is used to access the attachments on
3427                 received messages.
3428               </para>
3429             </listitem>
3430           </varlistentry>
3431           <varlistentry>
3432             <term>browser</term>
3433             <listitem>
3434               <para>
3435                 The browser is used for both browsing the local directory
3436                 structure, and for
3437                 listing all of your incoming mailboxes.
3438               </para>
3439             </listitem>
3440           </varlistentry>
3441           <varlistentry>
3442             <term>editor</term>
3443             <listitem>
3444               <para>
3445                 The editor is the line-based editor the user enters text data.
3446               </para>
3447             </listitem>
3448           </varlistentry>
3449           <varlistentry>
3450             <term>index</term>
3451             <listitem>
3452               <para>
3453                 The index is the list of messages contained in a mailbox.
3454               </para>
3455             </listitem>
3456           </varlistentry>
3457           <varlistentry>
3458             <term>compose</term>
3459             <listitem>
3460               <para>
3461                 The compose menu is the screen used when sending a new message.
3462               </para>
3463             </listitem>
3464           </varlistentry>
3465           <varlistentry>
3466             <term>pager</term>
3467             <listitem>
3468               <para>
3469                 The pager is the mode used to display message/attachment data,
3470                 and help
3471                 listings.
3472               </para>
3473             </listitem>
3474           </varlistentry>
3475           <varlistentry>
3476             <term>pgp</term>
3477             <listitem>
3478               <para>
3479                 The pgp menu is used to select the OpenPGP keys used for
3480                 encrypting outgoing
3481                 messages.
3482               </para>
3483             </listitem>
3484           </varlistentry>
3485           <varlistentry>
3486             <term>postpone</term>
3487             <listitem>
3488               <para>
3489                 The postpone menu is similar to the index menu, except is used
3490                 when
3491                 recalling a message the user was composing, but saved until
3492                 later.
3493               </para>
3494             </listitem>
3495           </varlistentry>
3496         </variablelist>
3497       </para>
3498       
3499       <para>
3500         <emphasis>key</emphasis> is the key (or key sequence) you wish to bind.
3501          To specify a
3502         control character, use the sequence <emphasis>\Cx</emphasis>,
3503         where <emphasis>x</emphasis> is the
3504         letter of the control character (for example, to specify control-A use
3505         ``\Ca'').  Note that the case of <emphasis>x</emphasis> as well as
3506         <emphasis>\C</emphasis> is
3507         ignored, so that <emphasis>\CA</emphasis>, <emphasis>\Ca</emphasis>, <emphasis>
3508           \cA
3509         </emphasis>
3510         and <emphasis>\ca</emphasis> are all
3511         equivalent.  An alternative form is to specify the key as a three digit
3512         octal number prefixed with a ``\'' (for example <emphasis>
3513           \177
3514         </emphasis>
3515         is
3516         equivalent to <emphasis>\c?</emphasis>).
3517       </para>
3518       
3519       <para>
3520         In addition, <emphasis>key</emphasis> may consist of:
3521       </para>
3522       
3523       <para>
3524         
3525         <table frame="none" rowsep="1" texstr="l|l">
3526           <title>Alternative Key Names</title>
3527           <tgroup cols="2" align="left" colsep="1" rowsep="1">
3528           <thead>
3529             <row>
3530               <entry>Sequence</entry>
3531               <entry>Description</entry>
3532             </row>
3533           </thead>
3534           <tbody>
3535             <row>
3536               <entry><literal>\t</literal></entry>
3537               <entry>tab</entry>
3538             </row>
3539             <row>
3540               <entry><literal>&lt;tab&gt;</literal></entry>
3541               <entry>tab</entry>
3542             </row>
3543             <row>
3544               <entry><literal>&lt;backtab&gt;</literal></entry>
3545               <entry>backtab / shift-tab</entry>
3546             </row>
3547             <row>
3548               <entry><literal>\r</literal></entry>
3549               <entry>carriage return</entry>
3550             </row>
3551             <row>
3552               <entry><literal>\n</literal></entry>
3553               <entry>newline</entry>
3554             </row>
3555             <row>
3556               <entry><literal>\e</literal></entry>
3557               <entry>escape</entry>
3558             </row>
3559             <row>
3560               <entry><literal>&lt;esc&gt;</literal></entry>
3561               <entry>escape</entry>
3562             </row>
3563             <row>
3564               <entry><literal>&lt;up&gt;</literal></entry>
3565               <entry>up arrow</entry>
3566             </row>
3567             <row>
3568               <entry><literal>&lt;down&gt;</literal></entry>
3569               <entry>down arrow</entry>
3570             </row>
3571             <row>
3572               <entry><literal>&lt;left&gt;</literal></entry>
3573               <entry>left arrow</entry>
3574             </row>
3575             <row>
3576               <entry><literal>&lt;right&gt;</literal></entry>
3577               <entry>right arrow</entry>
3578             </row>
3579             <row>
3580               <entry><literal>&lt;pageup&gt;</literal></entry>
3581               <entry>Page Up</entry>
3582             </row>
3583             <row>
3584               <entry><literal>&lt;pagedown&gt;</literal></entry>
3585               <entry>Page Down</entry>
3586             </row>
3587             <row>
3588               <entry><literal>&lt;backspace&gt;</literal></entry>
3589               <entry>Backspace</entry>
3590             </row>
3591             <row>
3592               <entry><literal>&lt;delete&gt;</literal></entry>
3593               <entry>Delete</entry>
3594             </row>
3595             <row>
3596               <entry><literal>&lt;insert&gt;</literal></entry>
3597               <entry>Insert</entry>
3598             </row>
3599             <row>
3600               <entry><literal>&lt;enter&gt;</literal></entry>
3601               <entry>Enter</entry>
3602             </row>
3603             <row>
3604               <entry><literal>&lt;return&gt;</literal></entry>
3605               <entry>Return</entry>
3606             </row>
3607             <row>
3608               <entry><literal>&lt;home&gt;</literal></entry>
3609               <entry>Home</entry>
3610             </row>
3611             <row>
3612               <entry><literal>&lt;end&gt;</literal></entry>
3613               <entry>End</entry>
3614             </row>
3615             <row>
3616               <entry><literal>&lt;space&gt;</literal></entry>
3617               <entry>Space bar</entry>
3618             </row>
3619             <row>
3620               <entry><literal>&lt;f1&gt;</literal></entry>
3621               <entry>function key 1</entry>
3622             </row>
3623             <row>
3624               <entry><literal>&lt;f10&gt;</literal></entry>
3625               <entry>function key 10</entry>
3626             </row>
3627           </tbody>
3628         </tgroup>
3629       </table>
3630         
3631       </para>
3632       
3633       <para>
3634         <emphasis>key</emphasis> does not need to be enclosed in quotes unless
3635         it contains a
3636         space (`` '').
3637       </para>
3638       
3639       <para>
3640         <emphasis>function</emphasis> specifies which action to take when <emphasis>
3641           key
3642         </emphasis>
3643         is pressed.
3644         For a complete list of functions, see the <link linkend="functions">functions</link>. 
3645         The special function <literal>noop</literal> unbinds the specified key
3646         sequence.
3647       </para>
3648       
3649       <para>
3650         
3651       </para>
3652       
3653     </sect1>
3654     
3655     <sect1 id="charset-hook">
3656       <title>Defining aliases for character sets</title>
3657
3658       <anchor id="iconv-hook"/>
3659       <para>
3660         Usage: <muttng-doc:hook name="charset"/> <emphasis>alias</emphasis> <emphasis> charset</emphasis>
3661       </para>
3662       <para>
3663         Usage: <muttng-doc:hook name="iconv"/> <emphasis>charset</emphasis> <emphasis> local-charset </emphasis>
3664       </para>
3665       
3666       <para>
3667         The <muttng-doc:hook name="charset"/> command defines an alias for a
3668         character set.
3669         This is useful to properly display messages which are tagged with a
3670         character set name not known to mutt.
3671       </para>
3672       
3673       <para>
3674         The <muttng-doc:hook name="iconv"/> command defines a system-specific
3675         name for a
3676         character set.  This is helpful when your systems character
3677         conversion library insists on using strange, system-specific names
3678         for character sets.
3679       </para>
3680       
3681       <para>
3682         
3683       </para>
3684       
3685     </sect1>
3686     
3687     <sect1 id="folder-hook">
3688       <title>Setting variables based upon mailbox</title>
3689       
3690       <para>
3691         Usage: <muttng-doc:hook name="folder"/> [!]<emphasis>regexp</emphasis> <emphasis>command</emphasis>
3692       </para>
3693       
3694       <para>
3695         It is often desirable to change settings based on which mailbox you are
3696         reading.  The <muttng-doc:hook name="folder"/> command provides a method by which you can
3697         execute
3698         any configuration command.  <emphasis>regexp</emphasis> is a regular
3699         expression specifying
3700         in which mailboxes to execute <emphasis>command</emphasis> before
3701         loading.  If a mailbox
3702         matches multiple <muttng-doc:hook name="folder"/>'s, they are executed in the order given in
3703         the
3704         muttrc.
3705       </para>
3706       
3707       <para>
3708         <emphasis role="bold">Note:</emphasis> if you use the ``!'' shortcut
3709         for <muttng-doc:varref name="spoolfile"/> at the beginning of the
3710         pattern, you must place it
3711         inside of double or single quotes in order to distinguish it from the
3712         logical <emphasis>not</emphasis> operator for the expression.
3713       </para>
3714       
3715       <para>
3716         Note that the settings are <emphasis>not</emphasis> restored when you
3717         leave the mailbox.
3718         For example, a command action to perform is to change the sorting
3719         methodbased upon the mailbox being read:
3720       </para>
3721       
3722       <para>
3723         
3724         <muttng-doc:lstconf>
3725 folder-hook mutt set sort=threads</muttng-doc:lstconf>
3726         
3727       </para>
3728       
3729       <para>
3730         However, the sorting method is not restored to its previous value when
3731         reading a different mailbox.  To specify a <emphasis>default</emphasis>
3732         command, use the
3733         pattern ``.'':
3734       </para>
3735       
3736       <para>
3737         
3738         <muttng-doc:lstconf>
3739 folder-hook . set sort=date-sent</muttng-doc:lstconf>
3740         
3741       </para>
3742       
3743       <para>
3744         
3745       </para>
3746       
3747     </sect1>
3748     
3749     <sect1>
3750       <title>Keyboard macros</title>
3751       
3752       <para>
3753         <muttng-doc:cmddef name="macro">
3754           menu key sequence [description]
3755         </muttng-doc:cmddef>
3756       </para>
3757       
3758       <para>
3759         Macros are useful when you would like a single key to perform a series
3760         of
3761         actions.  When you press <emphasis>key</emphasis> in menu <emphasis>
3762           menu
3763         </emphasis>
3764         ,Mutt-ng will behave as if
3765         you had typed <emphasis>sequence</emphasis>.  So if you have a common
3766         sequence of commands
3767         you type, you can create a macro to execute those commands with a
3768         singlekey.
3769       </para>
3770       
3771       <para>
3772         <emphasis>menu</emphasis> is the <link linkend="maps">maps</link> which
3773         the macro will be bound.
3774         Multiple maps may be specified by separating multiple menu arguments by
3775         commas. Whitespace may not be used in between the menu arguments and
3776         thecommas separating them.
3777       </para>
3778       
3779       <para>
3780         <emphasis>key</emphasis> and <emphasis>sequence</emphasis> are
3781         expanded by the same rules as the <muttng-doc:cmdref
3782           name="bind"/>.  There are some additions however.  The first
3783         is that control characters in <emphasis>sequence</emphasis> can
3784         also be specified as <literal>^x</literal>.  In order to get a
3785         caret (`^'') you need to specify it twice.  Secondly,
3786         to specify a certain key such as <emphasis>up</emphasis> or to
3787         invoke a function directly, you can use the format
3788         <emphasis>&lt;key name&gt;</emphasis> and <emphasis>&lt;function
3789           name&gt; </emphasis> .For a listing of key names see the
3790         section on <muttng-doc:cmdref name="bind"/>.  Functions are
3791         listed in the <link linkend="functions">functions</link>.
3792       </para>
3793       
3794       <para>
3795         The advantage with using function names directly is that the macros
3796         willwork regardless of the current key bindings, so they are not
3797         dependent on
3798         the user having particular key definitions.  This makes them more
3799         robustand portable, and also facilitates defining of macros in files
3800         used by more
3801         than one user (eg. the system Muttngrc).
3802       </para>
3803       
3804       <para>
3805         Optionally you can specify a descriptive text after <emphasis>sequence</emphasis>,
3806         which is shown in the help screens.
3807       </para>
3808       
3809       <para>
3810         <emphasis role="bold">Note:</emphasis> Macro definitions (if any)
3811         listed in the help screen(s), are
3812         silently truncated at the screen width, and are not wrapped.   
3813       </para>
3814       
3815       <para>
3816         
3817       </para>
3818       
3819     </sect1>
3820     
3821     <sect1>
3822       <title>Using color and mono video attributes</title>
3823
3824       <para>
3825         <muttng-doc:cmddef name="color">object foreground background [regexp]</muttng-doc:cmddef>
3826       </para>
3827       <para>
3828         <muttng-doc:cmddef name="color" noanchor="1">index foreground pattern</muttng-doc:cmddef>
3829       </para>
3830       <para>
3831         <muttng-doc:cmddef name="uncolor">index pattern [pattern ...]</muttng-doc:cmddef>
3832       </para>
3833       
3834       <para>
3835         If your terminal supports color, you can spice up Mutt-ng by creating
3836         your own
3837         color scheme.  To define the color of an object (type of information),
3838         you
3839         must specify both a foreground color <emphasis role="bold">and</emphasis> a background color (it is not
3840         possible to only specify one or the other).
3841       </para>
3842       
3843       <para>
3844         <emphasis>object</emphasis> can be one of:
3845       </para>
3846       
3847       <para>
3848         
3849         <itemizedlist>
3850           <listitem>
3851             
3852             <para>
3853               attachment
3854             </para>
3855           </listitem>
3856           <listitem>
3857             
3858             <para>
3859               body (match <emphasis>regexp</emphasis> in the body of messages)
3860             </para>
3861           </listitem>
3862           <listitem>
3863             
3864             <para>
3865               bold (highlighting bold patterns in the body of messages)
3866             </para>
3867           </listitem>
3868           <listitem>
3869             
3870             <para>
3871               error (error messages printed by Mutt-ng)
3872             </para>
3873           </listitem>
3874           <listitem>
3875             
3876             <para>
3877               header (match <emphasis>regexp</emphasis> in the message header)
3878             </para>
3879           </listitem>
3880           <listitem>
3881             
3882             <para>
3883               hdrdefault (default color of the message header in the pager)
3884             </para>
3885           </listitem>
3886           <listitem>
3887             
3888             <para>
3889               index (match <emphasis>pattern</emphasis> in the message index)
3890             </para>
3891           </listitem>
3892           <listitem>
3893             
3894             <para>
3895               indicator (arrow or bar used to indicate the current item in a
3896               menu)
3897             </para>
3898           </listitem>
3899           <listitem>
3900             
3901             <para>
3902               markers (the ``+'' markers at the beginning of wrapped lines in
3903               the pager)
3904             </para>
3905           </listitem>
3906           <listitem>
3907             
3908             <para>
3909               message (informational messages)
3910             </para>
3911           </listitem>
3912           <listitem>
3913             
3914             <para>
3915               normal
3916             </para>
3917           </listitem>
3918           <listitem>
3919             
3920             <para>
3921               quoted (text matching <muttng-doc:varref name="quote-regexp"/> in the body of a message)
3922             </para>
3923           </listitem>
3924           <listitem>
3925             
3926             <para>
3927               quoted1, quoted2, ..., quoted<emphasis role="bold">N</emphasis>
3928               (higher levels of quoting)
3929             </para>
3930           </listitem>
3931           <listitem>
3932             
3933             <para>
3934               search (highlighting of words in the pager)
3935             </para>
3936           </listitem>
3937           <listitem>
3938             
3939             <para>
3940               signature
3941             </para>
3942           </listitem>
3943           <listitem>
3944             
3945             <para>
3946               status (mode lines used to display info about the mailbox or
3947               message)
3948             </para>
3949           </listitem>
3950           <listitem>
3951             
3952             <para>
3953               tilde (the ``~'' used to pad blank lines in the pager)
3954             </para>
3955           </listitem>
3956           <listitem>
3957             
3958             <para>
3959               tree (thread tree drawn in the message index and attachment menu)
3960             </para>
3961           </listitem>
3962           <listitem>
3963             
3964             <para>
3965               underline (highlighting underlined patterns in the body of
3966               messages)
3967             </para>
3968           </listitem>
3969           
3970         </itemizedlist>
3971         
3972       </para>
3973       
3974       <para>
3975         <emphasis>foreground</emphasis> and <emphasis>background</emphasis> can
3976         be one of the following:
3977       </para>
3978       
3979       <para>
3980         
3981         <itemizedlist>
3982           <listitem>
3983             
3984             <para>
3985               white
3986             </para>
3987           </listitem>
3988           <listitem>
3989             
3990             <para>
3991               black
3992             </para>
3993           </listitem>
3994           <listitem>
3995             
3996             <para>
3997               green
3998             </para>
3999           </listitem>
4000           <listitem>
4001             
4002             <para>
4003               magenta
4004             </para>
4005           </listitem>
4006           <listitem>
4007             
4008             <para>
4009               blue
4010             </para>
4011           </listitem>
4012           <listitem>
4013             
4014             <para>
4015               cyan
4016             </para>
4017           </listitem>
4018           <listitem>
4019             
4020             <para>
4021               yellow
4022             </para>
4023           </listitem>
4024           <listitem>
4025             
4026             <para>
4027               red
4028             </para>
4029           </listitem>
4030           <listitem>
4031             
4032             <para>
4033               default
4034             </para>
4035           </listitem>
4036           <listitem>
4037             
4038             <para>
4039               color<emphasis>x</emphasis>
4040             </para>
4041           </listitem>
4042           
4043         </itemizedlist>
4044         
4045       </para>
4046       
4047       <para>
4048         <emphasis>foreground</emphasis> can optionally be prefixed with the
4049         keyword <literal>bright</literal> to make
4050         the foreground color boldfaced (e.g., <literal>brightred</literal>).
4051       </para>
4052       
4053       <para>
4054         If your terminal supports it, the special keyword <emphasis>default</emphasis> can be
4055         used as a transparent color.  The value <emphasis>brightdefault</emphasis> is also valid.
4056         If Mutt-ng is linked against the <emphasis>S-Lang</emphasis> library,
4057         you also need to set
4058         the <muttng-doc:envvar name="COLORFGBG"/> environment variable to the default
4059         colors of your
4060         terminal for this to work; for example (for Bourne-like shells):
4061       </para>
4062       
4063       <para>
4064         
4065         <muttng-doc:lstshell>
4066 set COLORFGBG="green;black"
4067 export COLORFGBG</muttng-doc:lstshell>
4068         
4069       </para>
4070       
4071       <para>
4072         <emphasis role="bold">Note:</emphasis> The <emphasis>S-Lang</emphasis>
4073         library requires you to use the <emphasis>lightgray</emphasis>
4074         and <emphasis>brown</emphasis> keywords instead of <emphasis>white</emphasis> and <emphasis>
4075           yellow
4076         </emphasis>
4077         when
4078         setting this variable.
4079       </para>
4080       
4081       <para>
4082         <emphasis role="bold">Note:</emphasis> The uncolor command can be
4083         applied to the index object only.  It
4084         removes entries from the list. You <emphasis role="bold">must</emphasis> specify the same pattern
4085         specified in the color command for it to be removed.  The pattern ``*''
4086         is
4087         a special token which means to clear the color index list of all
4088         entries.
4089       </para>
4090       
4091       <para>
4092         Mutt-ng also recognizes the keywords <emphasis>color0</emphasis>, <emphasis>
4093           color1
4094         </emphasis>
4095         ,...,
4096         <emphasis>color</emphasis><emphasis role="bold">N-1</emphasis> (<emphasis role="bold">
4097           N
4098         </emphasis>
4099         being the number of colors supported
4100         by your terminal).  This is useful when you remap the colors for your
4101         display (for example by changing the color associated with <emphasis>
4102           color2
4103         </emphasis>
4104         for your xterm), since color names may then lose their normal meaning.
4105       </para>
4106       
4107       <para>
4108         If your terminal does not support color, it is still possible change
4109         the video
4110         attributes through the use of the ``mono'' command:
4111       </para>
4112       
4113       <para>
4114         <muttng-doc:cmddef name="mono">object attribute [regexp]</muttng-doc:cmddef>
4115       </para>
4116       <para>
4117         <muttng-doc:cmddef name="mono" noanchor="1">index attribute pattern</muttng-doc:cmddef>
4118       </para>
4119       <para>
4120         <muttng-doc:cmddef name="unmono">index pattern [pattern ...]</muttng-doc:cmddef>
4121       </para>
4122       
4123       <para>
4124         where <emphasis>attribute</emphasis> is one of the following:
4125       </para>
4126       
4127       <para>
4128         
4129         <itemizedlist>
4130           <listitem>
4131             
4132             <para>
4133               none
4134             </para>
4135           </listitem>
4136           <listitem>
4137             
4138             <para>
4139               bold
4140             </para>
4141           </listitem>
4142           <listitem>
4143             
4144             <para>
4145               underline
4146             </para>
4147           </listitem>
4148           <listitem>
4149             
4150             <para>
4151               reverse
4152             </para>
4153           </listitem>
4154           <listitem>
4155             
4156             <para>
4157               standout
4158             </para>
4159           </listitem>
4160           
4161         </itemizedlist>
4162         
4163       </para>
4164       
4165       <para>
4166         
4167       </para>
4168       
4169     </sect1>
4170     
4171     <sect1>
4172       <title>Ignoring (weeding) unwanted message headers</title>
4173
4174       <para>
4175         <muttng-doc:cmddef name="ignore">pattern [pattern ...]</muttng-doc:cmddef>
4176       </para>
4177
4178       <para>
4179         <muttng-doc:cmddef name="unignore">pattern [pattern ...]</muttng-doc:cmddef>
4180       </para>
4181  
4182       <para>
4183         Messages often have many header fields added by automatic processing
4184         systems,
4185         or which may not seem useful to display on the screen.  This command
4186         allows
4187         you to specify header fields which you don't normally want to see.
4188       </para>
4189       
4190       <para>
4191         You do not need to specify the full header field name.  For example,
4192         ``ignore content-'' will ignore all header fields that begin with the
4193         pattern
4194         ``content-''. ``ignore *'' will ignore all headers.
4195       </para>
4196       
4197       <para>
4198         To remove a previously added token from the list, use the ``unignore''
4199         command.
4200         The ``unignore'' command will make Mutt-ng display headers with the
4201         given pattern.
4202         For example, if you do ``ignore x-'' it is possible to ``unignore
4203         x-mailer''.
4204       </para>
4205       
4206       <para>
4207         ``unignore *'' will remove all tokens from the ignore list.
4208       </para>
4209       
4210       <para>
4211         For example:
4212         
4213         <muttng-doc:lstconf>
4214 # Sven's draconian header weeding
4215 ignore *
4216 unignore from date subject to cc
4217 unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
4218 unignore posted-to:</muttng-doc:lstconf>
4219         
4220       </para>
4221       
4222       <para>
4223         
4224       </para>
4225       
4226     </sect1>
4227     
4228     <sect1>
4229       <title>Alternative addresses</title>
4230       
4231       <para>
4232         <muttng-doc:cmddef name="alternates">regexp [regexp ...]</muttng-doc:cmddef>
4233       </para>
4234
4235       <para>
4236         <muttng-doc:cmddef name="unalternates">regexp [regexp ...]</muttng-doc:cmddef>
4237       </para>
4238  
4239       <para>
4240         With various functions, mutt will treat messages differently,
4241         depending on whether you sent them or whether you received them from
4242         someone else.  For instance, when replying to a message that you
4243         sent to a different party, mutt will automatically suggest to send
4244         the response to the original message's recipients--responding to
4245         yourself won't make much sense in many cases.
4246         (See <muttng-doc:varref name="reply-to"/>.)
4247       </para>
4248       
4249       <para>
4250         Many users receive e-mail under a number of different addresses. To
4251         fully use mutt's features here, the program must be able to
4252         recognize what e-mail addresses you receive mail under. That's the
4253         purpose of the <literal>alternates</literal> command: It takes a list
4254         of regular
4255         expressions, each of which can identify an address under which you
4256         receive e-mail.
4257       </para>
4258       
4259       <para>
4260         The <literal>unalternates</literal> command can be used to write
4261         exceptions to
4262         <literal>alternates</literal> patterns. If an address matches something
4263         in an
4264         <literal>alternates</literal> command, but you nonetheless do not think
4265         it is
4266         from you, you can list a more precise pattern under an <literal>
4267           unalternates
4268         </literal>
4269         command.
4270       </para>
4271       
4272       <para>
4273         To remove a regular expression from the <literal>alternates</literal>
4274         list, use the
4275         <literal>unalternates</literal> command with exactly the same <emphasis>
4276           regexp
4277         </emphasis>
4278         .
4279         Likewise, if the <emphasis>regexp</emphasis> for a <literal>alternates</literal> command matches
4280         an entry on the <literal>unalternates</literal> list, that <literal>
4281           unalternates
4282         </literal>
4283         entry will be removed. If the <emphasis>regexp</emphasis> for <literal>
4284           unalternates
4285         </literal>
4286         is ``*'', <emphasis>all entries</emphasis> on <literal>alternates</literal> will be removed.
4287       </para>
4288       
4289       <para>
4290         
4291       </para>
4292       
4293     </sect1>
4294     
4295     <sect1 id="format-flowed">
4296       <title>Format = Flowed</title>
4297       
4298       <sect2 id="format-flowed-intro">
4299         <title>Introduction</title>
4300         
4301         <para>
4302           Mutt-ng contains support for so-called <literal>format=flowed</literal> messages.
4303           In the beginning of email, each message had a fixed line width, and
4304           it was enough for displaying them on fixed-size terminals. But times
4305           changed, and nowadays hardly anybody still uses fixed-size terminals:
4306           more people nowaydays use graphical user interfaces, with dynamically
4307           resizable windows. This led to the demand of a new email format that
4308           makes it possible for the email client to make the email look nice
4309           in a resizable window without breaking quoting levels and creating
4310           an incompatible email format that can also be displayed nicely on
4311           old fixed-size terminals.
4312         </para>
4313         
4314         <para>
4315           For introductory information on <literal>format=flowed</literal>
4316           messages, see
4317           <muttng-doc:web url="http://www.joeclark.org/ffaq.html"/>.
4318         </para>
4319         
4320       </sect2>
4321       
4322       <sect2 id="format-flowed-display">
4323         <title>Receiving: Display Setup</title>
4324         
4325         <para>
4326           When you receive emails that are marked as <literal>format=flowed</literal>
4327           messages, and is formatted correctly, mutt-ng will try to reformat
4328           the message to optimally fit on your terminal. If you want a fixed
4329           margin on the right side of your terminal, you can set the
4330           following:
4331         </para>
4332         
4333         <para>
4334           
4335           <muttng-doc:lstconf>
4336 set wrapmargin = 10</muttng-doc:lstconf>
4337           
4338         </para>
4339         
4340         <para>
4341           The code above makes the line break 10 columns before the right
4342           side of the terminal.
4343         </para>
4344         
4345         <para>
4346           If your terminal is so wide that the lines are embarrassingly long,
4347           you can also set a maximum line length:
4348         </para>
4349         
4350         <para>
4351           
4352           <muttng-doc:lstconf>
4353 set max_line_length = 120</muttng-doc:lstconf>
4354           
4355         </para>
4356         
4357         <para>
4358           The example above will give you lines not longer than 120
4359           characters.
4360         </para>
4361         
4362         <para>
4363           When you view at <literal>format=flowed</literal> messages, you will
4364           often see
4365           the quoting hierarchy like in the following example:
4366         </para>
4367         
4368         <para>
4369           
4370           <muttng-doc:lstmail>
4371 &gt;Bill, can you please send last month's progress report to Mr. 
4372 &gt;Morgan? We also urgently need the cost estimation for the new 
4373 &gt;production server that we want to set up before our customer's 
4374 &gt;project will go live.</muttng-doc:lstmail>
4375           
4376         </para>
4377         
4378         <para>
4379           This obviously doesn't look very nice, and it makes it very
4380           hard to differentiate between text and quoting character. The
4381           solution is to configure mutt-ng to "stuff" the quoting:
4382         </para>
4383         
4384         <para>
4385           
4386           <muttng-doc:lstconf>
4387 set stuff_quoted</muttng-doc:lstconf>
4388           
4389         </para>
4390         
4391         <para>
4392           This will lead to a nicer result that is easier to read:
4393         </para>
4394         
4395         <para>
4396           
4397           <muttng-doc:lstmail>
4398 &gt; Bill, can you please send last month's progress report to Mr. 
4399 &gt; Morgan? We also urgently need the cost estimation for the new 
4400 &gt; production server that we want to set up before our customer's
4401 &gt; project will go live.</muttng-doc:lstmail>
4402           
4403         </para>
4404         
4405       </sect2>
4406       
4407       <sect2 id="format-flowed-send">
4408         <title>Sending</title>
4409         
4410         <para>
4411           If you want mutt-ng to send emails with <literal>format=flowed</literal> set, you
4412           need to explicitly set it:
4413         </para>
4414         
4415         <para>
4416           
4417           <muttng-doc:lstconf>
4418 set text_flowed</muttng-doc:lstconf>
4419           
4420         </para>
4421         
4422         <para>
4423           Additionally, you have to use an editor which supports writing
4424           <literal>format=flowed</literal>-conforming emails. For <muttng-doc:man name="vim"/>, this is
4425           done by
4426           adding <literal>w</literal> to the formatoptions (see <literal>:h
4427             formatoptions
4428           </literal>
4429           and
4430           <literal>:h fo-table</literal>) when writing emails.
4431         </para>
4432         
4433         <para>
4434           Also note that <emphasis>format=flowed</emphasis> knows about
4435           ``space-stuffing'',
4436           that is, when sending messages, some kinds of lines have to be
4437           indented with a single space on the sending side. On the receiving
4438           side, the first space (if any) is removed. As a consequence and in
4439           addition to the above simple setting, please keep this in mind when
4440           making manual formattings within the editor. Also note that mutt-ng
4441           currently violates the standard (<muttng-doc:rfc num="3676"/>) as it does not
4442           space-stuff lines starting with:
4443         </para>
4444         
4445         <para>
4446           
4447           <itemizedlist>
4448             <listitem>
4449               <para>
4450                 <literal>&gt;</literal> This is <emphasis>not</emphasis> the
4451                 quote character but a right
4452                 angle used for other reasons
4453                 
4454               </para>
4455             </listitem>
4456           </itemizedlist>
4457           
4458         </para>
4459         
4460         <para>
4461           Please make sure that you manually prepend a space to each of them.
4462         </para>
4463         
4464       </sect2>
4465       
4466       <sect2 id="format-flowed-notes">
4467         <title>Additional Notes</title>
4468         
4469         <para>
4470           For completeness, the <muttng-doc:varref name="delete-space"/> variable provides the mechanism
4471           to generate a <literal>DelSp=yes</literal> parameter on <emphasis>
4472             outgoing
4473           </emphasis>
4474           messages.
4475           According to the standard, clients receiving a <literal>format=flowed</literal>
4476           messages should delete the last space of a flowed line but still
4477           interpret the line as flowed. Because flowed lines usually contain
4478           only one space at the end, this parameter would make the receiving
4479           client concatenate the last word of the previous with the first of
4480           the current line <emphasis>without</emphasis> a space. This makes
4481           ordinary text
4482           unreadable and is intended for languages rarely using spaces. So
4483           please use this setting only if you're sure what you're doing.
4484         </para>
4485         
4486         <para>
4487           
4488         </para>
4489         
4490       </sect2>
4491       
4492     </sect1>
4493     
4494     <sect1>
4495       <title>Mailing lists</title>
4496       
4497       <para>
4498         <muttng-doc:cmddef name="lists">regexp [regexp ...]</muttng-doc:cmddef>
4499       </para>
4500       <para>
4501         <muttng-doc:cmddef name="unlists">regexp [regexp ...]</muttng-doc:cmddef>
4502       </para>
4503       <para>
4504         <muttng-doc:cmddef name="subscribe">regexp [regexp ...]</muttng-doc:cmddef>
4505       </para>
4506       <para>
4507         <muttng-doc:cmddef name="unsubscribe">regexp [regexp ...]</muttng-doc:cmddef>
4508       </para>
4509       
4510       <para>
4511         Mutt-ng has a few nice features for <link linkend="using-lists">using-lists</link>. 
4512         In order to take advantage of them, you must
4513         specify which addresses belong to mailing lists, and which mailing
4514         lists you are subscribed to.  Once you have done this, the
4515         <link linkend="func-list-reply">list-reply</link>
4516         function will work for all known lists.
4517         Additionally, when you send a message to a subscribed list, mutt will
4518         add a Mail-Followup-To header to tell other users' mail user agents
4519         not to send copies of replies to your personal address.   Note that
4520         the Mail-Followup-To header is a non-standard extension which is not
4521         supported by all mail user agents.  Adding it is not bullet-proof
4522         against
4523         receiving personal CCs of list messages.  Also note that the generation
4524         of the Mail-Followup-To header is controlled by the
4525         <muttng-doc:varref name="followup-to"/>
4526         configuration variable.
4527       </para>
4528       
4529       <para>
4530         More precisely, Mutt-ng maintains lists of patterns for the addresses
4531         of known and subscribed mailing lists.  Every subscribed mailing
4532         list is known. To mark a mailing list as known, use the ``lists''
4533         command.  To mark it as subscribed, use ``subscribe''.
4534       </para>
4535       
4536       <para>
4537         You can use regular expressions with both commands.  To mark all
4538         messages sent to a specific bug report's address on mutt's bug
4539         tracking system as list mail, for instance, you could say
4540         ``subscribe [0-9]*@bugs.guug.de''.  Often, it's sufficient to just
4541         give a portion of the list's e-mail address.
4542       </para>
4543       
4544       <para>
4545         Specify as much of the address as you need to to remove ambiguity.  For
4546         example, if you've subscribed to the Mutt-ng mailing list, you will
4547         receive mail
4548         addressed to <emphasis>mutt-users@mutt.org</emphasis>.  So, to tell
4549         Mutt-ng that this is a
4550         mailing list, you could add ``lists mutt-users'' to your
4551         initialization file.  To tell mutt that you are subscribed to it,
4552         add ``subscribe mutt-users'' to your initialization file instead.
4553         If you also happen to get mail from someone whose address is
4554         <emphasis>mutt-users@example.com</emphasis>, you could use ``lists
4555         mutt-users@mutt\\.org'' 
4556         or ``subscribe mutt-users@mutt\\.org'' to
4557         match only mail from the actual list.
4558       </para>
4559       
4560       <para>
4561         The ``unlists'' command is used to remove a token from the list of
4562         known and subscribed mailing-lists. Use ``unlists *'' to remove all
4563         tokens.
4564       </para>
4565       
4566       <para>
4567         To remove a mailing list from the list of subscribed mailing lists,
4568         but keep it on the list of known mailing lists, use ``unsubscribe''.
4569       </para>
4570       
4571       <para>
4572         
4573       </para>
4574       
4575     </sect1>
4576     
4577     <sect1 id="mbox-hook">
4578       <title>Using Multiple spool mailboxes</title>
4579       
4580       <para>
4581         Usage: <muttng-doc:hook name="mbox"/> [!]<emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
4582       </para>
4583       
4584       <para>
4585         This command is used to move read messages from a specified mailbox to
4586         adifferent mailbox automatically when you quit or change folders.
4587         <emphasis>pattern</emphasis> is a regular expression specifying the
4588         mailbox to treat as a
4589         ``spool'' mailbox and <emphasis>mailbox</emphasis> specifies where mail
4590         should be saved when
4591         read.
4592       </para>
4593       
4594       <para>
4595         Unlike some of the other <emphasis>hook</emphasis> commands, only the <emphasis>
4596           first
4597         </emphasis>
4598         matching
4599         pattern is used (it is not possible to save read mail in more than a
4600         single
4601         mailbox).
4602       </para>
4603       
4604       <para>
4605         
4606       </para>
4607       
4608     </sect1>
4609     
4610     <sect1>
4611       <title>Defining mailboxes which receive mail</title>
4612
4613       <para>
4614         <muttng-doc:cmddef name="mailboxes"> [!]filename [filename ... ]</muttng-doc:cmddef>
4615       </para>
4616       <para>
4617         <muttng-doc:cmddef name="unmailboxes"> [!]filename [filename ... ]</muttng-doc:cmddef>
4618       </para>
4619  
4620       <para>
4621         This command specifies folders which can receive mail and
4622         which will be checked for new messages.  By default, the
4623         main menu status bar displays how many of these folders have
4624         new messages.
4625       </para>
4626       
4627       <para>
4628         When changing folders, pressing <emphasis>space</emphasis> will cycle
4629         through folders with new mail.
4630       </para>
4631       
4632       <para>
4633         Pressing TAB in the directory browser will bring up a menu showing the
4634         files
4635         specified by the <literal>mailboxes</literal> command, and indicate
4636         which contain new
4637         messages.  Mutt-ng will automatically enter this mode when invoked from
4638         the
4639         command line with the <literal>-y</literal> option.
4640       </para>
4641       
4642       <para>
4643         The ``unmailboxes'' command is used to remove a token from the list
4644         of folders which receive mail. Use ``unmailboxes *'' to remove all
4645         tokens.
4646       </para>
4647       
4648       <para>
4649         <emphasis role="bold">Note:</emphasis> new mail is detected by
4650         comparing the last modification time to
4651         the last access time.  Utilities like <literal>biff</literal> or <literal>
4652           frm
4653         </literal>
4654         or any other
4655         program which accesses the mailbox might cause Mutt-ng to never detect
4656         new mail
4657         for that mailbox if they do not properly reset the access time.  Backup
4658         tools are another common reason for updated access times.
4659       </para>
4660       
4661       <para>
4662         <emphasis role="bold">Note:</emphasis> the filenames in the <literal>
4663           mailboxes
4664         </literal>
4665         command are resolved when
4666         the command is executed, so if these names contain <link linkend="shortcuts">shortcuts</link>
4667         (such as ``='' and ``!''), any variable
4668         definition that affect these characters (like <muttng-doc:varref name="folder"/>
4669         and <muttng-doc:varref name="spoolfile"/>)
4670         should be executed before the <literal>mailboxes</literal> command.
4671       </para>
4672       
4673       <para>
4674         
4675       </para>
4676       
4677     </sect1>
4678     
4679     <sect1>
4680       <title>User defined headers</title>
4681       
4682       <para>
4683         <muttng-doc:cmddef name="my_hdr">string</muttng-doc:cmddef>
4684       </para>
4685       <para>
4686         <muttng-doc:cmddef name="unmy_hdr">field [field ...]</muttng-doc:cmddef>
4687       </para>
4688       
4689       <para>
4690         The ``my_hdr'' command allows you to create your own header
4691         fields which will be added to every message you send.
4692       </para>
4693       
4694       <para>
4695         For example, if you would like to add an ``Organization:'' header field
4696         to
4697         all of your outgoing messages, you can put the command
4698       </para>
4699       
4700       <para>
4701         <muttng-doc:lstconf>
4702 my_hdr Organization: A Really Big Company, Anytown, USA</muttng-doc:lstconf>
4703       </para>
4704       
4705       <para>
4706         in your <literal>.muttrc</literal>.
4707       </para>
4708       
4709       <para>
4710         <emphasis role="bold">Note:</emphasis>  space characters are <emphasis>
4711           not
4712         </emphasis>
4713         allowed between the keyword and
4714         the colon (``:'').  The standard for electronic mail (<muttng-doc:rfc num="822"/>) says that
4715         space is illegal there, so Mutt-ng enforces the rule.
4716       </para>
4717       
4718       <para>
4719         If you would like to add a header field to a single message, you should
4720         either set the <muttng-doc:varref name="edit-headers"/>
4721         variable,
4722         or use the <emphasis>edit-headers</emphasis> function (default: ``E'')
4723         in the send-menu so
4724         that you can edit the header of your message along with the body.
4725       </para>
4726       
4727       <para>
4728         To remove user defined header fields, use the ``unmy_hdr''
4729         command.  You may specify an asterisk (``*'') to remove all header
4730         fields, or the fields to remove.  For example, to remove all ``To'' and
4731         ``Cc'' header fields, you could use:
4732       </para>
4733       
4734       <para>
4735         <muttng-doc:lstconf>
4736 unmy_hdr to cc</muttng-doc:lstconf>
4737       </para>
4738       
4739       <para>
4740         
4741       </para>
4742       
4743     </sect1>
4744     
4745     <sect1>
4746       <title>Defining the order of headers when viewing messages</title>
4747       
4748       <para>
4749         <muttng-doc:cmddef name="hdr_order">header header [header ...]</muttng-doc:cmddef>
4750       </para>
4751
4752       <para>
4753         <muttng-doc:cmddef name="unhdr_order">[ * | header header ...]</muttng-doc:cmddef>
4754       </para>
4755  
4756       <para>
4757         With this command, you can specify an order in which mutt will attempt
4758         to present headers to you when viewing messages.
4759       </para>
4760       
4761       <para>
4762         ``unhdr_order *'' will clear all previous headers from the order
4763         list,
4764         thus removing the header order effects set by the system-wide startup
4765         file.
4766       </para>
4767       
4768       <para>
4769         
4770         <muttng-doc:lstconf>
4771 hdr_order From Date: From: To: Cc: Subject:</muttng-doc:lstconf>
4772         
4773       </para>
4774       
4775       <para>
4776         
4777       </para>
4778       
4779     </sect1>
4780     
4781     <sect1 id="save-hook">
4782       <title>Specify default save filename</title>
4783       
4784       <para>
4785         Usage: <muttng-doc:hook name="save"/> [!]<emphasis>pattern</emphasis> <emphasis>filename</emphasis>
4786       </para>
4787       
4788       <para>
4789         This command is used to override the default filename used when saving
4790         messages.  <emphasis>filename</emphasis> will be used as the default
4791         filename if the message is
4792         <emphasis>From:</emphasis> an address matching <emphasis>regexp</emphasis> or if you are the author and the
4793         message is addressed <emphasis>to:</emphasis> something matching <emphasis>
4794           regexp
4795         </emphasis>
4796         .
4797       </para>
4798       
4799       <para>
4800         See <muttng-doc:hook name="pattern"/> for information on
4801         the exact format of <emphasis>pattern</emphasis>.
4802       </para>
4803       
4804       <para>
4805         Examples:
4806       </para>
4807       
4808       <para>
4809         
4810         <muttng-doc:lstconf>
4811 save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins
4812 save-hook aol\\.com$ +spam</muttng-doc:lstconf>
4813         
4814       </para>
4815       
4816       <para>
4817         Also see the <muttng-doc:hook name="fcc-save"/>
4818         command.
4819       </para>
4820       
4821       <para>
4822         
4823       </para>
4824       
4825     </sect1>
4826     
4827     <sect1 id="fcc-hook">
4828       <title>Specify default Fcc: mailbox when composing</title>
4829       
4830       <para>
4831         Usage: <muttng-doc:hook name="fcc"/> [!]<emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
4832       </para>
4833       
4834       <para>
4835         This command is used to save outgoing mail in a mailbox other than
4836         <muttng-doc:varref name="record"/>. Mutt-ng searches the initial
4837         list of
4838         message recipients for the first matching <emphasis>regexp</emphasis>
4839         and uses <emphasis>mailbox</emphasis>
4840         as the default Fcc: mailbox.  If no match is found the message will be
4841         saved
4842         to <muttng-doc:varref name="record"/> mailbox.
4843       </para>
4844       
4845       <para>
4846         See <muttng-doc:hook name="pattern"/> for information on
4847         the exact format of <emphasis>pattern</emphasis>.
4848       </para>
4849       
4850       <para>
4851         Example:
4852       </para>
4853
4854       <para>
4855         <muttng-doc:lstconf>
4856 fcc-hook [@.]aol\\.com$ +spammers</muttng-doc:lstconf>
4857       </para>
4858       
4859       <para>
4860         The above will save a copy of all messages going to the aol.com
4861         domain to the `+spammers' mailbox by default.  Also see the
4862         <muttng-doc:hook name="fcc-save"/> command.
4863       </para>
4864       
4865       <para>
4866         
4867       </para>
4868       
4869     </sect1>
4870     
4871     <sect1 id="fcc-save-hook">
4872       <title>Specify default save filename and default Fcc: mailbox at once</title>
4873       
4874       <para>
4875         Usage: <literal><muttng-doc:hook name="fcc-save"/></literal> [!]<emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
4876       </para>
4877       
4878       <para>
4879         This command is a shortcut, equivalent to doing both a <muttng-doc:hook name="fcc"/>
4880         and a <muttng-doc:hook name="save"/> with its arguments.
4881       </para>
4882       
4883       <para>
4884         
4885       </para>
4886       
4887     </sect1>
4888     
4889     <sect1 id="send-hook">
4890       <title>Change settings based upon message recipients</title>
4891
4892       <anchor id="reply-hook"/>
4893       <anchor id="send2-hook"/>
4894       <para>
4895         Usage: <muttng-doc:hook name="reply"/> [!]<emphasis>pattern</emphasis> <emphasis>command</emphasis>
4896       </para>
4897       <para>
4898         Usage: <muttng-doc:hook name="send"/> [!]<emphasis>pattern</emphasis> <emphasis>command</emphasis>
4899       </para>
4900       <para>
4901         Usage: <muttng-doc:hook name="send2"/> [!]<emphasis>pattern</emphasis> <emphasis>command</emphasis>
4902       </para>
4903       
4904       <para>
4905         These commands can be used to execute arbitrary configuration commands
4906         based
4907         upon recipients of the message.  <emphasis>pattern</emphasis> is a
4908         regular expression
4909         matching the desired address.  <emphasis>command</emphasis> is executed
4910         when <emphasis>regexp</emphasis>
4911         matches recipients of the message.
4912       </para>
4913       
4914       <para>
4915         <muttng-doc:hook name="reply"/> is matched against the message you are <emphasis>
4916           replying
4917         </emphasis>
4918         <emphasis role="bold">to</emphasis>, instead of the message you are <emphasis>
4919           sending
4920         </emphasis>
4921         .<muttng-doc:hook name="send"/> is
4922         matched against all messages, both <emphasis>new</emphasis> and <emphasis>
4923           replies
4924         </emphasis>
4925         .<emphasis role="bold">Note:</emphasis>
4926         <muttng-doc:hook name="reply"/>s are matched <emphasis role="bold">before</emphasis> the
4927         <muttng-doc:hook name="send"/>, <emphasis role="bold">regardless</emphasis>
4928         of the order specified in the users's configuration file.
4929       </para>
4930       
4931       <para>
4932         <muttng-doc:hook name="send2"/> is matched every time a message is
4933         changed, either
4934         by editing it, or by using the compose menu to change its recipients
4935         or subject.  <muttng-doc:hook name="send2"/> is executed after <muttng-doc:hook name="send"/>
4936         ,and
4937         can, e.g., be used to set parameters such as the <muttng-doc:varref name="sendmail"/>
4938         variable depending on the message's sender
4939         address.
4940       </para>
4941       
4942       <para>
4943         For each type of <muttng-doc:hook name="send"/> or <muttng-doc:hook name="reply"/>, when multiple matches
4944         occur, commands are executed in the order they are specified in the
4945         muttrc
4946         (for that type of hook).
4947       </para>
4948       
4949       <para>
4950         See <muttng-doc:hook name="pattern"/> for information on
4951         the exact format of <emphasis>pattern</emphasis>.
4952       </para>
4953       
4954       <para>
4955         Example: <literal>send-hook mutt &quot;set mime_forward
4956           signature=''&quot;
4957         </literal>
4958       </para>
4959       
4960       <para>
4961         Another typical use for this command is to change the values of the
4962         <muttng-doc:varref name="attribution"/>,
4963         <muttng-doc:varref name="signature"/> and <muttng-doc:varref
4964           name="locale"/>
4965         variables in order to change the language of the attributions and
4966         signatures based upon the recipients.
4967       </para>
4968       
4969       <para>
4970         <emphasis role="bold">Note:</emphasis> the <muttng-doc:hook name="send"/>'s are only
4971         executed ONCE after getting the initial
4972         list of recipients.  Adding a recipient after replying or editing the
4973         message will NOT cause any <muttng-doc:hook name="send"/> to be executed.  Also note that
4974         my_hdr commands which modify recipient headers, or the message's
4975         subject, don't have any effect on the current message when executed
4976         from a <muttng-doc:hook name="send"/>.
4977       </para>
4978       
4979       <para>
4980         
4981       </para>
4982       
4983     </sect1>
4984     
4985     <sect1 id="message-hook">
4986       <title>Change settings before formatting a message</title>
4987       
4988       <para>
4989         Usage: <muttng-doc:hook name="message"/> [!]<emphasis>pattern</emphasis> <emphasis>command</emphasis>
4990       </para>
4991       
4992       <para>
4993         This command can be used to execute arbitrary configuration commands
4994         before viewing or formatting a message based upon information about the
4995         message.
4996         <emphasis>command</emphasis> is executed if the <emphasis>pattern</emphasis> matches the message to be
4997         displayed. When multiple matches occur, commands are executed in the
4998         order
4999         they are specified in the muttrc.
5000       </para>
5001       
5002       <para>
5003         See <muttng-doc:hook name="pattern"/> for
5004         information on the exact format of <emphasis>pattern</emphasis>.
5005       </para>
5006       
5007       <para>
5008         Example:
5009         
5010         <muttng-doc:lstconf>
5011 message-hook ~A 'set pager=builtin'
5012 message-hook '~f freshmeat-news' 'set pager="less \"+/^  subject:.*\""'</muttng-doc:lstconf>
5013         
5014       </para>
5015       
5016       <para>
5017         
5018       </para>
5019       
5020     </sect1>
5021     
5022     <sect1 id="crypt-hook">
5023       <title>Choosing the cryptographic key of the recipient</title>
5024       
5025       <para>
5026         Usage: <muttng-doc:hook name="crypt"/> <emphasis>pattern</emphasis> <emphasis>keyid</emphasis>
5027       </para>
5028       
5029       <para>
5030         When encrypting messages with PGP or OpenSSL, you may want to associate
5031         a certain
5032         key with a given e-mail address automatically, either because the
5033         recipient's public key can't be deduced from the destination address,
5034         or because, for some reasons, you need to override the key Mutt-ng
5035         wouldnormally use.  The <muttng-doc:hook name="crypt"/> command provides a method by which
5036         you can
5037         specify the ID of the public key to be used when encrypting messages to
5038         a certain recipient.
5039       </para>
5040       
5041       <para>
5042         The meaning of "key id" is to be taken broadly in this context:  You
5043         can either put a numerical key ID here, an e-mail address, or even
5044         just a real name.
5045       </para>
5046       
5047       <para>
5048         
5049       </para>
5050       
5051     </sect1>
5052     
5053     <sect1>
5054       <title>Adding key sequences to the keyboard buffer</title>
5055       
5056       <para>
5057         <muttng-doc:cmddef name="push">string</muttng-doc:cmddef>
5058       </para>
5059       
5060       <para>
5061
5062         This command adds the named string to the keyboard buffer. The
5063         string may contain control characters, key names and function
5064         names like the sequence string in the <muttng-doc:cmdref name="macro"/> command. You may use it to
5065         automatically run a sequence of commands at startup, or when
5066         entering certain folders. For example, the following command
5067         will automatically collapse all threads when entering a folder:
5068
5069         <muttng-doc:lstconf>
5070 folder-hook . 'push &lt;collapse-all&gt;'</muttng-doc:lstconf>
5071
5072       </para>
5073       
5074       <para>
5075         
5076       </para>
5077       
5078     </sect1>
5079     
5080     <sect1>
5081       <title>Executing functions</title>
5082       
5083       <para>
5084         <muttng-doc:cmddef name="exec">function [function ... ]</muttng-doc:cmddef>
5085       </para>
5086       
5087       <para>
5088         This command can be used to execute any function. Functions are
5089         listed in the <link linkend="functions">functions</link>.
5090         ``exec function'' is equivalent to ``push &lt;function&gt;''.
5091       </para>
5092       
5093       <para>
5094         
5095       </para>
5096       
5097     </sect1>
5098     
5099     <sect1>
5100       <title>Message Scoring</title>
5101       
5102       <para>
5103         <muttng-doc:cmddef name="score">pattern value</muttng-doc:cmddef>
5104       </para>
5105       <para>
5106         <muttng-doc:cmddef name="unscore">pattern [pattern ... ]</muttng-doc:cmddef>
5107       </para>
5108       
5109       <para>
5110         In situations where you have to cope with a lot of emails, e.g.
5111         when you read many different mailing lists, and take part in
5112         discussions, it is always useful to have the important messages
5113         marked and the annoying messages or the ones that you aren't
5114         interested in deleted. For this purpose, mutt-ng features a
5115         mechanism called ``scoring''.
5116       </para>
5117       
5118       <para>
5119         When you use scoring, every message has a base score of 0. You
5120         can then use the <literal>score</literal> command to define patterns
5121         and a
5122         positive or negative value associated with it. When a pattern
5123         matches a message, the message's score will be raised or lowered by
5124         the amount of the value associated with the pattern.
5125       </para>
5126       
5127       <para>
5128         
5129         <muttng-doc:lstconf>
5130 score "~f nion@muttng\.org" 50
5131 score "~f @sco\.com" -100</muttng-doc:lstconf>
5132         
5133       </para>
5134       
5135       <para>
5136         If the pattern matches, it is also possible to set the score
5137         value of the current message to a certain value and then stop
5138         evaluation:
5139       </para>
5140       
5141       <para>
5142         
5143         <muttng-doc:lstconf>
5144 score "~f santaclaus@northpole\.int" =666</muttng-doc:lstconf>
5145         
5146       </para>
5147       
5148       <para>
5149         What is important to note is that negative score values will be
5150         rounded up to 0.
5151       </para>
5152       
5153       <para>
5154         To make scoring actually useful, the score must be applied in
5155         some way.  That's what the <emphasis>score thresholds</emphasis> are
5156         for. Currently,
5157         there are three score thresholds:
5158       </para>
5159       
5160       <para>
5161         
5162         <itemizedlist>
5163           <listitem>
5164             
5165             <para>
5166               flag threshold: when a message has a score value equal or higher
5167               than the flag threshold, it will be flagged.
5168               
5169             </para>
5170           </listitem>
5171           <listitem>
5172             
5173             <para>
5174               read threshold: when a message has a score value equal or lower
5175               than the read threshold, it will be marked as read.
5176               
5177             </para>
5178           </listitem>
5179           <listitem>
5180             
5181             <para>
5182               delete threshold: when a message has a score value equal or
5183               lower than the delete threshold, it will be marked as deleted.
5184               
5185             </para>
5186           </listitem>
5187           
5188         </itemizedlist>
5189         
5190       </para>
5191       
5192       <para>
5193         These three thresholds can be set via the variables
5194         <muttng-doc:varref name="score-threshold-read"/>,
5195         <muttng-doc:varref name="score-threshold-flag"/> and
5196         <muttng-doc:varref name="score-threshold-delete"/>.
5197       </para>
5198       <para>
5199         By default,
5200         <muttng-doc:varref name="score-threshold-read"/> and
5201         <muttng-doc:varref name="score-threshold-delete"/> 
5202         are set to
5203         <literal>-1</literal>, which means that in the default threshold
5204         configuration no
5205         message will ever get marked as read or deleted.
5206       </para>
5207       
5208       <para>
5209         Scoring gets especially interesting when combined with the <literal>
5210           color
5211         </literal>
5212         command
5213         and the <muttng-doc:pattern name="n"/> pattern:
5214       </para>
5215       
5216       <para>
5217         
5218         <muttng-doc:lstconf>
5219 color index  black   yellow  "~n 10-"
5220 color index  red     yellow  "~n 100-"</muttng-doc:lstconf>
5221         
5222       </para>
5223       
5224       <para>
5225         The rules above mark all messages with a score between 10 and 99
5226         with black and yellow, and messages with a score greater or equal
5227         100 with red and yellow. This might be unusual to you if you're used
5228         to e.g. slrn's scoring mechanism, but it is more flexible, as it
5229         visually marks different scores.
5230       </para>
5231       
5232       <para>
5233         
5234       </para>
5235       
5236     </sect1>
5237     
5238     <sect1>
5239       <title>Spam detection</title>
5240
5241       <para>
5242         <muttng-doc:cmddef name="spam">pattern format</muttng-doc:cmddef>
5243       </para>
5244       <para>
5245         <muttng-doc:cmddef name="nospam">pattern</muttng-doc:cmddef>
5246       </para>
5247       
5248       <para>
5249         Mutt-ng has generalized support for external spam-scoring filters.
5250         By defining your spam patterns with the <literal>spam</literal> and <literal>
5251           nospam
5252         </literal>
5253         commands, you can <emphasis>limit</emphasis>, <emphasis>search</emphasis>, and <emphasis>
5254           sort
5255         </emphasis>
5256         your
5257         mail based on its spam attributes, as determined by the external
5258         filter. You also can display the spam attributes in your index
5259         display using the <literal>%H</literal> selector in the
5260         <muttng-doc:varref name="index-format"/>
5261         variable. (Tip: try <literal>%?H?[%H] ?</literal>
5262         to display spam tags only when they are defined for a given message.)
5263       </para>
5264       
5265       <para>
5266         Your first step is to define your external filter's spam patterns using
5267         the <literal>spam</literal> command. <emphasis>pattern</emphasis>
5268         should be a regular expression
5269         that matches a header in a mail message. If any message in the mailbox
5270         matches this regular expression, it will receive a ``spam tag'' or
5271         ``spam attribute'' (unless it also matches a <literal>nospam</literal>
5272         pattern -- see
5273         below.) The appearance of this attribute is entirely up to you, and is
5274         governed by the <emphasis>format</emphasis> parameter. <emphasis>format</emphasis> can be any static
5275         text, but it also can include back-references from the <emphasis>
5276           pattern
5277         </emphasis>
5278         expression. (A regular expression ``back-reference'' refers to a
5279         sub-expression contained within parentheses.) <literal>%1</literal> is replaced with
5280         the first back-reference in the regex, <literal>%2</literal>
5281         with the second, etc.
5282       </para>
5283       
5284       <para>
5285         If you're using multiple spam filters, a message can have more than
5286         one spam-related header. You can define <literal>spam</literal>
5287         patterns for each
5288         filter you use. If a message matches two or more of these patterns, and
5289         the $spam_separator variable is set to a string, then the
5290         message's spam tag will consist of all the <emphasis>format</emphasis>
5291         strings joined
5292         together, with the value of $spam_separator separating
5293         them.
5294       </para>
5295       
5296       <para>
5297         For example, suppose I use DCC, SpamAssassin, and PureMessage. I might
5298         define these spam settings:
5299         
5300         <muttng-doc:lstconf>
5301 spam "X-DCC-.*-Metrics:.*(....)=many"         "90+/DCC-%1"
5302 spam "X-Spam-Status: Yes"                     "90+/SA"
5303 spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM"
5304 set spam_separator=", "</muttng-doc:lstconf>
5305         
5306       </para>
5307       
5308       <para>
5309         If I then received a message that DCC registered with ``many'' hits
5310         under the ``Fuz2'' checksum, and that PureMessage registered with a
5311         97% probability of being spam, that message's spam tag would
5312         read<literal>90+/DCC-Fuz2, 97/PM</literal>. (The four characters before
5313         ``=many'' in a
5314         DCC report indicate the checksum used -- in this case, ``Fuz2''.)
5315       </para>
5316       
5317       <para>
5318         If the $spam_separator variable is unset, then each
5319         spam pattern match supersedes the previous one. Instead of getting
5320         joined <emphasis>format</emphasis> strings, you'll get only the last
5321         one to match.
5322       </para>
5323       
5324       <para>
5325         The spam tag is what will be displayed in the index when you use
5326         <literal>%H</literal> in the <literal>
5327           $index_format
5328         </literal>
5329         variable. It's also the
5330         string that the <muttng-doc:pattern name="H"/> pattern-matching expression
5331         matches against for
5332         <emphasis>search</emphasis> and <emphasis>limit</emphasis> functions.
5333         And it's what sorting by spam
5334         attribute will use as a sort key.
5335       </para>
5336       
5337       <para>
5338         That's a pretty complicated example, and most people's actual
5339         environments will have only one spam filter. The simpler your
5340         configuration, the more effective mutt can be, especially when it comes
5341         to sorting.
5342       </para>
5343       
5344       <para>
5345         Generally, when you sort by spam tag, mutt will sort <emphasis>
5346           lexically
5347         </emphasis>
5348         --
5349         that is, by ordering strings alphnumerically. However, if a spam tag
5350         begins with a number, mutt will sort numerically first, and lexically
5351         only when two numbers are equal in value. (This is like UNIX's
5352         <literal>sort -n</literal>.) A message with no spam attributes at all
5353         -- that is, one
5354         that didn't match <emphasis>any</emphasis> of your <literal>spam</literal> patterns -- is sorted at
5355         lowest priority. Numbers are sorted next, beginning with 0 and ranging
5356         upward. Finally, non-numeric strings are sorted, with ``a'' taking
5357         lowerpriority than ``z''. Clearly, in general, sorting by spam tags is
5358         most
5359         effective when you can coerce your filter to give you a raw number. But
5360         in case you can't, mutt can still do something useful.
5361       </para>
5362       
5363       <para>
5364         The <literal>nospam</literal> command can be used to write exceptions
5365         to <literal>spam</literal>
5366         patterns. If a header pattern matches something in a <literal>spam</literal> command,
5367         but you nonetheless do not want it to receive a spam tag, you can list
5368         amore precise pattern under a <literal>nospam</literal> command.
5369       </para>
5370       
5371       <para>
5372         If the <emphasis>pattern</emphasis> given to <literal>nospam</literal>
5373         is exactly the same as the
5374         <emphasis>pattern</emphasis> on an existing <literal>spam</literal>
5375         list entry, the effect will be to
5376         remove the entry from the spam list, instead of adding an exception.
5377         Likewise, if the <emphasis>pattern</emphasis> for a <literal>spam</literal> command matches an entry
5378         on the <literal>nospam</literal> list, that <literal>nospam</literal>
5379         entry will be removed. If the
5380         <emphasis>pattern</emphasis> for <literal>nospam</literal> is ``*'', <emphasis>
5381           all entries on both lists
5382         </emphasis>
5383         will be removed. This might be the default action if you use <literal>
5384           spam
5385         </literal>
5386         and <literal>nospam</literal> in conjunction with a <muttng-doc:hook name="folder"/>.
5387       </para>
5388       
5389       <para>
5390         You can have as many <literal>spam</literal> or <literal>nospam</literal> commands as you like.
5391         You can even do your own primitive spam detection within mutt -- for
5392         example, if you consider all mail from <literal>MAILER-DAEMON</literal>
5393         to be spam,
5394         you can use a <literal>spam</literal> command like this:
5395       </para>
5396       
5397       <para>
5398         
5399         <muttng-doc:lstconf>
5400 spam "^From: .*MAILER-DAEMON"       "999"</muttng-doc:lstconf>
5401         
5402       </para>
5403       
5404       <para>
5405         
5406       </para>
5407       
5408     </sect1>
5409     
5410     <sect1>
5411       <title>Setting variables</title>
5412
5413       <para>
5414         <muttng-doc:cmddef name="set">[no|inv]variable [=value] [variable...]</muttng-doc:cmddef>
5415       </para>
5416       <para>
5417         <muttng-doc:cmddef name="toggle">variable [variable ...]</muttng-doc:cmddef>
5418       </para>
5419       <para>
5420         <muttng-doc:cmddef name="unset">variable [variable ...]</muttng-doc:cmddef>
5421       </para>
5422       <para>
5423         <muttng-doc:cmddef name="reset">variable [variable ...]</muttng-doc:cmddef>
5424       </para>
5425       
5426       <para>
5427         This command is used to set (and unset) <link linkend="variables">variables</link>. 
5428         There are four basic types of variables:
5429         boolean, number, string and quadoption.  <emphasis>boolean</emphasis>
5430         variables can be
5431         <emphasis>set</emphasis> (true) or <emphasis>unset</emphasis> (false). 
5432         <emphasis>number</emphasis> variables can be
5433         assigned a positive integer value.
5434       </para>
5435       
5436       <para>
5437         <emphasis>string</emphasis> variables consist of any number of
5438         printable characters.
5439         <emphasis>strings</emphasis> must be enclosed in quotes if they contain
5440         spaces or tabs.  You
5441         may also use the ``C'' escape sequences <emphasis role="bold">\n</emphasis> and <emphasis role="bold">
5442           \t
5443         </emphasis>
5444         for
5445         newline and tab, respectively.
5446       </para>
5447       
5448       <para>
5449         <emphasis>quadoption</emphasis> variables are used to control whether
5450         or not to be prompted
5451         for certain actions, or to specify a default action.  A value of <emphasis>
5452           yes
5453         </emphasis>
5454         will cause the action to be carried out automatically as if you had
5455         answered
5456         yes to the question.  Similarly, a value of <emphasis>no</emphasis>
5457         will cause the the
5458         action to be carried out as if you had answered ``no.''  A value of
5459         <emphasis>ask-yes</emphasis> will cause a prompt with a default answer
5460         of ``yes'' and
5461         <emphasis>ask-no</emphasis> will provide a default answer of ``no.''
5462       </para>
5463       
5464       <para>
5465         Prefixing a variable with ``no'' will unset it.  Example: <literal>set
5466           noaskbcc
5467         </literal>
5468         .
5469       </para>
5470       
5471       <para>
5472         For <emphasis>boolean</emphasis> variables, you may optionally prefix
5473         the variable name with
5474         <literal>inv</literal> to toggle the value (on or off).  This is useful
5475         when writing
5476         macros.  Example: <literal>set invsmart_wrap</literal>.
5477       </para>
5478       
5479       <para>
5480         The <literal>toggle</literal> command automatically prepends the <literal>
5481           inv
5482         </literal>
5483         prefix to all
5484         specified variables.
5485       </para>
5486       
5487       <para>
5488         The <literal>unset</literal> command automatically prepends the <literal>
5489           no
5490         </literal>
5491         prefix to all
5492         specified variables.
5493       </para>
5494       
5495       <para>
5496         Using the enter-command function in the <emphasis>index</emphasis>
5497         menu, you can query the
5498         value of a variable by prefixing the name of the variable with a
5499         question
5500         mark:
5501       </para>
5502       
5503       <para>
5504         
5505         <muttng-doc:lstconf>
5506 set ?allow_8bit</muttng-doc:lstconf>
5507         
5508       </para>
5509       
5510       <para>
5511         The question mark is actually only required for boolean and quadoption 
5512         variables.
5513       </para>
5514       
5515       <para>
5516         The <literal>reset</literal> command resets all given variables to the
5517         compile time
5518         defaults (hopefully mentioned in this manual). If you use the command
5519         <literal>set</literal> and prefix the variable with ``&amp;'' this has
5520         the same
5521         behavior as the reset command.
5522       </para>
5523       
5524       <para>
5525         With the <literal>reset</literal> command there exists the special
5526         variable ``all'',
5527         which allows you to reset all variables to their system defaults.
5528       </para>
5529       
5530       <para>
5531         
5532       </para>
5533       
5534     </sect1>
5535     
5536     <sect1>
5537       <title>Reading initialization commands from another file</title>
5538       
5539       <para>
5540         <muttng-doc:cmddef name="source">filename [filename ...]</muttng-doc:cmddef>
5541       </para>
5542       
5543       <para>
5544         This command allows the inclusion of initialization commands
5545         from other files.  For example, I place all of my aliases in
5546         <literal>~/.mail_aliases</literal> so that I can make my
5547         <literal>~/.muttrc</literal> readable and keep my aliases
5548         private.
5549       </para>
5550       
5551       <para>
5552         If the filename begins with a tilde (``~''), it will be expanded
5553         to the
5554         path of your home directory.
5555       </para>
5556       
5557       <para>
5558         If the filename ends with a vertical bar (|), then <emphasis>
5559           filename
5560         </emphasis>
5561         is
5562         considered to be an executable program from which to read input (eg.
5563         <literal>source ~/bin/myscript|</literal>).
5564       </para>
5565       
5566       <para>
5567         
5568       </para>
5569       
5570     </sect1>
5571     
5572     <sect1>
5573       <title>Removing hooks</title>
5574       
5575       <para>
5576         <muttng-doc:cmddef name="unhook">[* | hook-type]</muttng-doc:cmddef>
5577       </para>
5578       
5579       <para>
5580         This command permits you to flush hooks you have previously defined.
5581         You can either remove all hooks by giving the ``*'' character as an
5582         argument, or you can remove all hooks of a specific type by saying
5583         something like <literal>unhook send</literal>.
5584       </para>
5585       
5586       <para>
5587         
5588       </para>
5589       
5590     </sect1>
5591     
5592     <sect1 id="share">
5593       <title>Sharing Setups</title>
5594       
5595       <sect2 id="share-charset">
5596         <title>Character Sets</title>
5597         
5598         <para>
5599           As users may run mutt-ng on different systems, the configuration
5600           must be maintained because it's likely that people want to use the
5601           setup everywhere they use mutt-ng. And mutt-ng tries to help where it
5602           can.
5603         </para>
5604         
5605         <para>
5606           To not produce conflicts with different character sets, mutt-ng
5607           allows users to specify in which character set their configuration
5608           files are encoded. Please note that while reading the configuration
5609           files, this is only respected after the corresponding declaration
5610           appears. It's advised to put the following at the very beginning of a
5611           users muttngrc:
5612         </para>
5613         
5614         <para>
5615           
5616           <muttng-doc:lstconf>
5617 set config_charset = "..."</muttng-doc:lstconf>
5618           
5619         </para>
5620         
5621         <para>
5622           and replacing the dots with the actual character set. To avoid
5623           problems while maintaining the setup, <muttng-doc:man name="vim"/> user's may want to use
5624           modelines as show in:
5625         </para>
5626         
5627         <para>
5628           
5629           <screen>
5630 # vim:fileencoding=...:</screen>
5631           
5632         </para>
5633         
5634         <para>
5635           while, again, replacing the dots with the appropriate name. This
5636           tells <muttng-doc:man name="vim"/> as which character set to read and save the file.
5637         </para>
5638         
5639         <para>
5640           
5641         </para>
5642         
5643       </sect2>
5644       
5645       <sect2 id="share-modularization">
5646         <title>Modularization</title>
5647         
5648         <para>
5649           ``Modularization'' means to divide the setup into several files
5650           while sorting the options or commands by topic. Especially for
5651           longer setups (e.g. with many hooks), this helps maintaining it
5652           and solving trouble.
5653         </para>
5654         
5655         <para>
5656           When using separation, setups may be, as a whole or in
5657           fractions, shared over different systems.
5658         </para>
5659         
5660         <para>
5661           
5662         </para>
5663         
5664       </sect2>
5665       
5666       <sect2 id="share-conditional">
5667         <title>Conditional parts</title>
5668         
5669         <para>
5670           When using a configuration on different systems, the user may not
5671           always have influence on how mutt-ng is installed and which features
5672           it includes.
5673         </para>
5674         
5675         <para>
5676           To solve this, mutt-ng contain a feature based on the ``ifdef''
5677           patch written for mutt. Its basic syntax is:
5678         </para>
5679         
5680         <para>
5681           
5682           <muttng-doc:lstconf>
5683 ifdef &lt;item&gt; &lt;command&gt;
5684 ifndef &lt;item&gt; &lt;command&gt;</muttng-doc:lstconf>
5685           
5686         </para>
5687         
5688         <para>
5689           ...whereby <literal>&lt;item&gt;</literal> can be one of:
5690         </para>
5691         
5692         <para>
5693           
5694           <itemizedlist>
5695             <listitem>
5696               
5697               <para>
5698                 a function name
5699                 
5700               </para>
5701             </listitem>
5702             <listitem>
5703               
5704               <para>
5705                 a variable name
5706                 
5707               </para>
5708             </listitem>
5709             <listitem>
5710               
5711               <para>
5712                 a menu name
5713                 
5714               </para>
5715             </listitem>
5716             <listitem>
5717               
5718               <para>
5719                 a feature name
5720                 
5721               </para>
5722             </listitem>
5723             
5724           </itemizedlist>
5725           
5726         </para>
5727         
5728         <para>
5729           All available functions, variables and menus are documented
5730           elsewhere in this manual but ``features'' is specific to these
5731           two commands. To test for one, prefix one of the following
5732           keywords with <literal>feature_</literal>: ncurses,
5733           slang, iconv, idn, dotlock, standalone, pop, nntp, imap, ssl,
5734           gnutls, sasl, sasl2, libesmtp, compressed, color, classic_pgp,
5735           classic_smime, gpgme, header_cache
5736         </para>
5737         
5738         <para>
5739           As an example, one can use the following in
5740           <literal>~/.muttngrc</literal>:
5741         </para>
5742         
5743         <para>
5744           
5745           <muttng-doc:lstconf>
5746 ifdef feature_imap 'source ~/.mutt-ng/setup-imap'
5747 ifdef feature_pop  'source ~/.mutt-ng/setup-pop'
5748 ifdef feature_nntp 'source ~/.mutt-ng/setup-nntp'</muttng-doc:lstconf>
5749           
5750         </para>
5751         
5752         <para>
5753           ...to only source <literal>~/.mutt-ng/setup-imap</literal> if
5754           IMAP
5755           support is built in, only source <literal>~/.mutt-ng/setup-pop</literal>
5756           if POP support is built in and only source
5757           <literal>~/.mutt-ng/setup-nntp</literal> if NNTP support is
5758           built in.
5759         </para>
5760         
5761         <para>
5762           An example for testing for variable names can be used if users
5763           use different revisions of mutt-ng whereby the older one may not
5764           have a certain variable. To test for the availability of
5765           <muttng-doc:varref name="imap-mail-check"/>
5766           use:
5767         </para>
5768         
5769         <para>
5770           
5771           <muttng-doc:lstconf>
5772 ifdef imap_mail_check 'set imap_mail_check = 300'</muttng-doc:lstconf>
5773           
5774         </para>
5775         
5776         <para>
5777           Provided for completeness is the test for menu names. To set
5778           <muttng-doc:varref name="pager-index-lines"
5779            />
5780           only if the pager
5781           menu is available, use:
5782         </para>
5783         
5784         <para>
5785           
5786           <muttng-doc:lstconf>
5787 ifdef pager 'set pager_index_lines = 10'</muttng-doc:lstconf>
5788           
5789         </para>
5790         
5791         <para>
5792           For completeness, too, the opposite of <literal>ifdef</literal> is
5793           provided:
5794           <literal>ifndef</literal> which only executes the command if the test
5795           fails. For
5796           example, the following two examples are equivalent:
5797         </para>
5798         
5799         <para>
5800           
5801           <muttng-doc:lstconf>
5802 ifdef feature_ncurses 'source ~/.mutt-ng/setup-ncurses'
5803 ifndef feature_ncurses 'source ~/.mutt-ng/setup-slang'</muttng-doc:lstconf>
5804           
5805         </para>
5806         
5807         <para>
5808           ...and...
5809         </para>
5810         
5811         <para>
5812           
5813           <muttng-doc:lstconf>
5814 ifdef feature_slang 'source ~/.mutt-ng/setup-slang'
5815 ifndef feature_slang 'source ~/.mutt-ng/setup-ncurses'</muttng-doc:lstconf>
5816           
5817         </para>
5818         
5819         <para>
5820           
5821         </para>
5822         
5823         <para>
5824           
5825         </para>
5826         
5827       </sect2>
5828       
5829     </sect1>
5830     
5831     <sect1 id="vars-obsolete">
5832       <title>Obsolete Variables</title>
5833       
5834       <para>
5835         In the process of ensuring and creating more consistency, many
5836         variables have been renamed and some of the old names were already
5837         removed. Please see <link linkend="sect-obsolete">sect-obsolete</link>
5838         for a complete list.
5839       </para>
5840       
5841       <para>
5842         
5843       </para>
5844       
5845       <para>
5846         
5847       </para>
5848       
5849     </sect1>
5850     
5851   </chapter>
5852   <!--}}}-->
5853   
5854   <chapter id="advanced-usage"> <!--{{{-->
5855     <title>Advanced Usage</title>
5856     
5857     <sect1 id="advanced-regexp">
5858       <title>Regular Expressions</title>
5859       
5860       <para>
5861         All string patterns in Mutt-ng including those in more complex
5862         <link linkend="tab-patterns">patterns</link> must be specified
5863         using regular expressions (regexp) in the ``POSIX extended'' syntax
5864         (which
5865         is more or less the syntax used by egrep and GNU awk).  For your
5866         convenience, we have included below a brief description of this syntax.
5867       </para>
5868       
5869       <para>
5870         The search is case sensitive if the pattern contains at least one upper
5871         case letter, and case insensitive otherwise. Note that ``\''
5872         must be quoted if used for a regular expression in an initialization
5873         command: ``\\''.
5874       </para>
5875       
5876       <para>
5877         A regular expression is a pattern that describes a set of strings.
5878         Regular expressions are constructed analogously to arithmetic
5879         expressions, by using various operators to combine smaller expressions.
5880       </para>
5881       
5882       <para>
5883         Note that the regular expression can be enclosed/delimited by either
5884         &quot;
5885         or ' which is useful if the regular expression includes a white-space
5886         character.  See <link linkend="configuration-syntax">muttrc-syntax</link>
5887         for more information on &quot; and ' delimiter processing.  To match a
5888         literal &quot; or ' you must preface it with \ (backslash).
5889       </para>
5890       
5891       <para>
5892         The fundamental building blocks are the regular expressions that match
5893         a single character.  Most characters, including all letters and digits,
5894         are regular expressions that match themselves.  Any metacharacter with
5895         special meaning may be quoted by preceding it with a backslash.
5896       </para>
5897       
5898       <para>
5899         The period ``.'' matches any single character.  The caret ``^''
5900         andthe dollar sign ``$'' are metacharacters that respectively
5901         match
5902         the empty string at the beginning and end of a line.
5903       </para>
5904       
5905       <para>
5906         A list of characters enclosed by ``]'' and ``]'' matches any
5907         single character in that list; if the first character of the list
5908         is a caret ``^'' then it matches any character <emphasis role="bold">
5909           not
5910         </emphasis>
5911         in the
5912         list.  For example, the regular expression <emphasis role="bold">
5913           ]0123456789]
5914         </emphasis>
5915         matches any single digit.  A range of ASCII characters may be specified
5916         by giving the first and last characters, separated by a hyphen
5917         ``-''.  Most metacharacters lose their special meaning inside
5918         lists.  To include a literal ``]'' place it first in the list.
5919         Similarly, to include a literal ``^'' place it anywhere but first.
5920         Finally, to include a literal hyphen ``-'' place it last.
5921       </para>
5922       
5923       <para>
5924         Certain named classes of characters are predefined.  Character classes
5925         consist of ``[:'', a keyword denoting the class, and ``:]''.
5926         The following classes are defined by the POSIX standard:
5927       </para>
5928       
5929       <para>
5930         <variablelist>
5931           
5932           <varlistentry>
5933             <term>[:alnum:]</term>
5934             <listitem>
5935               <para>
5936                 Alphanumeric characters.
5937               </para>
5938             </listitem>
5939           </varlistentry>
5940           <varlistentry>
5941             <term>[:alpha:]</term>
5942             <listitem>
5943               <para>
5944                 Alphabetic characters.
5945               </para>
5946             </listitem>
5947           </varlistentry>
5948           <varlistentry>
5949             <term>[:blank:]</term>
5950             <listitem>
5951               <para>
5952                 Space or tab characters.
5953               </para>
5954             </listitem>
5955           </varlistentry>
5956           <varlistentry>
5957             <term>[:cntrl:]</term>
5958             <listitem>
5959               <para>
5960                 Control characters.
5961               </para>
5962             </listitem>
5963           </varlistentry>
5964           <varlistentry>
5965             <term>[:digit:]</term>
5966             <listitem>
5967               <para>
5968                 Numeric characters.
5969               </para>
5970             </listitem>
5971           </varlistentry>
5972           <varlistentry>
5973             <term>[:graph:]</term>
5974             <listitem>
5975               <para>
5976                 Characters that are both printable and visible.  (A space is
5977                 printable,
5978                 but not visible, while an ``a'' is both.)
5979               </para>
5980             </listitem>
5981           </varlistentry>
5982           <varlistentry>
5983             <term>[:lower:]</term>
5984             <listitem>
5985               <para>
5986                 Lower-case alphabetic characters.
5987               </para>
5988             </listitem>
5989           </varlistentry>
5990           <varlistentry>
5991             <term>[:print:]</term>
5992             <listitem>
5993               <para>
5994                 Printable characters (characters that are not control
5995                 characters.)
5996               </para>
5997             </listitem>
5998           </varlistentry>
5999           <varlistentry>
6000             <term>[:punct:]</term>
6001             <listitem>
6002               <para>
6003                 Punctuation characters (characters that are not letter, digits,
6004                 control
6005                 characters, or space characters).
6006               </para>
6007             </listitem>
6008           </varlistentry>
6009           <varlistentry>
6010             <term>[:space:]</term>
6011             <listitem>
6012               <para>
6013                 Space characters (such as space, tab and formfeed, to name a
6014                 few).
6015               </para>
6016             </listitem>
6017           </varlistentry>
6018           <varlistentry>
6019             <term>[:upper:]</term>
6020             <listitem>
6021               <para>
6022                 Upper-case alphabetic characters.
6023               </para>
6024             </listitem>
6025           </varlistentry>
6026           <varlistentry>
6027             <term>[:xdigit:]</term>
6028             <listitem>
6029               <para>
6030                 Characters that are hexadecimal digits.
6031               </para>
6032             </listitem>
6033           </varlistentry>
6034         </variablelist>
6035       </para>
6036       
6037       <para>
6038         A character class is only valid in a regular expression inside the
6039         brackets of a character list.  Note that the brackets in these
6040         class names are part of the symbolic names, and must be included
6041         in addition to the brackets delimiting the bracket list.  For
6042         example, <emphasis role="bold">[[:digit:]]</emphasis> is equivalent to
6043         <emphasis role="bold">[0-9]</emphasis>.
6044       </para>
6045       
6046       <para>
6047         Two additional special sequences can appear in character lists.  These
6048         apply to non-ASCII character sets, which can have single symbols
6049         (calledcollating elements) that are represented with more than one
6050         character,
6051         as well as several characters that are equivalent for collating or
6052         sorting purposes:
6053       </para>
6054       
6055       <para>
6056         <variablelist>
6057           
6058           <varlistentry>
6059             <term>Collating Symbols</term>
6060             <listitem>
6061               <para>
6062                 A collating symbol is a multi-character collating element
6063                 enclosed in
6064                 ``[.'' and ``.]''.  For example, if ``ch'' is a
6065                 collating
6066                 element, then <emphasis role="bold">
6067                   [[.ch.]]
6068                 </emphasis>
6069                 is a regexp that matches
6070                 this collating element, while <emphasis role="bold">
6071                   [ch]
6072                 </emphasis>
6073                 is a regexp that
6074                 matches either ``c'' or ``h''.
6075               </para>
6076             </listitem>
6077           </varlistentry>
6078           <varlistentry>
6079             <term>Equivalence Classes</term>
6080             <listitem>
6081               <para>
6082                 An equivalence class is a locale-specific name for a list of
6083                 characters that are equivalent. The name is enclosed in
6084                 ``[=''
6085                 and ``=]''.  For example, the name ``e'' might be used to
6086                 represent all of ``è'' ``é'' and ``e''.  In this
6087                 case,
6088                 <emphasis role="bold">[[=e=]]</emphasis> is
6089                 a regexp that matches any of
6090                 ``è'', ``é'' and ``e''.
6091               </para>
6092             </listitem>
6093           </varlistentry>
6094         </variablelist>
6095       </para>
6096       
6097       <para>
6098         A regular expression matching a single character may be followed by one
6099         of several repetition operators:
6100       </para>
6101       
6102       <para>
6103         <variablelist>
6104           
6105           <varlistentry>
6106             <term>?</term>
6107             <listitem>
6108               <para>
6109                 The preceding item is optional and matched at most once.
6110               </para>
6111             </listitem>
6112           </varlistentry>
6113           <varlistentry>
6114             <term>*</term>
6115             <listitem>
6116               <para>
6117                 The preceding item will be matched zero or more times.
6118               </para>
6119             </listitem>
6120           </varlistentry>
6121           <varlistentry>
6122             <term>+</term>
6123             <listitem>
6124               <para>
6125                 The preceding item will be matched one or more times.
6126               </para>
6127             </listitem>
6128           </varlistentry>
6129           <varlistentry>
6130             <term>{n}</term>
6131             <listitem>
6132               <para>
6133                 The preceding item is matched exactly <emphasis>n</emphasis>
6134                 times.
6135               </para>
6136             </listitem>
6137           </varlistentry>
6138           <varlistentry>
6139             <term>{n,}</term>
6140             <listitem>
6141               <para>
6142                 The preceding item is matched <emphasis>n</emphasis> or more
6143                 times.
6144               </para>
6145             </listitem>
6146           </varlistentry>
6147           <varlistentry>
6148             <term>{,m}</term>
6149             <listitem>
6150               <para>
6151                 The preceding item is matched at most <emphasis>m</emphasis>
6152                 times.
6153               </para>
6154             </listitem>
6155           </varlistentry>
6156           <varlistentry>
6157             <term>{n,m}</term>
6158             <listitem>
6159               <para>
6160                 The preceding item is matched at least <emphasis>n</emphasis>
6161                 times, but no more than
6162                 <emphasis>m</emphasis> times.
6163               </para>
6164             </listitem>
6165           </varlistentry>
6166         </variablelist>
6167       </para>
6168       
6169       <para>
6170         Two regular expressions may be concatenated; the resulting regular
6171         expression matches any string formed by concatenating two substrings
6172         that respectively match the concatenated subexpressions.
6173       </para>
6174       
6175       <para>
6176         Two regular expressions may be joined by the infix operator
6177         ``|'';
6178         the resulting regular expression matches any string matching either
6179         subexpression.
6180       </para>
6181       
6182       <para>
6183         Repetition takes precedence over concatenation, which in turn takes
6184         precedence over alternation.  A whole subexpression may be enclosed in
6185         parentheses to override these precedence rules.
6186       </para>
6187       
6188       <para>
6189         <emphasis role="bold">Note:</emphasis> If you compile Mutt-ng with the
6190         GNU <emphasis>rx</emphasis> package, the
6191         following operators may also be used in regular expressions:
6192       </para>
6193       
6194       <para>
6195         <variablelist>
6196           
6197           <varlistentry>
6198             <term>\\y</term>
6199             <listitem>
6200               <para>
6201                 Matches the empty string at either the beginning or the end of
6202                 a word.
6203               </para>
6204             </listitem>
6205           </varlistentry>
6206           <varlistentry>
6207             <term>\\B</term>
6208             <listitem>
6209               <para>
6210                 Matches the empty string within a word.
6211               </para>
6212             </listitem>
6213           </varlistentry>
6214           <varlistentry>
6215             <term>\\&lt;</term>
6216             <listitem>
6217               <para>
6218                 Matches the empty string at the beginning of a word.
6219               </para>
6220             </listitem>
6221           </varlistentry>
6222           <varlistentry>
6223             <term>\\&gt;</term>
6224             <listitem>
6225               <para>
6226                 Matches the empty string at the end of a word.
6227               </para>
6228             </listitem>
6229           </varlistentry>
6230           <varlistentry>
6231             <term>\\w</term>
6232             <listitem>
6233               <para>
6234                 Matches any word-constituent character (letter, digit, or
6235                 underscore).
6236               </para>
6237             </listitem>
6238           </varlistentry>
6239           <varlistentry>
6240             <term>\\W</term>
6241             <listitem>
6242               <para>
6243                 Matches any character that is not word-constituent.
6244               </para>
6245             </listitem>
6246           </varlistentry>
6247           <varlistentry>
6248             <term>\\`</term>
6249             <listitem>
6250               <para>
6251                 Matches the empty string at the beginning of a buffer (string).
6252               </para>
6253             </listitem>
6254           </varlistentry>
6255           <varlistentry>
6256             <term>\\'</term>
6257             <listitem>
6258               <para>
6259                 Matches the empty string at the end of a buffer.
6260               </para>
6261             </listitem>
6262           </varlistentry>
6263         </variablelist>
6264       </para>
6265       
6266       <para>
6267         Please note however that these operators are not defined by POSIX, so
6268         they may or may not be available in stock libraries on various systems.
6269       </para>
6270       
6271       <para>
6272         
6273       </para>
6274       
6275     </sect1>
6276     
6277     <sect1 id="advanced-patterns">
6278       <title>Patterns</title>
6279       
6280       <para>
6281         Mutt-ng's pattern language provides a simple yet effective way to
6282         set up rules to match messages, e.g. for operations like tagging and
6283         scoring. A pattern consists of one or more sub-pattern, which can be
6284         logically grouped, ORed, and negated. For a complete listing of
6285         these patterns, please refer to table <link linkend="tab-patterns">patterns</link> in the Reference chapter.
6286       </para>
6287       
6288       <para>
6289         It must be noted that in this table, <literal>EXPR</literal> is
6290         a regular expression. For ranges, the forms
6291         <literal>&lt;[MAX]</literal>, <literal>&gt;&gt;[MIN]</literal>,
6292         <literal> [MIN]-</literal> and <literal>-[MAX]</literal> are
6293         also possible.
6294       </para>
6295       
6296       <sect2 id="patterns-complex">
6297         <title>Complex Patterns</title>
6298         
6299         <para>
6300           It is possible to combine several sub-patterns to a more complex
6301           pattern. The most simple possibility is to logically AND several
6302           patterns by stringing them together:
6303         </para>
6304         
6305         <para>
6306           
6307           <screen>
6308 <muttng-doc:pattern name="s"/> 'SPAM' <muttng-doc:pattern name="U"/></screen>
6309           
6310         </para>
6311         
6312         <para>
6313           The pattern above matches all messages that contain ``SPAM'' in
6314           the subject and are unread.
6315         </para>
6316         
6317         <para>
6318           To logical OR patterns, simply use the <literal>|</literal>
6319           operator. This one
6320           especially useful when using local groups:
6321         </para>
6322         
6323         <para>
6324           
6325           <screen>
6326 <muttng-doc:pattern name="f"/> ("nion@muttng\.org"|"ak@muttng\.org"|"pdmef@muttng\.org")
6327 (<muttng-doc:pattern name="b"/> mutt-ng|<muttng-doc:pattern name="s"/> Mutt-ng)
6328 !<muttng-doc:pattern name="x"/> '@synflood\.at'</screen>
6329           
6330         </para>
6331         
6332         <para>
6333           The first pattern matches all messages that were sent by one of
6334           the mutt-ng maintainers, while the seconds pattern matches all
6335           messages that contain ``mutt-ng'' in the message body or ``Mutt-ng''
6336           in the subject. The third pattern matches all messages that do not
6337           contain ``@synflood\.at'' in the <literal>References:</literal>
6338           header, i.e.
6339           messages that are not an (indirect) reply to one of my messages. A
6340           pattern can be logicall negated using the <literal>!</literal>
6341           operator.
6342         </para>
6343         
6344       </sect2>
6345       
6346       <sect2 sect="patterns-dates">
6347         <title>Patterns and Dates</title>
6348         
6349         <para>
6350           When using dates in patterns, the dates must be specified in a
6351           special format, i.e.  <literal>DD/MM/YYYY</literal>. If you don't
6352           specify
6353           month or year, they default to the current month or year. When using
6354           date ranges, and you specify only the minimum or the maximum, the
6355           specified date will be excluded, e.g. <literal>01/06/2005-</literal>
6356           matches
6357           against all messages <emphasis>after</emphasis> Juni 1st, 2005.
6358         </para>
6359         
6360         <para>
6361           It is also possible to use so-called ``error margins'' when
6362           specifying date ranges.  You simply specify a date, and then the
6363           error margin. This margin needs to contain the information whether
6364           it goes ``forth'' or ``back'' in time, by using <literal>+</literal>
6365           and <literal>-</literal>.
6366           Then follows a number and a unit, i.e. <literal>y</literal> for
6367           years, <literal>m</literal> for
6368           months, <literal>w</literal> for weeks and <literal>d</literal> for
6369           days. If you use the special
6370           <literal>*</literal> sign, it means that the error margin goes to
6371           both``directions'' in time.
6372         </para>
6373         
6374         <para>
6375           
6376           <screen>
6377 <muttng-doc:pattern name="d"/> 01/01/2005+1y
6378 <muttng-doc:pattern name="d"/> 18/10/2004-2w
6379 <muttng-doc:pattern name="d"/> 28/12/2004*1d</screen>
6380           
6381         </para>
6382         
6383         <para>
6384           The first pattern matches all dates between January 1st, 2005 and
6385           January 1st 2006.  The second pattern matches all dates between
6386           October 18th, 2004 and October 4th 2004 (2 weeks before 18/10/2004),
6387           while the third pattern matches all dates 1 day around December
6388           28th, 2004 (i.e. Dec 27th, 28th and 29th).
6389         </para>
6390         
6391         <para>
6392           Relative dates are also very important, as they make it possible
6393           to specify date ranges between a fixed number of units and the
6394           current date. How this works can be seen in the following example:
6395         </para>
6396         
6397         <para>
6398           
6399           <screen>
6400 <muttng-doc:pattern name="d"/> &gt;2w # messages older than two weeks
6401 <muttng-doc:pattern name="d"/> &lt;3d # messages newer than 3 days
6402 <muttng-doc:pattern name="d"/> =1m # messages that are exactly one month old</screen>
6403           
6404         </para>
6405         
6406         <para>
6407           
6408         </para>
6409         
6410       </sect2>
6411       
6412     </sect1>
6413     
6414     <sect1 id="formatstrings">
6415       <title>Format Strings</title>
6416       
6417       <sect2 id="formatstrings-intro">
6418         <title>Introduction</title>
6419         
6420         <para>
6421           The so called <emphasis>Format Strings</emphasis> offer great
6422           flexibility when
6423           configuring mutt-ng. In short, they describe what items to print
6424           out how in menus and status messages.
6425         </para>
6426         
6427         <para>
6428           Basically, they work as this: for different menus and bars,
6429           there's a variable specifying the layout. For every item
6430           available, there is a so called <emphasis>expando</emphasis>.
6431         </para>
6432         
6433         <para>
6434           For example, when running mutt-ng on different machines or
6435           different versions for testing purposes, it may be interesting to
6436           have the following information always printed on screen when one
6437           is in the index:
6438         </para>
6439         
6440         <para>
6441           
6442           <itemizedlist>
6443             <listitem>
6444               
6445               <para>
6446                 the current hostname
6447                 
6448               </para>
6449             </listitem>
6450             <listitem>
6451               
6452               <para>
6453                 the current mutt-ng version number
6454                 
6455               </para>
6456             </listitem>
6457             
6458           </itemizedlist>
6459           
6460         </para>
6461         
6462         <para>
6463           The setting for the status bar of the index is controlled via the
6464           <muttng-doc:varref name="status-format"/>
6465           variable. For the hostname and version string, there's an expando
6466           for <literal>$status_format</literal>: <literal>
6467             %h
6468           </literal>
6469           expands to the
6470           hostname and <literal>%v</literal> to the version string. When
6471           just configuring:
6472         </para>
6473         
6474         <para>
6475           
6476           <muttng-doc:lstconf>
6477 set status_format = "%v on %h: ..."</muttng-doc:lstconf>
6478           
6479         </para>
6480         
6481         <para>
6482           mutt-ng will replace the sequence <literal>%v</literal> with
6483           the version string
6484           and <literal>%h</literal> with the host's name. When you are,
6485           for example, running
6486           mutt-ng version <literal>1.5.9i</literal> on host <literal>mailhost</literal>, you'll see the
6487           following when you're in the index:
6488         </para>
6489         
6490         <para>
6491           
6492           <screen>
6493 Mutt-ng 1.5.9i on mailhost: ...</screen>
6494           
6495         </para>
6496         
6497         <para>
6498           In the index, there're more useful information one could want to 
6499           see:
6500         </para>
6501         
6502         <para>
6503           
6504           <itemizedlist>
6505             <listitem>
6506               
6507               <para>
6508                 which mailbox is open
6509                 
6510               </para>
6511             </listitem>
6512             <listitem>
6513               
6514               <para>
6515                 how man new, flagged or postponed messages
6516                 
6517               </para>
6518             </listitem>
6519             <listitem>
6520               
6521               <para>
6522                 ...
6523                 
6524               </para>
6525             </listitem>
6526             
6527           </itemizedlist>
6528           
6529         </para>
6530         
6531         <para>
6532           To include the mailbox' name is as easy as:
6533         </para>
6534         
6535         <para>
6536           
6537           <muttng-doc:lstconf>
6538 set status_format = "%v on %h: %B: ...</muttng-doc:lstconf>
6539           
6540         </para>
6541         
6542         <para>
6543           When the currently opened mailbox is <literal>Inbox</literal>, this
6544           will be expanded
6545           to:
6546         </para>
6547         
6548         <para>
6549           
6550           <screen>
6551 Mutt-ng 1.5.9i on mailhost: Inbox: ...</screen>
6552           
6553         </para>
6554         
6555         <para>
6556           For the number of certain types of messages, one more feature of the
6557           format
6558           strings is extremely useful. If there aren't messages of a certain
6559           type, it
6560           may not be desired to print just that there aren't any but instead
6561           only
6562           print something if there are any.
6563         </para>
6564         
6565         <para>
6566           
6567         </para>
6568         
6569       </sect2>
6570       
6571       <sect2 id="formatstrings-conditional">
6572         <title>Conditional Expansion</title>
6573         
6574         <para>
6575           To only print the number of messages if there are new messages in
6576           the current mailbox, further extend
6577           <literal>$status_format</literal> to:
6578         </para>
6579         
6580         <para>
6581           
6582           <muttng-doc:lstconf>
6583 set status_format = "%v on %h: %B %?n?%n new? ...</muttng-doc:lstconf>
6584           
6585         </para>
6586         
6587         <para>
6588           This feature is called <emphasis>nonzero-printing</emphasis> and
6589           works as this:
6590           some expandos may be optionally printed nonzero, i.e.  a portion
6591           of the format string is only evaluated if the value of the expando
6592           is different from zero. The basic syntax is:
6593         </para>
6594         
6595         <para>
6596           
6597           <screen>
6598 %?&lt;item&gt;?&lt;string if nonzero&gt;?</screen>
6599           
6600         </para>
6601         
6602         <para>
6603           which tells mutt-ng to only look at <literal>&lt;string if
6604             nonzero&gt;
6605           </literal>
6606           if the value of the <literal>%&lt;item%gt;</literal>
6607           expando is different from zero. In our example, we used <literal>n</literal> as
6608           the expando to check for and <literal>%n new</literal> as the
6609           optional nonzero
6610           string.
6611         </para>
6612         
6613         <para>
6614           But this is not all: this feature only offers one alternative: 
6615           ``print something if not zero.'' Mutt-ng does, as you might guess, 
6616           also provide a logically complete version: ``if zero, print 
6617           something and else print something else.'' This is achieved by the 
6618           following syntax for those expandos which may be printed nonzero:
6619         </para>
6620         
6621         <para>
6622           
6623           <screen>
6624 %?&lt;item&gt;?&lt;string if nonzero&gt;&#38;&lt;string if zero&gt;?</screen>
6625           
6626         </para>
6627         
6628         <para>
6629           Using this we can make mutt-ng to do the following:
6630         </para>
6631         
6632         <para>
6633           
6634           <itemizedlist>
6635             <listitem>
6636               
6637               <para>
6638                 make it print ``<emphasis>n</emphasis> new messages'' whereby <emphasis>
6639                   n
6640                 </emphasis>
6641                 is the
6642                 count but only if there new ones
6643                 
6644               </para>
6645             </listitem>
6646             <listitem>
6647               
6648               <para>
6649                 and make it print ``no new messages'' if there aren't any
6650                 
6651               </para>
6652             </listitem>
6653             
6654           </itemizedlist>
6655           
6656         </para>
6657         
6658         <para>
6659           The corresponding configuration is:
6660         </para>
6661         
6662         <para>
6663           
6664           <muttng-doc:lstconf>
6665 set status_format = "%v on %h: %B: %?n?%n new messages&amp;no new messages? ...</muttng-doc:lstconf>
6666           
6667         </para>
6668         
6669         <para>
6670           This doubles the use of the ``new messages'' string because it'll get
6671           always printed. Thus, it can be shortened to:
6672         </para>
6673         
6674         <para>
6675           
6676           <muttng-doc:lstconf>
6677 set status_format = "%v on %h: %B: %?n?%n&amp;no? new messages ...</muttng-doc:lstconf>
6678           
6679         </para>
6680         
6681         <para>
6682           As you might see from this rather simple example, one can create
6683           very complex but fancy status messages. Please see the reference
6684           chapter for expandos and those which may be printed nonzero.
6685         </para>
6686         
6687         <para>
6688           
6689         </para>
6690         
6691       </sect2>
6692       
6693       <sect2 id="formatstrings-padding">
6694         <title>Modifications and Padding</title>
6695         
6696         <para>
6697           Besides the information given so far, there're even more features of
6698           format strings:
6699         </para>
6700         
6701         <para>
6702           
6703           <itemizedlist>
6704             <listitem>
6705               
6706               <para>
6707                 When specifying <literal>%_&lt;item&gt;</literal>
6708                 instead of
6709                 just <literal>%&lt;item&gt;</literal>, mutt-ng will
6710                 convert all
6711                 characters in the expansion of <literal>&lt;item&gt;</literal>
6712                 to
6713                 lowercase.
6714                 
6715               </para>
6716             </listitem>
6717             <listitem>
6718               
6719               <para>
6720                 When specifying <literal>%:&lt;item&gt;</literal>
6721                 instead of just
6722                 <literal>%&lt;item&gt;</literal>, mutt-ng will convert
6723                 all dots in the
6724                 expansion of <literal>&lt;item&gt;</literal> to underscores
6725                 (<literal>_</literal>).
6726                 
6727               </para>
6728             </listitem>
6729             
6730           </itemizedlist>
6731           
6732         </para>
6733         
6734         <para>
6735           Also, there's a feature called <emphasis>Padding</emphasis> supplied
6736           by the
6737           following two expandos: <literal>%|X</literal> and <literal>
6738             %&gt;X
6739           </literal>
6740           .
6741         </para>
6742         
6743         <para>
6744           <variablelist>
6745             
6746             <varlistentry>
6747               <term>
6748                 <literal>%|X</literal>
6749               </term>
6750               <listitem>
6751                 <para>
6752                   When this occurs, mutt-ng will fill the
6753                   rest of the line with the character <literal>X</literal>. In
6754                   our example,
6755                   filling the rest of the line with dashes is done by setting:
6756                 </para>
6757                 
6758                 <para>
6759                   
6760                   <muttng-doc:lstconf>
6761 set status_format = "%v on %h: %B: %?n?%n&amp;no? new messages %|-"</muttng-doc:lstconf>
6762                   
6763                 </para>
6764               </listitem>
6765             </varlistentry>
6766             <varlistentry>
6767               <term>
6768                 <literal>%&gt;X</literal>
6769               </term>
6770               <listitem>
6771                 <para>
6772                   Since the previous expando stops at
6773                   the end of line, there must be a way to fill the gap between
6774                   two items via the <literal>%&gt;X</literal> expando:
6775                   it puts as many
6776                   characters <literal>X</literal> in between two items so that
6777                   the rest of
6778                   the line will be right-justified. For example, to not put the
6779                   version string and hostname of our example on the left but on
6780                   the right and fill the gap with spaces, one might use (note
6781                   the space after <literal>%&gt;</literal>):
6782                 </para>
6783                 
6784                 <para>
6785                   
6786                   <muttng-doc:lstconf>
6787 set status_format = "%B: %?n?%n&amp;no? new messages %&gt; (%v on %h)"</muttng-doc:lstconf>
6788                   
6789                 </para>
6790               </listitem>
6791             </varlistentry>
6792           </variablelist>
6793         </para>
6794         
6795         <para>
6796           
6797         </para>
6798         
6799         <para>
6800           
6801         </para>
6802         
6803       </sect2>
6804       
6805     </sect1>
6806     
6807     <sect1 id="using-tags">
6808       <title>Using Tags</title>
6809       
6810       <para>
6811         Sometimes it is desirable to perform an operation on a group of
6812         messages all at once rather than one at a time.  An example might be
6813         to save messages to a mailing list to a separate folder, or to
6814         delete all messages with a given subject.  To tag all messages
6815         matching a pattern, use the tag-pattern function, which is bound to
6816         ``shift-T'' by default.  Or you can select individual messages by
6817         hand using the ``tag-message'' function, which is bound to ``t'' by
6818         default.  See <link linkend="tab-patterns">patterns</link> for Mutt-ng's
6819         pattern
6820         matching syntax.
6821       </para>
6822       
6823       <para>
6824         Once you have tagged the desired messages, you can use the
6825         ``tag-prefix'' operator, which is the ``;'' (semicolon) key by default.
6826         When the ``tag-prefix'' operator is used, the <emphasis role="bold">
6827           next
6828         </emphasis>
6829         operation will
6830         be applied to all tagged messages if that operation can be used in that
6831         manner.  If the <muttng-doc:varref name="auto-tag"/>
6832         variable is set, the next operation applies to the tagged messages
6833         automatically, without requiring the ``tag-prefix''.
6834       </para>
6835       
6836       <para>
6837         In <muttng-doc:cmdref name="macro"/> or <muttng-doc:cmdref name="push"/> commands,
6838         you can use the ``tag-prefix-cond'' operator.  If there are no tagged
6839         messages, mutt will "eat" the rest of the macro to abort it's
6840         execution.Mutt-ng will stop "eating" the macro when it encounters the
6841         ``end-cond''
6842         operator;  after this operator the rest of the macro will be executed
6843         asnormal.
6844       </para>
6845       
6846       <para>
6847         
6848       </para>
6849       
6850     </sect1>
6851     
6852     <sect1 id="hooks">
6853       <title>Using Hooks</title>
6854       
6855       <para>
6856         A <emphasis>hook</emphasis> is a concept borrowed from the EMACS editor
6857         which allows you to
6858         execute arbitrary commands before performing some operation.  For
6859         example,
6860         you may wish to tailor your configuration based upon which mailbox you
6861         are
6862         reading, or to whom you are sending mail.  In the Mutt-ng world, a <emphasis>
6863           hook
6864         </emphasis>
6865         consists of a <link linkend="advanced-regexp">regexp</link> or
6866         <link linkend="tab-patterns">patterns</link> along with a
6867         configuration option/command.  See
6868         
6869         <itemizedlist>
6870           <listitem>
6871             
6872             <para>
6873               <muttng-doc:hook name="folder"/>
6874             </para>
6875           </listitem>
6876           <listitem>
6877             
6878             <para>
6879               <muttng-doc:hook name="send"/>
6880             </para>
6881           </listitem>
6882           <listitem>
6883             
6884             <para>
6885               <muttng-doc:hook name="message"/>
6886             </para>
6887           </listitem>
6888           <listitem>
6889             
6890             <para>
6891               <muttng-doc:hook name="save"/>
6892             </para>
6893           </listitem>
6894           <listitem>
6895             
6896             <para>
6897               <muttng-doc:hook name="mbox"/>
6898             </para>
6899           </listitem>
6900           <listitem>
6901             
6902             <para>
6903               <muttng-doc:hook name="fcc"/>
6904             </para>
6905           </listitem>
6906           <listitem>
6907             
6908             <para>
6909               <muttng-doc:hook name="fcc-save"/>
6910             </para>
6911           </listitem>
6912           
6913         </itemizedlist>
6914         
6915         for specific details on each type of <emphasis>hook</emphasis>
6916         available.
6917       </para>
6918       
6919       <para>
6920         <emphasis role="bold">Note:</emphasis> if a hook changes configuration
6921         settings, these changes remain
6922         effective until the end of the current mutt session. As this is
6923         generally
6924         not desired, a default hook needs to be added before all other hooks to
6925         restore configuration defaults. Here is an example with <muttng-doc:hook name="send"/> and
6926         the
6927         my_hdr directive:
6928       </para>
6929       
6930       <para>
6931         
6932         <muttng-doc:lstconf>
6933 send-hook . 'unmy_hdr From:'
6934 send-hook '~C ^b@b\.b$' my-hdr from: c@c.c</muttng-doc:lstconf>
6935         
6936       </para>
6937       
6938       <sect2 id="pattern-hook">
6939         <title>Message Matching in Hooks</title>
6940         
6941         <para>
6942           Hooks that act upon messages (<literal><muttng-doc:hook name="send"/>, <muttng-doc:hook name="save"/>,
6943             <muttng-doc:hook name="fcc"/>,<muttng-doc:hook name="message"/>
6944           </literal>
6945           )are evaluated in a slightly different manner.  For the other
6946           types of hooks, a <link linkend="advanced-regexp">regexp</link> is
6947           sufficient.  But in dealing with messages a finer grain of control is
6948           needed for matching since for different purposes you want to match
6949           different criteria.
6950         </para>
6951         
6952         <para>
6953           Mutt-ng allows the use of the <link linkend="tab-patterns">patterns</link>
6954           language for matching messages in hook commands.  This works in
6955           exactly the same way as it would when <emphasis>limiting</emphasis>
6956           or<emphasis>searching</emphasis> the mailbox, except that you are
6957           restricted to those
6958           operators which match information mutt extracts from the header of
6959           the message (i.e.  from, to, cc, date, subject, etc.).
6960         </para>
6961         
6962         <para>
6963           For example, if you wanted to set your return address based upon
6964           sending
6965           mail to a specific address, you could do something like:
6966           
6967           <muttng-doc:lstconf>
6968 send-hook '~t ^me@cs\.hmc\.edu$' 'my-hdr From: Mutt-ng User &lt;user@host&gt;'</muttng-doc:lstconf>
6969           
6970           which would execute the given command when sending mail to
6971           <emphasis>me@cs.hmc.edu</emphasis>.
6972         </para>
6973         
6974         <para>
6975           However, it is not required that you write the pattern to match using
6976           the
6977           full searching language.  You can still specify a simple <emphasis>
6978             regular
6979             expression
6980           </emphasis>
6981           like the other hooks, in which case Mutt-ng will translate your
6982           pattern into the full language, using the translation specified by
6983           the 
6984           <muttng-doc:hook name="default"/> variable.  The
6985           pattern is translated at the time the hook is declared, so the value
6986           of 
6987           <muttng-doc:hook name="default"/> that is in effect
6988           at that time will be used.
6989         </para>
6990         
6991         <para>
6992           
6993         </para>
6994         
6995       </sect2>
6996       
6997     </sect1>
6998     
6999     <sect1 id="sidebar">
7000       <title>Using the sidebar</title>
7001       
7002       <para>
7003         The sidebar, a feature specific to Mutt-ng, allows you to use a mailbox
7004         listing 
7005         which looks very similar to the ones you probably know from GUI mail
7006         clients.
7007         The sidebar lists all specified mailboxes, shows the number in each
7008         and highlights the ones with new email
7009         Use the following configuration commands:
7010         
7011         <muttng-doc:lstconf>
7012 set sidebar_visible="yes"
7013 set sidebar_width=25</muttng-doc:lstconf>
7014         
7015       </para>
7016       
7017       <para>
7018         If you want to specify the mailboxes you can do so with:
7019         
7020         <muttng-doc:lstconf>
7021 set mbox='=INBOX'
7022 mailboxes INBOX \
7023 MBOX1 \
7024 MBOX2 \
7025 ...</muttng-doc:lstconf>
7026         
7027       </para>
7028       
7029       <para>
7030         You can also specify the colors for mailboxes with new mails by using:
7031         
7032         <muttng-doc:lstconf>
7033 color sidebar_new red black
7034 color sidebar white black</muttng-doc:lstconf>
7035         
7036       </para>
7037       
7038       <para>
7039         Reasonable key bindings look e.g. like this:
7040         
7041         <muttng-doc:lstconf>
7042 bind index \Cp sidebar-prev
7043 bind index \Cn sidebar-next
7044 bind index \Cb sidebar-open
7045 bind pager \Cp sidebar-prev
7046 bind pager \Cn sidebar-next
7047 bind pager \Cb sidebar-open
7048
7049 macro index B ':toggle sidebar_visible^M'
7050 macro pager B ':toggle sidebar_visible^M'</muttng-doc:lstconf>
7051         
7052       </para>
7053       
7054       <para>
7055         You can then go up and down by pressing Ctrl-P and Ctrl-N, and 
7056         switch on and off the sidebar simply by pressing 'B'.
7057       </para>
7058       
7059       <para>
7060         
7061       </para>
7062       
7063     </sect1>
7064     
7065     <sect1 id="query">
7066       <title>External Address Queries</title>
7067       
7068       <para>
7069         Mutt-ng supports connecting to external directory databases such as
7070         LDAP,
7071         ph/qi, bbdb, or NIS through a wrapper script which connects to mutt
7072         using a simple interface.  Using the
7073         <muttng-doc:varref name="query-command"/>
7074         variable, you specify the wrapper
7075         command to use.  For example:
7076       </para>
7077       
7078       <para>
7079         
7080         <muttng-doc:lstconf>
7081 set query_command = "mutt_ldap_query.pl '%s'"</muttng-doc:lstconf>
7082         
7083       </para>
7084       
7085       <para>
7086         The wrapper script should accept the query on the command-line.  It
7087         should return a one line message, then each matching response on a
7088         single line, each line containing a tab separated address then name
7089         thensome other optional information.  On error, or if there are no
7090         matching
7091         addresses, return a non-zero exit code and a one line error message.
7092       </para>
7093       
7094       <para>
7095         An example multiple response output:
7096         
7097         <screen>
7098 Searching database ... 20 entries ... 3 matching:
7099 me@cs.hmc.edu           Michael Elkins  mutt dude
7100 blong@fiction.net       Brandon Long    mutt and more
7101 roessler@guug.de        Thomas Roessler mutt pgp</screen>
7102         
7103       </para>
7104       
7105       <para>
7106         There are two mechanisms for accessing the query function of mutt.  One
7107         is to do a query from the index menu using the query function (default:
7108         Q).
7109         This will prompt for a query, then bring up the query menu which will
7110         list the matching responses.  From the query menu, you can select
7111         addresses to create aliases, or to mail.  You can tag multiple
7112         addressesto mail, start a new query, or have a new query appended to
7113         the current
7114         responses.
7115       </para>
7116       
7117       <para>
7118         The other mechanism for accessing the query function is for address
7119         completion, similar to the alias completion.  In any prompt for address
7120         entry, you can use the complete-query function (default: ^T) to
7121         run a
7122         query based on the current address you have typed.  Like aliases, mutt
7123         will look for what you have typed back to the last space or comma.  If
7124         there is a single response for that query, mutt will expand the address
7125         in place.  If there are multiple responses, mutt will activate the
7126         querymenu.  At the query menu, you can select one or more addresses to
7127         be
7128         added to the prompt.
7129       </para>
7130       
7131       <para>
7132         
7133       </para>
7134       
7135     </sect1>
7136     
7137     <sect1 id="mailbox-formats">
7138       <title>Mailbox Formats</title>
7139       
7140       <para>
7141         Mutt-ng supports reading and writing of four different mailbox formats:
7142         mbox, MMDF, MH and Maildir.  The mailbox type is autodetected, so there
7143         is no need to use a flag for different mailbox types.  When creating
7144         newmailboxes, Mutt-ng uses the default specified with the
7145         <muttng-doc:varref name="mbox-type"/>
7146         variable.
7147       </para>
7148       
7149       <para>
7150         <emphasis role="bold">mbox</emphasis>.  This is the most widely used
7151         mailbox format for UNIX.  All
7152         messages are stored in a single file.  Each message has a line of the
7153         form:
7154       </para>
7155       
7156       <para>
7157         
7158         <muttng-doc:lstmail>
7159 From me@cs.hmc.edu Fri, 11 Apr 1997 11:44:56 PST</muttng-doc:lstmail>
7160         
7161       </para>
7162       
7163       <para>
7164         to denote the start of a new message (this is often referred to as the
7165         ``From_'' line).
7166       </para>
7167       
7168       <para>
7169         <emphasis role="bold">MMDF</emphasis>.  This is a variant of the <emphasis>
7170           mbox
7171         </emphasis>
7172         format.  Each message is
7173         surrounded by lines containing ``^A^A^A^A'' (four
7174         control-A's).
7175       </para>
7176       
7177       <para>
7178         <emphasis role="bold">MH</emphasis>. A radical departure from <emphasis>
7179           mbox
7180         </emphasis>
7181         and <emphasis>MMDF</emphasis>, a mailbox
7182         consists of a directory and each message is stored in a separate file.
7183         The filename indicates the message number (however, this is may not
7184         correspond to the message number Mutt-ng displays). Deleted messages
7185         arerenamed with a comma (,) prepended to the filename. <emphasis role="bold">
7186           Note:
7187         </emphasis>
7188         Mutt
7189         detects this type of mailbox by looking for either <literal>
7190           .mh_sequences
7191         </literal>
7192         or <literal>.xmhcache</literal> (needed to distinguish normal
7193         directories from MH
7194         mailboxes).
7195       </para>
7196       
7197       <para>
7198         <emphasis role="bold">Maildir</emphasis>.  The newest of the mailbox
7199         formats, used by the Qmail MTA (a
7200         replacement for sendmail).  Similar to <emphasis>MH</emphasis>, except
7201         that it adds three
7202         subdirectories of the mailbox: <emphasis>tmp</emphasis>, <emphasis>new</emphasis> and <emphasis>
7203           cur
7204         </emphasis>
7205         .Filenames
7206         for the messages are chosen in such a way they are unique, even when
7207         twoprograms are writing the mailbox over NFS, which means that no file
7208         locking
7209         is needed.
7210       </para>
7211       
7212       <para>
7213         
7214       </para>
7215       
7216     </sect1>
7217     
7218     <sect1 id="shortcuts">
7219       <title>Mailbox Shortcuts</title>
7220       
7221       <para>
7222         There are a number of built in shortcuts which refer to specific
7223         mailboxes.
7224         These shortcuts can be used anywhere you are prompted for a file or
7225         mailbox
7226         path.
7227       </para>
7228       
7229       <para>
7230         
7231         <itemizedlist>
7232           <listitem>
7233             
7234             <para>
7235               ! -- refers to your <muttng-doc:varref name="spoolfile"/>
7236               (incoming) mailbox
7237             </para>
7238           </listitem>
7239           <listitem>
7240             
7241             <para>
7242               &gt; -- refers to your <muttng-doc:varref name="mbox"/> file
7243             </para>
7244           </listitem>
7245           <listitem>
7246             
7247             <para>
7248               &lt; -- refers to your <muttng-doc:varref name="record"/> file
7249             </para>
7250           </listitem>
7251           <listitem>
7252             
7253             <para>
7254               ^ -- refers to the current mailbox
7255             </para>
7256           </listitem>
7257           <listitem>
7258             
7259             <para>
7260               - or !! -- refers to the file you've last visited
7261             </para>
7262           </listitem>
7263           <listitem>
7264             
7265             <para>
7266               ~ -- refers to your home directory
7267             </para>
7268           </listitem>
7269           <listitem>
7270             
7271             <para>
7272               = or + -- refers to your <muttng-doc:varref name="folder"/>
7273               directory
7274             </para>
7275           </listitem>
7276           <listitem>
7277             
7278             <para>
7279               @<emphasis>alias</emphasis> -- refers to the <muttng-doc:hook name="save"/>
7280               as determined by the address of the alias
7281             </para>
7282           </listitem>
7283           
7284         </itemizedlist>
7285         
7286       </para>
7287       
7288       <para>
7289         
7290       </para>
7291       
7292     </sect1>
7293     
7294     <sect1 id="using-lists">
7295       <title>Handling Mailing Lists</title>
7296       
7297       <para>
7298         Mutt-ng has a few configuration options that make dealing with large
7299         amounts of mail easier.  The first thing you must do is to let Mutt
7300         know what addresses you consider to be mailing lists (technically
7301         this does not have to be a mailing list, but that is what it is most
7302         often used for), and what lists you are subscribed to.  This is
7303         accomplished through the use of the <muttng-doc:cmdref name="lists"/>
7304         commands in your muttrc.
7305       </para>
7306       
7307       <para>
7308         Now that Mutt-ng knows what your mailing lists are, it can do several
7309         things, the first of which is the ability to show the name of a list
7310         through which you received a message (i.e., of a subscribed list) in
7311         the <emphasis>index</emphasis> menu display.  This is useful to
7312         distinguish between
7313         personal and list mail in the same mailbox.  In the
7314         <muttng-doc:varref name="index-format"/>
7315         variable, the escape ``%L''
7316         will return the string ``To &lt;list&gt;'' when ``list'' appears in the
7317         ``To'' field, and ``Cc &lt;list&gt;'' when it appears in the ``Cc''
7318         field (otherwise it returns the name of the author).
7319       </para>
7320       
7321       <para>
7322         Often times the ``To'' and ``Cc'' fields in mailing list messages
7323         tend to get quite large. Most people do not bother to remove the
7324         author of the message they are reply to from the list, resulting in
7325         two or more copies being sent to that person.  The ``list-reply''
7326         function, which by default is bound to ``L'' in the <emphasis>index</emphasis> menu
7327         and <emphasis>pager</emphasis>, helps reduce the clutter by only
7328         replying to the
7329         known mailing list addresses instead of all recipients (except as
7330         specified by <literal>Mail-Followup-To</literal>, see below).
7331       </para>
7332       
7333       <para>
7334         Mutt-ng also supports the <literal>Mail-Followup-To</literal> header. 
7335         When you send
7336         a message to a list of recipients which includes one or several
7337         subscribed mailing lists, and if the <muttng-doc:varref name="followup-to"/>
7338         option is set, mutt will generate
7339         a Mail-Followup-To header which contains all the recipients to whom
7340         you send this message, but not your address. This indicates that
7341         group-replies or list-replies (also known as ``followups'') to this
7342         message should only be sent to the original recipients of the
7343         message, and not separately to you - you'll receive your copy through
7344         one of the mailing lists you are subscribed to.
7345       </para>
7346       
7347       <para>
7348         Conversely, when group-replying or list-replying to a message which
7349         has a <literal>Mail-Followup-To</literal> header, mutt will respect
7350         this header if
7351         the <muttng-doc:varref name="honor-followup-to"/>
7352         configuration
7353         variable is set.  Using list-reply will in this case also make sure
7354         that the reply goes to the mailing list, even if it's not specified
7355         in the list of recipients in the <literal>Mail-Followup-To</literal>.
7356       </para>
7357       
7358       <para>
7359         Note that, when header editing is enabled, you can create a
7360         <literal>Mail-Followup-To</literal> header manually.  Mutt-ng will only
7361         auto-generate
7362         this header if it doesn't exist when you send the message.
7363       </para>
7364       
7365       <para>
7366         The other method some mailing list admins use is to generate a
7367         ``Reply-To'' field which points back to the mailing list address rather
7368         than the author of the message.  This can create problems when trying
7369         to reply directly to the author in private, since most mail clients
7370         will automatically reply to the address given in the ``Reply-To''
7371         field.  Mutt-ng uses the <muttng-doc:varref name="reply-to"/>
7372         variable to help decide which address to use.  If set to <emphasis>
7373           ask-yes
7374         </emphasis>
7375         or
7376         <emphasis>ask-no</emphasis>, you will be
7377         prompted as to whether or not you would like to use the address given
7378         inthe ``Reply-To'' field, or reply directly to the address given in the
7379         ``From'' field.  When set to <emphasis>yes</emphasis>, the ``Reply-To''
7380         field will be used when
7381         present.
7382       </para>
7383       
7384       <para>
7385         The ``X-Label:'' header field can be used to further identify mailing
7386         lists or list subject matter (or just to annotate messages
7387         individually).  The <muttng-doc:varref name="index-format"/>
7388         variable's ``%y'' and
7389         ``%Y'' escapes can be used to expand ``X-Label:'' fields in the
7390         index, and Mutt-ng's pattern-matcher can match regular expressions to
7391         ``X-Label:'' fields with the ``<muttng-doc:pattern name="y"/>'' selector.  ``X-Label:'' is
7392         not a
7393         standard message header field, but it can easily be inserted by
7394         procmailand other mail filtering agents.
7395       </para>
7396       
7397       <para>
7398         Lastly, Mutt-ng has the ability to <link linkend="sort">sort</link> the
7399         mailbox into
7400         <link linkend="threads">threads</link>.  A thread is a group of
7401         messages which all relate to the same
7402         subject.  This is usually organized into a tree-like structure where a
7403         message and all of its replies are represented graphically.  If you've
7404         ever
7405         used a threaded news client, this is the same concept.  It makes
7406         dealingwith large volume mailing lists easier because you can easily
7407         delete
7408         uninteresting threads and quickly find topics of value.
7409       </para>
7410       
7411       <para>
7412         
7413       </para>
7414       
7415     </sect1>
7416     
7417     <sect1 id="editing-threads">
7418       <title>Editing threads</title>
7419       
7420       <para>
7421         Mutt-ng has the ability to dynamically restructure threads that are
7422         broken
7423         either by misconfigured software or bad behavior from some
7424         correspondents. This allows to clean your mailboxes formats) from these
7425         annoyances which make it hard to follow a discussion.
7426       </para>
7427       
7428       <sect2 id="editing-threads-link">
7429         <title>Linking threads</title>
7430         
7431         <para>
7432           Some mailers tend to "forget" to correctly set the "In-Reply-To:" and
7433           "References:" headers when replying to a message. This results in
7434           broken
7435           discussions because Mutt-ng has not enough information to guess the
7436           correct
7437           threading.
7438           You can fix this by tagging the reply, then moving to the parent
7439           message
7440           and using the ``link-threads'' function (bound to &#38; by default).
7441           The
7442           reply will then be connected to this "parent" message.
7443         </para>
7444         
7445         <para>
7446           You can also connect multiple children at once, tagging them and
7447           using the
7448           tag-prefix command (';') or the auto_tag option.
7449         </para>
7450         
7451       </sect2>
7452       
7453       <sect2 id="editing-threads-break">
7454         <title>Breaking threads</title>
7455         
7456         <para>
7457           On mailing lists, some people are in the bad habit of starting a new
7458           discussion by hitting "reply" to any message from the list and
7459           changing
7460           the subject to a totally unrelated one.
7461           You can fix such threads by using the ``break-thread'' function
7462           (boundby default to #), which will turn the subthread starting
7463           from the
7464           current message into a whole different thread.
7465         </para>
7466         
7467         <para>
7468           
7469         </para>
7470         
7471       </sect2>
7472       
7473     </sect1>
7474     
7475     <sect1 id="dsn">
7476       <title>Delivery Status Notification (DSN) Support</title>
7477       
7478       <para>
7479         <muttng-doc:rfc num="1894"/> defines a set of MIME content types for relaying information
7480         about the status of electronic mail messages.  These can be thought of
7481         as
7482         ``return receipts.''
7483       </para>
7484       
7485       <para>
7486         Users can make use of it in one of the following two ways:
7487       </para>
7488       
7489       <para>
7490         
7491         <itemizedlist>
7492           <listitem>
7493             
7494             <para>
7495               Berkeley sendmail 8.8.x currently has some command line options
7496               in which the mail client can make requests as to what type of
7497               status
7498               messages should be returned.
7499             </para>
7500           </listitem>
7501           <listitem>
7502             
7503             <para>
7504               The SMTP support via libESMTP supports it, too.
7505             </para>
7506           </listitem>
7507           
7508         </itemizedlist>
7509         
7510       </para>
7511       
7512       <para>
7513         To support this, there are two variables:
7514       </para>
7515       
7516       <para>
7517         
7518         <itemizedlist>
7519           <listitem>
7520             
7521             <para>
7522               <muttng-doc:varref name="dsn-notify"/> is used
7523               to request receipts for different results (such as failed
7524               message,message delivered, etc.).
7525               
7526             </para>
7527           </listitem>
7528           <listitem>
7529             
7530             <para>
7531               <muttng-doc:varref name="dsn-return"/> requests
7532               how much of your message should be returned with the receipt
7533               (headers or full message).
7534               
7535             </para>
7536           </listitem>
7537           
7538         </itemizedlist>
7539         
7540       </para>
7541       
7542       <para>
7543         Please see the reference chapter for possible values.
7544       </para>
7545       
7546       <para>
7547         
7548       </para>
7549       
7550     </sect1>
7551     
7552     <sect1 id="pop3">
7553       <title>POP3 Support (OPTIONAL)</title>
7554       
7555       <para>
7556         If Mutt-ng was compiled with POP3 support (by running the <emphasis>
7557           configure
7558         </emphasis>
7559         script with the <emphasis>--enable-pop</emphasis> flag), it has the
7560         ability to work
7561         with mailboxes located on a remote POP3 server and fetch mail for local
7562         browsing.
7563       </para>
7564       
7565       <para>
7566         You can access the remote POP3 mailbox by selecting the folder
7567         <literal>pop://popserver/</literal>.
7568       </para>
7569       
7570       <para>
7571         You can select an alternative port by specifying it with the server,
7572         i.e.:
7573         <literal>pop://popserver:port/</literal>.
7574       </para>
7575       
7576       <para>
7577         You can also specify different username for each folder, i.e.:
7578         <literal>pop://username@popserver[:port]/</literal>.
7579       </para>
7580       
7581       <para>
7582         Polling for new mail is more expensive over POP3 than locally. For this
7583         reason the frequency at which Mutt-ng will check for mail remotely can
7584         be
7585         controlled by the
7586         <muttng-doc:varref name="pop-mail-check"/>
7587         variable, which defaults to every 60 seconds.
7588       </para>
7589       
7590       <para>
7591         If Mutt-ng was compiled with SSL support (by running the <emphasis>
7592           configure
7593         </emphasis>
7594         script with the <emphasis>--with-ssl</emphasis> flag), connections to
7595         POP3 servers
7596         can be encrypted. This naturally requires that the server supports
7597         SSL encrypted connections. To access a folder with POP3/SSL, you should
7598         use pops: prefix, ie:
7599         <literal>pops://[username@]popserver[:port]/</literal>.
7600       </para>
7601       
7602       <para>
7603         Another way to access your POP3 mail is the <emphasis>fetch-mail</emphasis> function
7604         (default: G).  It allows to connect to <link
7605           linkend="pop-host">pop-host</link>
7606         ,fetch all your new mail and place it in the
7607         local <muttng-doc:varref name="spoolfile"/>.  After this
7608         point, Mutt-ng runs exactly as if the mail had always been local.
7609       </para>
7610       
7611       <para>
7612         <emphasis role="bold">Note:</emphasis> If you only need to fetch all
7613         messages to local mailbox
7614         you should consider using a specialized program, such as
7615         <muttng-doc:man name="fetchmail"/>.
7616       </para>
7617       
7618       <para>
7619         
7620       </para>
7621       
7622     </sect1>
7623     
7624     <sect1 id="imap">
7625       <title>IMAP Support (OPTIONAL)</title>
7626       
7627       <para>
7628         If Mutt-ng was compiled with IMAP support (by running the
7629         <emphasis>configure</emphasis> script with the
7630         <emphasis>--enable-imap</emphasis> flag), it has the
7631         ability to work with folders located on a remote IMAP server.
7632       </para>
7633       
7634       <para>
7635         You can access the remote inbox by selecting the folder via its
7636         URL:
7637       </para>
7638
7639       <para>
7640         <screen>
7641 imap://imapserver/INBOX</screen>
7642       </para>
7643
7644       <para>
7645         where <literal>imapserver</literal> is the name of the IMAP
7646         server and <literal>INBOX</literal> is the special name for your
7647         spool mailbox on the IMAP server. If you want to access another
7648         mail folder at the IMAP server, you should use
7649       </para>
7650
7651       <para>
7652         <screen>
7653 imap://imapserver/path/to/folder</screen>
7654       </para>
7655         
7656       <para>
7657         where <literal>path/to/folder</literal> is the path
7658         of the folder you want to access. You can select an alternative
7659         port by specifying it with the server, i.e.:
7660       </para>
7661
7662       <para>
7663         <screen>
7664 imap://imapserver:port/INBOX</screen>
7665       </para>
7666       
7667       <para>
7668         You can also specify different username for each folder by
7669         prenpending your username and an @ symbol to the server's name.
7670       </para>
7671       
7672       <para>
7673         If Mutt-ng was compiled with SSL support (by running the <emphasis>
7674           configure
7675         </emphasis>
7676         script with the <emphasis>--with-ssl</emphasis> flag), connections to
7677         IMAP servers
7678         can be encrypted. This naturally requires that the server supports
7679         SSL encrypted connections. To access a folder with IMAP/SSL, you only
7680         need to substitute the initial <literal>imap://</literal> by
7681         <literal>imaps://</literal> in the above examples.
7682       </para>
7683       
7684       <para>
7685         Note that not all servers use / as the hierarchy separator.  Mutt-ng
7686         should
7687         correctly notice which separator is being used by the server and
7688         convertpaths accordingly.
7689       </para>
7690       
7691       <para>
7692         When browsing folders on an IMAP server, you can toggle whether to look
7693         at only the folders you are subscribed to, or all folders with the
7694         <emphasis>toggle-subscribed</emphasis> command.  See also the 
7695         <muttng-doc:varref name="imap-list-subscribed"/>
7696         variable.
7697       </para>
7698       
7699       <para>
7700         Polling for new mail on an IMAP server can cause noticeable delays. So,
7701         you'll
7702         want to carefully tune the
7703         <muttng-doc:varref name="imap-mail-check"/>
7704         and
7705         <muttng-doc:varref name="timeout"/>
7706         variables.
7707       </para>
7708       
7709       <para>
7710         Note that if you are using mbox as the mail store on UW servers prior
7711         tov12.250, the server has been reported to disconnect a client if
7712         another client
7713         selects the same folder.
7714       </para>
7715       
7716       <sect2 id="imap-browser">
7717         <title>The Folder Browser</title>
7718         
7719         <para>
7720           As of version 1.2, mutt supports browsing mailboxes on an IMAP
7721           server. This is mostly the same as the local file browser, with the
7722           following differences:
7723           
7724           <itemizedlist>
7725             <listitem>
7726               
7727               <para>
7728                 Instead of file permissions, mutt displays the string "IMAP",
7729                 possibly followed by the symbol "+", indicating
7730                 that the entry contains both messages and subfolders. On
7731                 Cyrus-like servers folders will often contain both messages and
7732                 subfolders. 
7733               </para>
7734             </listitem>
7735             <listitem>
7736               
7737               <para>
7738                 For the case where an entry can contain both messages and
7739                 subfolders, the selection key (bound to <literal>enter</literal> by default)
7740                 will choose to descend into the subfolder view. If you wish to
7741                 view
7742                 the messages in that folder, you must use <literal>view-file</literal> instead
7743                 (bound to <literal>space</literal> by default).
7744               </para>
7745             </listitem>
7746             <listitem>
7747               
7748               <para>
7749                 You can create, delete and rename mailboxes with the
7750                 <literal>create-mailbox</literal>, <literal>delete-mailbox</literal>, and
7751                 <literal>rename-mailbox</literal> commands (default bindings: <literal>
7752                   C
7753                 </literal>
7754                 ,
7755                 <literal>d</literal> and <literal>r</literal>, respectively).
7756                 You may also
7757                 <literal>subscribe</literal> and <literal>unsubscribe</literal>
7758                 to mailboxes (normally
7759                 these are bound to <literal>s</literal> and <literal>u</literal>, respectively).
7760               </para>
7761             </listitem>
7762             
7763           </itemizedlist>
7764           
7765         </para>
7766         
7767       </sect2>
7768       
7769       <sect2 id="imap-auth">
7770         <title>Authentication</title>
7771         
7772         <para>
7773           Mutt-ng supports four authentication methods with IMAP servers: SASL,
7774           GSSAPI, CRAM-MD5, and LOGIN (there is a patch by Grant Edwards to add
7775           NTLM authentication for you poor exchange users out there, but it has
7776           yet to be integrated into the main tree). There is also support for
7777           the pseudo-protocol ANONYMOUS, which allows you to log in to a public
7778           IMAP server without having an account. To use ANONYMOUS, simply make
7779           your username blank or "anonymous".
7780         </para>
7781         
7782         <para>
7783           SASL is a special super-authenticator, which selects among several
7784           protocols
7785           (including GSSAPI, CRAM-MD5, ANONYMOUS, and DIGEST-MD5) the most
7786           secure
7787           method available on your host and the server. Using some of these
7788           methods
7789           (including DIGEST-MD5 and possibly GSSAPI), your entire session will
7790           be
7791           encrypted and invisible to those teeming network snoops. It is the
7792           best
7793           option if you have it. To use it, you must have the Cyrus SASL
7794           libraryinstalled on your system and compile mutt with the <emphasis>
7795             --with-sasl
7796           </emphasis>
7797           flag.
7798         </para>
7799         
7800         <para>
7801           Mutt-ng will try whichever methods are compiled in and available on
7802           the server,
7803           in the following order: SASL, ANONYMOUS, GSSAPI, CRAM-MD5, LOGIN.
7804         </para>
7805         
7806         <para>
7807           There are a few variables which control authentication: 
7808           
7809           <itemizedlist>
7810             <listitem>
7811               
7812               <para>
7813                 <muttng-doc:varref name="imap-user"/> - controls
7814                 the username under which you request authentication on the IMAP
7815                 server,
7816                 for all authenticators. This is overridden by an explicit
7817                 username in
7818                 the mailbox path (i.e. by using a mailbox name of the form
7819                 <literal>{user@host}</literal>).
7820               </para>
7821             </listitem>
7822             <listitem>
7823               
7824               <para>
7825                 <muttng-doc:varref name="imap-pass"/> - a
7826                 password which you may preset, used by all authentication
7827                 methods where
7828                 a password is needed.
7829               </para>
7830             </listitem>
7831             <listitem>
7832               
7833               <para>
7834                 <muttng-doc:varref name="imap-authenticators"/>
7835                 - a colon-delimited list of IMAP
7836                 authentication methods to try, in the order you wish to try
7837                 them. If
7838                 specified, this overrides mutt's default (attempt everything,
7839                 in the order
7840                 listed above).
7841               </para>
7842             </listitem>
7843             
7844           </itemizedlist>
7845           
7846         </para>
7847         
7848         <para>
7849           
7850         </para>
7851         
7852       </sect2>
7853       
7854     </sect1>
7855     
7856     <sect1 id="nntp">
7857       <title>NNTP Support (OPTIONAL)</title>
7858       
7859       <para>
7860         If compiled with ``--enable-nntp'' option, Mutt-ng can read news from
7861         a newsserver via NNTP.  You can open a newsgroup with the
7862         ``change-newsgroup'' function from the index/pager which is by default
7863         bound to <muttng-doc:key>i</muttng-doc:key>.
7864       </para>
7865       
7866       <para>
7867         The Default newsserver can be obtained from the <muttng-doc:envvar name="NNTPSERVER"/>
7868         environment variable. Like other
7869         news readers,
7870         info about subscribed newsgroups is saved in a file as specified by the
7871         <muttng-doc:varref name="nntp-newsrc"/> variable.
7872         Article headers are cached and can be loaded from a file when a
7873         newsgroup is entered instead loading from newsserver; currently, this
7874         caching mechanism still is different from the header caching for
7875         maildir/IMAP.
7876       </para>
7877       
7878       <sect2 id="nntp-scoring">
7879         <title>Again: Scoring</title>
7880         
7881         <para>
7882           Especially for Usenet, people often ask for advanced filtering
7883           and scoring functionality. Of course, mutt-ng has scoring and
7884           allows a killfile, too. How to use a killfile has been discussed
7885           in <link linkend="command-score">Message Scoring</link>.
7886         </para>
7887         
7888         <para>
7889           What has not been discusses in detail is mutt-ng's built-in
7890           realname filter. For may newsreaders including those for
7891           ``advanced users'' like <emphasis>slrn</emphasis> or <emphasis>tin</emphasis>, there are frequent
7892           request for such functionality. The solutions offered often are
7893           complicated regular expressions.
7894         </para>
7895         
7896         <para>
7897           In mutt-ng this is as easy as
7898         </para>
7899         
7900         <para>
7901           
7902           <muttng-doc:lstconf>
7903 score ~* =42</muttng-doc:lstconf>
7904           
7905         </para>
7906         
7907         <para>
7908           This tells mutt-ng to apply a score of 42 to all messages whose
7909           sender specified a valid realname and a valid email address. Using
7910         </para>
7911         
7912         <para>
7913           
7914           <muttng-doc:lstconf>
7915 score !~* =42</muttng-doc:lstconf>
7916           
7917         </para>
7918         
7919         <para>
7920           on the contrary applies a score of 42 to all messages <emphasis>not</emphasis>
7921           matching those criteria which are very strict:
7922         </para>
7923         
7924         <para>
7925           
7926           <itemizedlist>
7927             <listitem>
7928               
7929               <para>
7930                 Email addresses must be valid according to <muttng-doc:rfc num="2822"/>
7931               </para>
7932             </listitem>
7933             <listitem>
7934               
7935               <para>
7936                 the name must consist of at least 2 fields whereby a field
7937                 must not end in a dot. This means that ``Joe User'' and ``Joe
7938                 A.User'' are valid while ``J. User'' and ``J. A. User'' aren't.
7939                 
7940               </para>
7941             </listitem>
7942             <listitem>
7943               
7944               <para>
7945                 it's assumed that users are interested in reading their
7946                 own mail and mail from people who they have defined an alias
7947                 forso that those 2 groups of messages are excluded from the
7948                 strict
7949                 rules.
7950                 
7951               </para>
7952             </listitem>
7953             
7954           </itemizedlist>
7955           
7956         </para>
7957         
7958         <para>
7959           
7960         </para>
7961         
7962         <para>
7963           
7964         </para>
7965         
7966       </sect2>
7967       
7968     </sect1>
7969     
7970     <sect1 id="smtp">
7971       <title>SMTP Support (OPTIONAL)</title>
7972       
7973       <para>
7974         Mutt-ng can be built using a library called ``libESMTP'' which
7975         provides SMTP functionality. When <literal>configure</literal> was
7976         called with
7977         <literal>--with-libesmtp</literal> or the output <literal>muttng -v</literal> contains
7978         <literal>+USE_LIBESMTP</literal>, this will be or is the case
7979         already. The SMTP
7980         support includes support for Delivery Status Notification
7981         (see <link linkend="dsn">dsn</link> section) as well as
7982         handling the <literal>8BITMIME</literal> flag controlled via
7983         <muttng-doc:varref name="use-8bitmime"/>.
7984       </para>
7985       
7986       <para>
7987         To enable sending mail directly via SMTP without an MTA such as
7988         Postfix or SSMTP and the like, simply set the <muttng-doc:varref name="smtp-host"/>
7989         variable pointing to your SMTP server.
7990       </para>
7991       
7992       <para>
7993         Authentication mechanisms are available via the <muttng-doc:varref name="smtp-user"/>
7994         and <muttng-doc:varref name="smtp-pass"/> variables.
7995       </para>
7996       
7997       <para>
7998         Transport Encryption via the StartTLS command is also available. For
7999         this to work, first of all Mutt-ng must be built with SSL or GNUTLS.
8000         Secondly, the <muttng-doc:varref name="smtp-use-tls"/> variable
8001         must be either set
8002         to ``enabled'' or ``required.'' In both cases, StartTLS will be used if
8003         the server supports it: for the second case, the connection will fail
8004         ifit doesn't while switching back to unencrypted communication for the
8005         first one.
8006       </para>
8007       
8008       <para>
8009         Some mail providers require user's to set a particular envelope
8010         sender, i.e. they allow for only one value which may not be what the
8011         user wants to send as the <literal>From:</literal> header. In this
8012         case, the variable
8013         <muttng-doc:varref name="smtp-envelope"/> may be used
8014         to set the envelope different from the <literal>From:</literal> header.
8015       </para>
8016       
8017     </sect1>
8018     
8019     <sect1 id="account-hook">
8020       <title>Managing multiple IMAP/POP/NNTP accounts (OPTIONAL)</title>
8021       
8022       <para>
8023         If you happen to have accounts on multiple IMAP and/or POP servers,
8024         you may find managing all the authentication settings inconvenient and
8025         error-prone.  The <muttng-doc:hook name="account"/> command may help. This hook works like
8026         <muttng-doc:hook name="folder"/> but is invoked whenever you access a remote mailbox
8027         (including inside the folder browser), not just when you open the
8028         mailbox.
8029       </para>
8030       
8031       <para>
8032         Some examples:
8033       </para>
8034       
8035       <para>
8036         
8037         <muttng-doc:lstconf>
8038 account-hook . 'unset imap_user; unset imap_pass; unset tunnel'
8039 account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo'
8040 account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'</muttng-doc:lstconf>
8041         
8042       </para>
8043       
8044       <para>
8045         
8046       </para>
8047       
8048     </sect1>
8049     
8050     <sect1 id="urlview">
8051       <title>Start a WWW Browser on URLs (EXTERNAL)</title>
8052       
8053       <para>
8054         If a message contains URLs (<emphasis>unified resource locator</emphasis> = address in the
8055         WWW space like <emphasis>http://www.mutt.org/</emphasis>), it is
8056         efficient to get
8057         a menu with all the URLs and start a WWW browser on one of them.  This
8058         functionality is provided by the external urlview program which can be
8059         retrieved at <muttng-doc:web url="ftp://ftp.mutt.org/mutt/contrib/"/>
8060         and the configuration commands:
8061         
8062         <muttng-doc:lstconf>
8063 macro index \cb |urlview\n
8064 macro pager \cb |urlview\n</muttng-doc:lstconf>
8065         
8066       </para>
8067       
8068       <para>
8069         
8070       </para>
8071       
8072     </sect1>
8073     
8074     <sect1 id="compressed-folders">
8075       <title>Compressed folders Support (OPTIONAL)</title>
8076       
8077       <para>
8078         If Mutt-ng was compiled with compressed folders support (by running the
8079         <emphasis>configure</emphasis> script with the <emphasis>
8080           --enable-compressed
8081         </emphasis>
8082         flag), Mutt
8083         can open folders stored in an arbitrary format, provided that the user
8084         has a script to convert from/to this format to one of the accepted.
8085       </para>
8086       
8087       <para>
8088         The most common use is to open compressed archived folders e.g. with
8089         gzip.
8090       </para>
8091       
8092       <para>
8093         In addition, the user can provide a script that gets a folder in an
8094         accepted format and appends its context to the folder in the
8095         user-defined format, which may be faster than converting the entire
8096         folder to the accepted format, appending to it and converting back to
8097         the user-defined format.
8098       </para>
8099       
8100       <para>
8101         There are three hooks defined (<muttng-doc:hook name="open"/>,
8102         <muttng-doc:hook name="close"/> and <muttng-doc:hook name="append"/>
8103         )which define commands to uncompress and compress
8104         a folder and to append messages to an existing compressed folder 
8105         respectively.
8106       </para>
8107       
8108       <para>
8109         For example:
8110       </para>
8111       
8112       <para>
8113         
8114         <muttng-doc:lstconf>
8115 open-hook \\.gz$ "gzip -cd %f &gt; %t" 
8116 close-hook \\.gz$ "gzip -c %t &gt; %f"
8117 append-hook \\.gz$ "gzip -c %t &gt;&gt; %f" </muttng-doc:lstconf>
8118         
8119       </para>
8120       
8121       <para>
8122         You do not have to specify all of the commands. If you omit <muttng-doc:hook name="append"/>
8123         ,the folder will be open and
8124         closed again each time you will add to it. If you omit <muttng-doc:hook name="close"/>
8125         (or give empty command) , the
8126         folder will be open in the  mode. If you specify <muttng-doc:hook name="append"/>
8127         though you'll be able to append
8128         to the folder.
8129       </para>
8130       
8131       <para>
8132         Note that Mutt-ng will only try to use hooks if the file is not in one
8133         of
8134         the accepted formats. In particular, if the file is empty, mutt
8135         supposes it is not compressed. This is important because it allows the
8136         use of programs that do not have well defined extensions. Just use
8137         &quot;.&quot; as a regexp. But this may be surprising if your
8138         compressing script produces empty files. In this situation, unset
8139         <muttng-doc:varref name="save-empty"/>
8140         ,so that the compressed file
8141         will be removed if you delete all of the messages.
8142       </para>
8143       
8144       <sect2 id="open-hook">
8145         <title>Open a compressed mailbox for reading</title>
8146         
8147         <para>
8148           Usage: <muttng-doc:hook name="open"/> <emphasis>regexp</emphasis> &quot;<emphasis>command</emphasis>&quot;
8149         </para>
8150         
8151         <para>
8152           The <emphasis>command</emphasis> is the command that can be used for
8153           opening the
8154           folders whose names match <emphasis>regexp</emphasis>.
8155         </para>
8156         
8157         <para>
8158           The <emphasis>command</emphasis> string is the printf-like format
8159           string, and it
8160           should accept two parameters: %f, which is replaced with the
8161           (compressed) folder name, and %t which is replaced with the
8162           name of the temporary folder to which to write.
8163         </para>
8164         
8165         <para>
8166           %f and %t can be repeated any number of times in the
8167           command string, and all of the entries are replaced with the
8168           appropriate folder name. In addition, %% is replaced by
8169           %, as in printf, and any other %anything is left as is.
8170         </para>
8171         
8172         <para>
8173           The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis> remove the original compressed file.
8174           The <emphasis>command</emphasis> should return non-zero exit status
8175           if it fails, so
8176           mutt knows something's wrong.
8177         </para>
8178         
8179         <para>
8180           Example:
8181         </para>
8182         
8183         <para>
8184           
8185           <muttng-doc:lstconf>
8186 open-hook \\.gz$ "gzip -cd %f &gt; %t"</muttng-doc:lstconf>
8187           
8188         </para>
8189         
8190         <para>
8191           If the <emphasis>command</emphasis> is empty, this operation is
8192           disabled for this file
8193           type.
8194         </para>
8195         
8196       </sect2>
8197       
8198       <sect2 id="close-hook">
8199         <title>Write a compressed mailbox</title>
8200         
8201         <para>
8202           Usage: <muttng-doc:hook name="close"/> <emphasis>regexp</emphasis>&quot;<emphasis>command</emphasis>&quot;
8203         </para>
8204         
8205         <para>
8206           This is used to close the folder that was open with the <muttng-doc:hook name="open"/>
8207           command after some changes were made to it.
8208         </para>
8209         
8210         <para>
8211           The <emphasis>command</emphasis> string is the command that can be
8212           used for closing the
8213           folders whose names match <emphasis>regexp</emphasis>. It has the
8214           same format as in 
8215           the <muttng-doc:hook name="open"/> command. Temporary
8216           folder
8217           in this case is the folder previously produced by the <muttng-doc:hook name="open"/>
8218           command.
8219         </para>
8220         
8221         <para>
8222           The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis> remove the decompressed file. The
8223           <emphasis>command</emphasis> should return non-zero exit status if it
8224           fails, so mutt
8225           knows something's wrong.
8226         </para>
8227         
8228         <para>
8229           Example:
8230         </para>
8231         
8232         <para>
8233           
8234           <muttng-doc:lstconf>
8235 close-hook \\.gz$ "gzip -c %t &gt; %f"</muttng-doc:lstconf>
8236           
8237         </para>
8238         
8239         <para>
8240           If the <emphasis>command</emphasis> is empty, this operation is
8241           disabled for this file
8242           type, and the file can only be open in the readonly mode.
8243         </para>
8244         
8245         <para>
8246           <muttng-doc:hook name="close"/> is not called when you
8247           exit
8248           from the folder if the folder was not changed.
8249         </para>
8250         
8251       </sect2>
8252       
8253       <sect2 id="append-hook">
8254         <title>Append a message to a compressed mailbox</title>
8255         
8256         <para>
8257           Usage: <muttng-doc:hook name="append"/> <emphasis>regexp</emphasis>&quot;<emphasis>command</emphasis>&quot;
8258         </para>
8259         
8260         <para>
8261           This command is used for saving to an existing compressed folder.
8262           The <emphasis>command</emphasis> is the command that can be used for
8263           appending to the
8264           folders whose names match <emphasis>regexp</emphasis>. It has the
8265           same format as in 
8266           the <muttng-doc:hook name="open"/> command.
8267           The temporary folder in this case contains the messages that are
8268           beingappended. 
8269         </para>
8270         
8271         <para>
8272           The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis> remove the decompressed file. The
8273           <emphasis>command</emphasis> should return non-zero exit status if it
8274           fails, so mutt
8275           knows something's wrong.
8276         </para>
8277         
8278         <para>
8279           Example:
8280         </para>
8281         
8282         <para>
8283           
8284           <muttng-doc:lstconf>
8285 append-hook \\.gz$ "gzip -c %t &gt;&gt; %f" </muttng-doc:lstconf>
8286           
8287         </para>
8288         
8289         <para>
8290           When <muttng-doc:hook name="append"/> is used, the
8291           folder is
8292           not opened, which saves time, but this means that we can not find out
8293           what the folder type is. Thus the default (<muttng-doc:varref name="mbox-type"/>
8294           )type is always supposed (i.e.
8295           this is the format used for the temporary folder).
8296         </para>
8297         
8298         <para>
8299           If the file does not exist when you save to it, <muttng-doc:hook name="close"/>
8300           is called, and not <muttng-doc:hook name="append"/>. <muttng-doc:hook name="append"/>
8301           is only
8302           for appending to existing folders.
8303         </para>
8304         
8305         <para>
8306           If the <emphasis>command</emphasis> is empty, this operation is
8307           disabled for this file
8308           type. In this case, the folder will be open and closed again (using
8309           <muttng-doc:hook name="open"/> and <muttng-doc:hook name="close"/>
8310           respectively) each time you will add to it.
8311         </para>
8312         
8313       </sect2>
8314       
8315       <sect2 id="encrypted-folders">
8316         <title>Encrypted folders</title>
8317         
8318         <para>
8319           The compressed folders support can also be used to handle encrypted
8320           folders. If you want to encrypt a folder with PGP, you may want to
8321           usethe following hooks:
8322         </para>
8323         
8324         <para>
8325           
8326           <muttng-doc:lstconf>
8327 open-hook  \\.pgp$ "pgp -f &lt; %f &gt; %t"
8328 close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId &lt; %t &gt; %f"</muttng-doc:lstconf>
8329           
8330         </para>
8331         
8332         <para>
8333           Please note, that PGP does not support appending to an encrypted
8334           folder, so there is no <muttng-doc:hook name="append"/> defined.
8335         </para>
8336         
8337         <para>
8338           <emphasis role="bold">Note:</emphasis> the folder is temporary stored
8339           decrypted in the /tmp
8340           directory, where it can be read by your system administrator. So
8341           thinkabout the security aspects of this.
8342         </para>
8343         
8344         <para>
8345           
8346         </para>
8347         
8348         <para>
8349           
8350         </para>
8351         
8352       </sect2>
8353       
8354     </sect1>
8355     
8356   </chapter>
8357   <!--}}}-->
8358   
8359   <chapter id="mime-support"> <!--{{{-->
8360     <title>Mutt-ng's MIME Support</title>
8361     
8362     <para>
8363       Quite a bit of effort has been made to make Mutt-ng the premier text-mode
8364       MIME MUA.  Every effort has been made to provide the functionality that
8365       the discerning MIME user requires, and the conformance to the standards
8366       wherever possible.  When configuring Mutt-ng for MIME, there are two
8367       extratypes of configuration files which Mutt-ng uses.  One is the
8368       <literal>mime.types</literal> file, which contains the mapping of file
8369       extensions to 
8370       IANA MIME types.  The other is the <literal>mailcap</literal> file, which
8371       specifies
8372       the external commands to use for handling specific MIME types.
8373     </para>
8374     
8375     <sect1 id="mime">
8376       <title>Using MIME in Mutt</title>
8377       
8378       <para>
8379         There are three areas/menus in Mutt-ng which deal with MIME, they are
8380         the
8381         pager (while viewing a message), the attachment menu and the compose
8382         menu.
8383       </para>
8384       
8385       <sect2 id="mime-view">
8386         <title>Viewing MIME messages in the pager</title>
8387         
8388         <para>
8389           When you select a message from the index and view it in the pager,
8390           Mutt
8391           decodes the message to a text representation.  Mutt-ng internally
8392           supports
8393           a number of MIME types, including <literal>text/plain, text/enriched,
8394             message/rfc822, and message/news
8395           </literal>
8396           .In addition, the export
8397           controlled version of Mutt-ng recognizes a variety of PGP MIME types,
8398           including PGP/MIME and application/pgp.
8399         </para>
8400         
8401         <para>
8402           Mutt-ng will denote attachments with a couple lines describing them.
8403           These lines are of the form:
8404           
8405           <screen>
8406 [-- Attachment #1: Description --]
8407 [-- Type: text/plain, Encoding: 7bit, Size: 10000 --]</screen>
8408           
8409           Where the <literal>Description</literal> is the description or
8410           filename given for the
8411           attachment, and the <literal>Encoding</literal> is one of
8412           <literal>7bit/8bit/quoted-printable/base64/binary</literal>.
8413         </para>
8414         
8415         <para>
8416           If Mutt-ng cannot deal with a MIME type, it will display a message
8417           like:
8418           
8419           <screen>
8420 [-- image/gif is unsupported (use 'v' to view this part) --]</screen>
8421           
8422         </para>
8423         
8424       </sect2>
8425       
8426       <sect2 id="attach-menu">
8427         <title>The Attachment Menu</title>
8428         
8429         <para>
8430           The default binding for <literal>view-attachments</literal> is `v',
8431           which displays the
8432           attachment menu for a message.  The attachment menu displays a list
8433           ofthe attachments in a message.  From the attachment menu, you can
8434           save,
8435           print, pipe, delete, and view attachments.  You can apply these
8436           operations to a group of attachments at once, by tagging the
8437           attachments
8438           and by using the ``tag-prefix'' operator.  You can also reply to the
8439           current message from this menu, and only the current attachment (or
8440           the
8441           attachments tagged) will be quoted in your reply.  You can view
8442           attachments as text, or view them using the mailcap viewer
8443           definition.
8444         </para>
8445         
8446         <para>
8447           Finally, you can apply the usual message-related functions (like 
8448           <muttng-doc:funcref name="resend-message"/>, and the reply
8449           and forward functions) to attachments of type <literal>message/rfc822</literal>.
8450         </para>
8451         
8452         <para>
8453           See the help on the attachment menu for more information.
8454         </para>
8455         
8456       </sect2>
8457       
8458       <sect2 id="compose-menu">
8459         <title>The Compose Menu</title>
8460         
8461         <para>
8462           The compose menu is the menu you see before you send a message.  It
8463           allows you to edit the recipient list, the subject, and other aspects
8464           of your message.  It also contains a list of the attachments of your
8465           message, including the main body.  From this menu, you can print,
8466           copy,
8467           filter, pipe, edit, compose, review, and rename an attachment or a
8468           list of tagged attachments.  You can also modifying the attachment
8469           information, notably the type, encoding and description.
8470         </para>
8471         
8472         <para>
8473           Attachments appear as follows:
8474           
8475           <screen>
8476 1 [text/plain, 7bit, 1K]             /tmp/mutt-euler-8082-0 &lt;no description&gt;
8477 2 [applica/x-gunzip, base64, 422K]   ~/src/mutt-0.85.tar.gz &lt;no description&gt;</screen>
8478           
8479         </para>
8480         
8481         <para>
8482           The '-' denotes that Mutt-ng will delete the file after sending (or
8483           postponing, or canceling) the message.  It can be toggled with the
8484           <literal>toggle-unlink</literal> command (default: u).  The next
8485           field is the MIME
8486           content-type, and can be changed with the <literal>edit-type</literal> command
8487           (default: ^T).  The next field is the encoding for the
8488           attachment,
8489           which allows a binary message to be encoded for transmission on 7bit
8490           links.  It can be changed with the <literal>edit-encoding</literal>
8491           command
8492           (default: ^E).  The next field is the size of the attachment,
8493           rounded to kilobytes or megabytes.  The next field is the filename,
8494           which can be changed with the <literal>rename-file</literal> command
8495           (default: R).
8496           The final field is the description of the attachment, and can be
8497           changed with the <literal>edit-description</literal> command
8498           (default: d).
8499         </para>
8500         
8501         <para>
8502           
8503         </para>
8504         
8505       </sect2>
8506       
8507     </sect1>
8508     
8509     <sect1 id="mime-types">
8510       <title>
8511         MIME Type configuration with <literal>mime.types</literal>  
8512       </title>
8513       
8514       <para>
8515         When you add an attachment to your mail message, Mutt-ng searches your
8516         personal mime.types file within <muttng-doc:envvar name="HOME"/> and then
8517         the system mime.types file at <literal>/usr/local/share/mutt/mime.types</literal> or
8518         <literal>/etc/mime.types</literal>
8519       </para>
8520       
8521       <para>
8522         The mime.types file consist of lines containing a MIME type and a space
8523         separated list of extensions.  For example:
8524         
8525         <screen>
8526 application/postscript          ps eps
8527 application/pgp                 pgp
8528 audio/x-aiff                    aif aifc aiff</screen>
8529         
8530         A sample <literal>mime.types</literal> file comes with the Mutt-ng
8531         distribution, and
8532         should contain most of the MIME types you are likely to use.  
8533       </para>
8534       
8535       <para>
8536         If Mutt-ng can not determine the mime type by the extension of the file
8537         you
8538         attach, it will look at the file.  If the file is free of binary
8539         information, Mutt-ng will assume that the file is plain text, and mark
8540         it
8541         as <literal>text/plain</literal>.  If the file contains binary
8542         information, then Mutt-ng will
8543         mark it as <literal>application/octet-stream</literal>.  You can change
8544         the MIME
8545         type that Mutt-ng assigns to an attachment by using the <literal>
8546           edit-type
8547         </literal>
8548         command from the compose menu (default: ^T). The MIME type is
8549         actually a
8550         major mime type followed by the sub-type, separated by a '/'. 6 major
8551         types: application, text, image, video, audio, and model have been
8552         approved
8553         after various internet discussions. Mutt-ng recognises all of these if
8554         the 
8555         appropriate entry is found in the mime.types file. It also recognises
8556         other
8557         major mime types, such as the chemical type that is widely used in the 
8558         molecular modelling community to pass molecular data in various forms
8559         to 
8560         various molecular viewers. Non-recognised mime types should only be
8561         used 
8562         if the recipient of the message is likely to be expecting such
8563         attachments.
8564       </para>
8565       
8566       <para>
8567         
8568       </para>
8569       
8570     </sect1>
8571     
8572     <sect1 id="mime-mailcap">
8573       <title>
8574         MIME Viewer configuration with <literal>mailcap</literal>  
8575       </title>
8576       
8577       <para>
8578         Mutt-ng supports <muttng-doc:rfc num="1524"/> MIME Configuration, in particular the Unix
8579         specific format specified in Appendix A of the RfC.  This file format
8580         is commonly referred to as the mailcap format.  Many MIME compliant
8581         programs utilize the mailcap format, allowing you to specify handling
8582         for all MIME types in one place for all programs.  Programs known to
8583         use this format include Netscape, XMosaic, lynx and metamail.
8584       </para>
8585       
8586       <para>
8587         In order to handle various MIME types that Mutt-ng can not handle
8588         internally, Mutt-ng parses a series of external configuration files to
8589         find an external handler.  The default search string for these files
8590         is a colon delimited list set to
8591         
8592         <screen>
8593 ${HOME}/.mailcap:/usr/local/share/mutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap</screen>
8594         
8595         where <muttng-doc:envvar name="HOME"/> is your home directory.
8596       </para>
8597       
8598       <para>
8599         In particular, the metamail distribution will install a mailcap file,
8600         usually as <literal>/usr/local/etc/mailcap</literal>, which contains
8601         some baseline
8602         entries.
8603       </para>
8604       
8605       <sect2 id="mime-mailcap-basics">
8606         <title>The Basics of the mailcap file</title>
8607         
8608         <para>
8609           A mailcap file consists of a series of lines which are comments,
8610           blank,
8611           or definitions.
8612         </para>
8613         
8614         <para>
8615           A comment line consists of a # character followed by anything you
8616           want.
8617         </para>
8618         
8619         <para>
8620           A blank line is blank.
8621         </para>
8622         
8623         <para>
8624           A definition line consists of a content type, a view command, and any
8625           number of optional fields.  Each field of a definition line is
8626           dividedby a semicolon ';' character.
8627         </para>
8628         
8629         <para>
8630           The content type is specified in the MIME standard type/subtype
8631           method.
8632           For example,
8633           <literal>text/plain, text/html, image/gif,</literal>
8634           etc.  In addition, the mailcap format includes two formats for
8635           wildcards, one using the special '*' subtype, the other is the
8636           implicit
8637           wild, where you only include the major type.  For example, <literal>
8638             image/*
8639           </literal>
8640           ,or
8641           <literal>video,</literal> will match all image types and video types,
8642           respectively.
8643         </para>
8644         
8645         <para>
8646           The view command is a Unix command for viewing the type specified.
8647           There
8648           are two different types of commands supported. The default is to send
8649           the body of the MIME message to the command on stdin. You can change
8650           this behavior by using %s as a parameter to your view command.
8651           This will cause Mutt-ng to save the body of the MIME message to a
8652           temporary
8653           file, and then call the view command with the %s replaced by
8654           the name of the temporary file. In both cases, Mutt-ng will turn over
8655           the
8656           terminal to the view program until the program quits, at which time
8657           Mutt
8658           will remove the temporary file if it exists.
8659         </para>
8660         
8661         <para>
8662           So, in the simplest form, you can send a text/plain message to the
8663           external pager more on stdin:
8664           
8665           <screen>
8666 text/plain; more</screen>
8667           
8668           Or, you could send the message as a file:
8669           
8670           <screen>
8671 text/plain; more %s</screen>
8672           
8673           Perhaps you would like to use lynx to interactively view a text/html 
8674           message:
8675           
8676           <screen>
8677 text/html; lynx %s</screen>
8678           
8679           In this case, lynx does not support viewing a file from stdin, so you
8680           must use the %s syntax.
8681           <emphasis role="bold">Note:</emphasis> <emphasis>Some older versions
8682             of lynx contain a bug where they
8683             will check the mailcap file for a viewer for text/html.  They will
8684             find
8685             the line which calls lynx, and run it.  This causes lynx to
8686             continuously
8687             spawn itself to view the object.
8688           </emphasis>
8689         </para>
8690         
8691         <para>
8692           On the other hand, maybe you don't want to use lynx interactively,
8693           youjust want to have it convert the text/html to text/plain, then you
8694           can
8695           use:
8696           
8697           <screen>
8698 text/html; lynx -dump %s | more</screen>
8699           
8700         </para>
8701         
8702         <para>
8703           Perhaps you wish to use lynx to view text/html files, and a pager on
8704           all other text formats, then you would use the following:
8705           
8706           <screen>
8707 text/html; lynx %s
8708 text/*; more</screen>
8709           
8710           This is the simplest form of a mailcap file.
8711         </para>
8712         
8713       </sect2>
8714       
8715       <sect2 id="mime-mailcap-security">
8716         <title>Secure use of mailcap</title>
8717         
8718         <para>
8719           The interpretation of shell meta-characters embedded in MIME
8720           parameters
8721           can lead to security problems in general.  Mutt-ng tries to quote
8722           parameters
8723           in expansion of %s syntaxes properly, and avoids risky
8724           characters by
8725           substituting them, see the <muttng-doc:varref name="mailcap-sanitize"/>
8726           variable.
8727         </para>
8728         
8729         <para>
8730           Although mutt's procedures to invoke programs with mailcap seem to be
8731           safe, there are other applications parsing mailcap, maybe taking less
8732           care
8733           of it.  Therefore you should pay attention to the following rules:
8734         </para>
8735         
8736         <para>
8737           <emphasis>Keep the %-expandos away from shell quoting.</emphasis>
8738           Don't quote them with single or double quotes.  Mutt-ng does this for
8739           you, the right way, as should any other program which interprets
8740           mailcap.  Don't put them into backtick expansions.  Be highly careful
8741           with eval statements, and avoid them if possible at all.  Trying to
8742           fix
8743           broken behaviour with quotes introduces new leaks - there is no
8744           alternative to correct quoting in the first place.
8745         </para>
8746         
8747         <para>
8748           If you have to use the %-expandos' values in context where you
8749           need
8750           quoting or backtick expansions, put that value into a shell variable
8751           and reference the shell variable where necessary, as in the following
8752           example (using <literal>$charset</literal> inside the backtick
8753           expansion is safe,
8754           since it is not itself subject to any further expansion):
8755         </para>
8756         
8757         <para>
8758           
8759           <screen>
8760 text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \
8761 &#38;&#38; test "`echo $charset | tr '[A-Z]' '[a-z]'`" != iso-8859-1</screen>
8762           
8763         </para>
8764         
8765       </sect2>
8766       
8767       <sect2 id="mime-mailcap-advanced">
8768         <title>Advanced mailcap Usage</title>
8769         
8770         <sect3 id="mime-mailcap-advanced-fields">
8771           <title>Optional Fields</title>
8772           
8773           <para>
8774             In addition to the required content-type and view command fields,
8775             you
8776             can add semi-colon ';' separated fields to set flags and other
8777             options.
8778             Mutt-ng recognizes the following optional fields:
8779             <variablelist>
8780               
8781               <varlistentry>
8782                 <term>copiousoutput</term>
8783                 <listitem>
8784                   <para>
8785                     This flag tells Mutt-ng that the command passes possibly
8786                     large amounts of
8787                     text on stdout.  This causes Mutt-ng to invoke a pager
8788                     (either the internal
8789                     pager or the external pager defined by the pager variable)
8790                     on the output
8791                     of the view command.  Without this flag, Mutt-ng assumes
8792                     that the command
8793                     is interactive.  One could use this to replace the pipe to <literal>
8794                       more
8795                     </literal>
8796                     in the <literal>lynx -dump</literal> example in the Basic
8797                     section:
8798                     
8799                     <screen>
8800 text/html; lynx -dump %s ; copiousoutput</screen>
8801                     
8802                     This will cause lynx to format the text/html output as
8803                     text/plain
8804                     and Mutt-ng will use your standard pager to display the
8805                     results.
8806                   </para>
8807                 </listitem>
8808               </varlistentry>
8809               <varlistentry>
8810                 <term>needsterminal</term>
8811                 <listitem>
8812                   <para>
8813                     Mutt-ng uses this flag when viewing attachments with <muttng-doc:cmdref name="auto_view"/>,
8814                     in order to decide whether it should honor the setting
8815                     of the <muttng-doc:varref name="wait-key"/> variable or
8816                     not.  When an attachment is viewed using an interactive
8817                     program, and the
8818                     corresponding mailcap entry has a <emphasis>needsterminal</emphasis> flag, Mutt-ng will use
8819                     <muttng-doc:varref name="wait-key"/> and the exit
8820                     statusof the program to decide if it will ask you to press
8821                     a key after the
8822                     external program has exited.  In all other situations it
8823                     will not prompt
8824                     you for a key.
8825                   </para>
8826                 </listitem>
8827               </varlistentry>
8828               <varlistentry>
8829                 <term>compose=&lt;command&gt;</term>
8830                 <listitem>
8831                   <para>
8832                     This flag specifies the command to use to create a new
8833                     attachment of a
8834                     specific MIME type.  Mutt-ng supports this from the compose
8835                     menu.
8836                   </para>
8837                 </listitem>
8838               </varlistentry>
8839               <varlistentry>
8840                 <term>composetyped=&lt;command&gt;</term>
8841                 <listitem>
8842                   <para>
8843                     This flag specifies the command to use to create a new
8844                     attachment of a
8845                     specific MIME type.  This command differs from the compose
8846                     command in
8847                     that mutt will expect standard MIME headers on the data. 
8848                     This can be
8849                     used to specify parameters, filename, description, etc. for
8850                     a new
8851                     attachment.   Mutt-ng supports this from the compose menu.
8852                   </para>
8853                 </listitem>
8854               </varlistentry>
8855               <varlistentry>
8856                 <term>print=&lt;command&gt;</term>
8857                 <listitem>
8858                   <para>
8859                     This flag specifies the command to use to print a specific
8860                     MIME type.
8861                     Mutt-ng supports this from the attachment and compose
8862                     menus.
8863                   </para>
8864                 </listitem>
8865               </varlistentry>
8866               <varlistentry>
8867                 <term>edit=&lt;command&gt;</term>
8868                 <listitem>
8869                   <para>
8870                     This flag specifies the command to use to edit a specific
8871                     MIME type.  
8872                     Mutt-ng supports this from the compose menu, and also uses
8873                     it to compose
8874                     new attachments.  Mutt-ng will default to the defined
8875                     editor for text
8876                     attachments.
8877                   </para>
8878                 </listitem>
8879               </varlistentry>
8880               <varlistentry>
8881                 <term>nametemplate=&lt;template&gt;</term>
8882                 <listitem>
8883                   <para>
8884                     This field specifies the format for the file denoted by
8885                     %s in the
8886                     command fields.  Certain programs will require a certain
8887                     file extension,
8888                     for instance, to correctly view a file.  For instance, lynx
8889                     will only
8890                     interpret a file as <literal>text/html</literal> if the
8891                     file ends in <literal>.html</literal>.
8892                     So, you would specify lynx as a <literal>text/html</literal> viewer with a line in
8893                     the mailcap file like:
8894                     
8895                     <screen>
8896 text/html; lynx %s; nametemplate=%s.html</screen>
8897                     
8898                   </para>
8899                 </listitem>
8900               </varlistentry>
8901               <varlistentry>
8902                 <term>test=&lt;command&gt;</term>
8903                 <listitem>
8904                   <para>
8905                     This field specifies a command to run to test whether this
8906                     mailcap
8907                     entry should be used.  The command is defined with the
8908                     command expansion
8909                     rules defined in the next section.  If the command returns
8910                     0, then the
8911                     test passed, and Mutt-ng uses this entry.  If the command
8912                     returns non-zero,
8913                     then the test failed, and Mutt-ng continues searching for
8914                     the right entry.
8915                     <emphasis role="bold">Note:</emphasis> <emphasis>the
8916                       content-type must match before Mutt-ng performs the test.
8917                     </emphasis>
8918                     For example:
8919                     
8920                     <screen>
8921 text/html; netscape -remote 'openURL(%s)' ; test=RunningX
8922 text/html; lynx %s</screen>
8923                     
8924                     In this example, Mutt-ng will run the program RunningX
8925                     which will return 0
8926                     if the X Window manager is running, and non-zero if it
8927                     isn't.  If
8928                     RunningX returns 0, then Mutt-ng will call netscape to
8929                     display the
8930                     text/html object.  If RunningX doesn't return 0, then
8931                     Mutt-ng will go on
8932                     to the next entry and use lynx to display the text/html
8933                     object.
8934                   </para>
8935                 </listitem>
8936               </varlistentry>
8937             </variablelist>
8938           </para>
8939           
8940         </sect3>
8941         
8942         <sect3 id="mime-mailcap-advanced-searchorder">
8943           <title>Search Order</title>
8944           
8945           <para>
8946             When searching for an entry in the mailcap file, Mutt-ng will
8947             search for
8948             the most useful entry for its purpose.  For instance, if you are
8949             attempting to print an <literal>image/gif</literal>, and you have
8950             the following
8951             entries in your mailcap file, Mutt-ng will search for an entry with
8952             the
8953             print command:
8954             
8955             <screen>
8956 image/*;        xv %s
8957 image/gif;      ; print= anytopnm %s | pnmtops | lpr; \
8958 nametemplate=%s.gif</screen>
8959             
8960             Mutt-ng will skip the <literal>image/*</literal> entry and use the <literal>
8961               image/gif
8962             </literal>
8963             entry with the print command.
8964           </para>
8965           
8966           <para>
8967             In addition, you can use this with <muttng-doc:cmdref name="auto_view"/>
8968             to denote two commands for viewing an attachment, one to be viewed
8969             automatically, the other to be viewed interactively from the
8970             attachment
8971             menu.  In addition, you can then use the test feature to determine
8972             which
8973             viewer to use interactively depending on your environment.
8974             
8975             <screen>
8976 text/html;      netscape -remote 'openURL(%s)' ; test=RunningX
8977 text/html;      lynx %s; nametemplate=%s.html
8978 text/html;      lynx -dump %s; nametemplate=%s.html; copiousoutput</screen>
8979             
8980             For <muttng-doc:cmdref name="auto_view"/>, Mutt-ng will choose
8981             the third
8982             entry because of the copiousoutput tag.  For interactive viewing,
8983             Mutt
8984             will run the program RunningX to determine if it should use the
8985             first
8986             entry.  If the program returns non-zero, Mutt-ng will use the
8987             second entry
8988             for interactive viewing.
8989           </para>
8990           
8991         </sect3>
8992         
8993         <sect3 id="mime-mailcap-advanced-expansion">
8994           <title>Command Expansion</title>
8995           
8996           <para>
8997             The various commands defined in the mailcap files are passed to the
8998             <literal>/bin/sh</literal> shell using the system() function. 
8999             Before the
9000             command is passed to <literal>/bin/sh -c</literal>, it is parsed to
9001             expand
9002             various special parameters with information from Mutt-ng.  The
9003             keywords
9004             Mutt-ng expands are:
9005             <variablelist>
9006               
9007               <varlistentry>
9008                 <term>%s</term>
9009                 <listitem>
9010                   <para>
9011                     As seen in the basic mailcap section, this variable is
9012                     expanded
9013                     to a filename specified by the calling program.  This file
9014                     contains
9015                     the body of the message to view/print/edit or where the
9016                     composing
9017                     program should place the results of composition.  In
9018                     addition, the
9019                     use of this keyword causes Mutt-ng to not pass the body of
9020                     the message
9021                     to the view/print/edit program on stdin.
9022                   </para>
9023                 </listitem>
9024               </varlistentry>
9025               <varlistentry>
9026                 <term>%t</term>
9027                 <listitem>
9028                   <para>
9029                     Mutt-ng will expand %t to the text representation of
9030                     the content
9031                     type of the message in the same form as the first parameter
9032                     of the
9033                     mailcap definition line, ie <literal>text/html</literal> or
9034                     <literal>image/gif</literal>.
9035                   </para>
9036                 </listitem>
9037               </varlistentry>
9038               <varlistentry>
9039                 <term>%{&lt;parameter&gt;}</term>
9040                 <listitem>
9041                   <para>
9042                     Mutt-ng will expand this to the value of the specified
9043                     parameter
9044                     from the Content-Type: line of the mail message.  For
9045                     instance, if
9046                     Your mail message contains:
9047                     
9048                     <muttng-doc:lstmail>
9049 Content-Type: text/plain; charset=iso-8859-1</muttng-doc:lstmail>
9050                     
9051                     then Mutt-ng will expand %{charset} to
9052                     iso-8859-1.  The default metamail
9053                     mailcap file uses this feature to test the charset to spawn
9054                     an xterm
9055                     using the right charset to view the message.
9056                   </para>
9057                 </listitem>
9058               </varlistentry>
9059               <varlistentry>
9060                 <term>\%</term>
9061                 <listitem>
9062                   <para>
9063                     This will be replaced by a %
9064                   </para>
9065                 </listitem>
9066               </varlistentry>
9067             </variablelist>
9068             Mutt-ng does not currently support the %F and %n
9069             keywords
9070             specified in <muttng-doc:rfc num="1524"/>.  The main purpose of these parameters is for
9071             multipart messages, which is handled internally by Mutt-ng.
9072           </para>
9073           
9074         </sect3>
9075         
9076       </sect2>
9077       
9078       <sect2 id="mime-mailcap-examples">
9079         <title>Example mailcap files</title>
9080         
9081         <para>
9082           This mailcap file is fairly simple and standard:
9083           
9084           <screen>>
9085 # I'm always running X :)
9086 video/*;        xanim %s &gt; /dev/null
9087 image/*;        xv %s &gt; /dev/null
9088
9089 # I'm always running netscape (if my computer had more memory, maybe)
9090 text/html;      netscape -remote 'openURL(%s)'</screen>
9091           
9092         </para>
9093         
9094         <para>
9095           This mailcap file shows quite a number of examples:
9096         </para>
9097         
9098         <para>
9099           
9100           <screen>
9101 # Use xanim to view all videos   Xanim produces a header on startup,
9102 # send that to /dev/null so I don't see it
9103 video/*;        xanim %s &gt; /dev/null
9104
9105 # Send html to a running netscape by remote
9106 text/html;      netscape -remote 'openURL(%s)'; test=RunningNetscape
9107 # If I'm not running netscape but I am running X, start netscape on the
9108 # object
9109 text/html;      netscape %s; test=RunningX
9110
9111 # Else use lynx to view it as text
9112 text/html;      lynx %s
9113
9114 # This version would convert the text/html to text/plain
9115 text/html;      lynx -dump %s; copiousoutput
9116
9117 # I use enscript to print text in two columns to a page
9118 text/*;         more %s; print=enscript -2Gr %s
9119
9120 # Netscape adds a flag to tell itself to view jpegs internally
9121 image/jpeg;xv %s; x-mozilla-flags=internal
9122
9123 # Use xv to view images if I'm running X
9124 # In addition, this uses the \ to extend the line and set my editor
9125 # for images
9126 image/*;xv %s; test=RunningX; edit=xpaint %s
9127
9128 # Convert images to text using the netpbm tools
9129 image/*;  (anytopnm %s | pnmscale -xysize 80 46 | ppmtopgm | \
9130 pgmtopbm | pbmtoascii -1x2 ) 2&gt;&#38;1 ; copiousoutput
9131
9132 # Send excel spreadsheets to my NT box
9133 application/ms-excel; open.pl %s</screen>
9134           
9135         </para>
9136         
9137         <para>
9138           
9139         </para>
9140         
9141       </sect2>
9142       
9143     </sect1>
9144     
9145     <sect1>
9146       <title>MIME Autoview</title>
9147
9148       <para>
9149         <muttng-doc:cmddef name="auto_view">mime-type [mime-type ...]</muttng-doc:cmddef>
9150       </para>
9151
9152       <para>
9153         <muttng-doc:cmddef name="unauto_view">mime-type [mime-type ...]</muttng-doc:cmddef>
9154       </para>
9155  
9156       <para>
9157         In addition to explicitly telling Mutt-ng to view an attachment with
9158         theMIME viewer defined in the mailcap file, Mutt-ng has support for
9159         automatically viewing MIME attachments while in the pager.
9160       </para>
9161       
9162       <para>
9163         To work, you must define a viewer in the mailcap file which uses the 
9164         <literal>copiousoutput</literal> option to denote that it is
9165         non-interactive.
9166         Usually, you also use the entry to convert the attachment to a text
9167         representation which you can view in the pager.
9168       </para>
9169       
9170       <para>
9171         You then use the <literal>auto_view</literal> muttrc command to
9172         list the
9173         content-types that you wish to view automatically.
9174       </para>
9175       
9176       <para>
9177         For instance, if you set auto_view to:
9178         
9179         <muttng-doc:lstconf>
9180 auto_view text/html application/x-gunzip application/postscript
9181 image/gif application/x-tar-gz</muttng-doc:lstconf>
9182         
9183       </para>
9184       
9185       <para>
9186         Mutt-ng could use the following mailcap entries to automatically view
9187         attachments of these types.
9188         
9189         <screen>
9190 text/html;      lynx -dump %s; copiousoutput; nametemplate=%s.html
9191 image/*;        anytopnm %s | pnmscale -xsize 80 -ysize 50 | ppmtopgm | pgmtopbm | pbmtoascii ; copiousoutput
9192 application/x-gunzip;   gzcat; copiousoutput
9193 application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput
9194 application/postscript; ps2ascii %s; copiousoutput</screen>
9195         
9196       </para>
9197       
9198       <para>
9199         ``unauto_view'' can be used to remove previous entries from the
9200         autoview list.
9201         This can be used with <muttng-doc:hook name="message"/> to autoview messages based on size,
9202         etc.
9203         ``unauto_view *'' will remove all previous entries.
9204       </para>
9205       
9206       <para>
9207         
9208       </para>
9209       
9210     </sect1>
9211     
9212     <sect1>
9213       <title>MIME Multipart/Alternative</title>
9214
9215       <para>
9216         <muttng-doc:cmddef name="alternative_order">mime-type [mime-type ...]</muttng-doc:cmddef>
9217       </para>
9218       
9219       <para>
9220         <muttng-doc:cmddef name="unalternative_order">mime-type [mime-type ...]</muttng-doc:cmddef>
9221       </para>
9222  
9223       <para>
9224         Mutt-ng has some heuristics for determining which attachment of a
9225         multipart/alternative type to display.  First, mutt will check the 
9226         alternative_order list to determine if one of the available
9227         typesis preferred.  The alternative_order list consists of a
9228         number of
9229         MIME types in order, including support for implicit and explicit
9230         wildcards, for example:
9231        
9232         <muttng-doc:lstconf>
9233 alternative_order text/enriched text/plain text
9234 application/postscript image/*</muttng-doc:lstconf>
9235         
9236       </para>
9237       
9238       <para>
9239         Next, mutt will check if any of the types have a defined 
9240         <muttng-doc:cmdref name="auto_view"/>, and use that.  Failing
9241         that, Mutt-ng will look for any text type.  As a last attempt, mutt
9242         willlook for any type it knows how to handle.
9243       </para>
9244       
9245       <para>
9246         To remove a MIME type from the <literal>alternative_order</literal> list, use the
9247         <literal>unalternative_order</literal> command.
9248       </para>
9249       
9250       <para>
9251         
9252       </para>
9253       
9254     </sect1>
9255     
9256     <sect1>
9257       <title>MIME Lookup</title>
9258
9259       <para>
9260         <muttng-doc:cmddef name="mime_lookup">mime-type [mime-type ...]</muttng-doc:cmddef>
9261       </para>
9262
9263       <para>
9264         <muttng-doc:cmddef name="unmime_lookup">mime-type [mime-type ...]</muttng-doc:cmddef>
9265       </para>
9266  
9267       <para>
9268         Mutt-ng's mime_lookup list specifies a list of mime-types that
9269         should not
9270         be treated according to their mailcap entry.  This option is designed
9271         todeal with binary types such as application/octet-stream.  When an
9272         attachment's
9273         mime-type is listed in mime_lookup, then the extension of the
9274         filename will
9275         be compared to the list of extensions in the mime.types file.  The
9276         mime-type
9277         associated with this extension will then be used to process the
9278         attachment
9279         according to the rules in the mailcap file and according to any other
9280         configuration
9281         options (such as auto_view) specified.  Common usage would be:
9282         
9283         <muttng-doc:lstconf>
9284 mime_lookup application/octet-stream application/X-Lotus-Manuscript</muttng-doc:lstconf>
9285         
9286       </para>
9287       
9288       <para>
9289         In addition, the unmime_lookup command may be used to disable
9290         this feature
9291         for any particular mime-type if it had been set, for example, in a
9292         global
9293         muttrc.
9294       </para>
9295       
9296       <para>
9297         
9298       </para>
9299       
9300       <para>
9301         
9302       </para>
9303       
9304     </sect1>
9305     
9306   </chapter>
9307   <!--}}}-->
9308   
9309   <chapter id="security"> <!--{{{-->
9310     <title>Security Considerations</title>
9311     
9312     <para>
9313       First of all, mutt-ng contains no security holes included by
9314       intention but may contain unknown security holes. As a consequence,
9315       please run mutt-ng only with as few permissions as possible.
9316     </para>
9317     
9318     <para>
9319       Please do not run mutt-ng as the super user.
9320     </para>
9321     
9322     <para>
9323       When configuring mutt-ng, there're some points to note about secure
9324       setups.
9325     </para>
9326     
9327     <para>
9328       In practice, mutt-ng can be easily made as vulnerable as even the
9329       most insecure mail user agents (in their default configuration) just
9330       by changing mutt-ng's configuration files: it then can execute
9331       arbitrary programs and scripts attached to messages, send out private
9332       data on its own, etc. Although this is not believed to the common type
9333       of setup, please read this chapter carefully.
9334     </para>
9335     
9336     <sect1 id="security-passwords">
9337       <title>Passwords</title>
9338       
9339       <para>
9340         Although mutt-ng can be told the various passwords for accounts,
9341         please never store passwords in configuration files. Besides the
9342         fact that the system's operator can always read them, you could
9343         forget to replace the actual password with asterisks when reporting
9344         a bug or asking for help via, for example, a mailing list so that
9345         your mail including your password could be archived by internet
9346         search engines, etc. Please never store passwords on disk.
9347       </para>
9348       
9349     </sect1>
9350     
9351     <sect1 id="security-tempfiles">
9352       <title>Temporary Files</title>
9353       
9354       <para>
9355         Mutt-ng uses many temporary files for viewing messages, verifying
9356         digital signatures, etc. The <muttng-doc:varref name="umask"/>
9357         variable can be used to change the default permissions of these
9358         files. Please only change it if you really know what you are doing.
9359         Also, a different location for these files may be desired which can
9360         be changed via the <muttng-doc:varref name="tmpdir"/> variable.
9361       </para>
9362       
9363     </sect1>
9364     
9365     <sect1 id="security-leaks">
9366       <title>Information Leaks</title>
9367       
9368       <sect2 id="security-leaks-mid">
9369         <title>Message-ID: headers</title>
9370         
9371         <para>
9372           In the default configuration, mutt-ng will leak some information
9373           to the outside world when sending messages: the generation of
9374           <literal>Message-ID:</literal> headers includes a step counter which
9375           is increased
9376           (and rotated) with every message sent. If you'd like to hide this
9377           information probably telling others how many mail you sent in which
9378           time, you at least need to remove the <literal>%P</literal>
9379           expando from the
9380           default setting of the <muttng-doc:varref name="msgid-format"/> variable. Please make sure that
9381           you really know how local parts of these <literal>Message-ID:</literal> headers
9382           are composed.
9383         </para>
9384         
9385       </sect2>
9386       
9387       <sect2 id="security-leaks-mailto">
9388         <title>mailto:-style links</title>
9389         
9390         <para>
9391           As mutt-ng be can be set up to be the mail client to handle
9392           <literal>mailto:</literal> style links in websites, there're security
9393           considerations, too. To keep the old behavior by default, mutt-ng
9394           will be strict in interpreting them which means that arbitrary
9395           header fields can be embedded in these links which could override
9396           existing header fields or attach arbitrary files. This may be
9397           problematic if the <muttng-doc:varref name="edit-headers"/>
9398           variable is <emphasis>unset</emphasis>, i.e. the
9399           user doesn't want to see header fields while editing the message.
9400         </para>
9401         
9402         <para>
9403           For example, following a link like
9404         </para>
9405         
9406         <para>
9407           
9408           <screen>
9409 mailto:joe@host?Attach=~/.gnupg/secring.gpg</screen>
9410           
9411         </para>
9412         
9413         <para>
9414           will send out the user's private gnupg keyring to <literal>joe@host</literal> if
9415           the user doesn't follow the information on screen carefully
9416           enough.
9417         </para>
9418         
9419         <para>
9420           When <emphasis>unsetting</emphasis> the <muttng-doc:varref name="strict-mailto"/>
9421           variable, mutt-ng will
9422         </para>
9423         
9424         <para>
9425           
9426           <itemizedlist>
9427             <listitem>
9428               
9429               <para>
9430                 be less strict when interpreting these links by
9431                 prepending a <literal>X-Mailto-</literal> string to all header
9432                 fields
9433                 embedded in such a link <emphasis>and</emphasis>
9434                 
9435               </para>
9436             </listitem>
9437             <listitem>
9438               
9439               <para>
9440                 turn on the <muttng-doc:varref name="edit-headers"/>
9441                 variable by
9442                 force to let the user see all the headers
9443                 (because they still may leak information.)
9444                 
9445               </para>
9446             </listitem>
9447             
9448           </itemizedlist>
9449           
9450         </para>
9451         
9452       </sect2>
9453       
9454     </sect1>
9455     
9456     <sect1 id="security-external">
9457       <title>External applications</title>
9458       
9459       <para>
9460         Mutt-ng in many places has to rely on external applications or
9461         for convenience supports mechanisms involving external
9462         applications.
9463       </para>
9464       
9465       <sect2 id="security-external-mailcap">
9466         <title>mailcap</title>
9467         
9468         <para>
9469           One of these is the <literal>mailcap</literal> mechanism as defined
9470           by <muttng-doc:rfc num="1524"/>. Mutt-ng can be set up to <emphasis>automatically</emphasis>
9471           execute any
9472           given utility as listed in one of the mailcap files (see the
9473           <muttng-doc:varref name="mailcap-path"/>
9474           variable for details.) 
9475         </para>
9476         
9477         <para>
9478           These utilities may have a variety of security vulnerabilities,
9479           including overwriting of arbitrary files, information leaks or
9480           other exploitable bugs.  These vulnerabilities may go unnoticed by
9481           the user, especially when they are called automatically (and
9482           without interactive prompting) from the mailcap file(s). When
9483           using mutt-ng's autoview mechanism in combination with mailcap
9484           files, please be sure to...
9485         </para>
9486         
9487         <para>
9488           
9489           <itemizedlist>
9490             <listitem>
9491               
9492               <para>
9493                 manually select trustworth applications with a reasonable
9494                 calling sequence
9495                 
9496               </para>
9497             </listitem>
9498             <listitem>
9499               
9500               <para>
9501                 periodically check the contents of mailcap files,
9502                 especially after software installations or upgrades
9503                 
9504               </para>
9505             </listitem>
9506             <listitem>
9507               
9508               <para>
9509                 keep the software packages referenced in the mailcap file up to
9510                 date
9511                 
9512               </para>
9513             </listitem>
9514             <listitem>
9515               
9516               <para>
9517                 leave the <muttng-doc:varref name="mailcap-sanitize"/> variable in its default
9518                 state to restrict mailcap expandos to a safe set of characters
9519                 
9520               </para>
9521             </listitem>
9522             
9523           </itemizedlist>
9524           
9525         </para>
9526         
9527       </sect2>
9528       
9529       <sect2 id="security-external-other">
9530         <title>Other</title>
9531         
9532         <para>
9533           Besides the mailcap mechanism, mutt-ng uses a number of other
9534           external utilities for operation.
9535         </para>
9536         
9537         <para>
9538           The same security considerations apply for these as for tools
9539           involved via mailcap (for example, mutt-ng is vulnerable to Denial
9540           of Service Attacks with compressed folders support if the
9541           uncompressed mailbox is too large for the disk it is saved to.)
9542         </para>
9543         
9544         <para>
9545           As already noted, most of these problems are not built in but
9546           caused by wrong configuration, so please check your configuration.
9547         </para>
9548         
9549       </sect2>
9550       
9551     </sect1>
9552     
9553   </chapter>
9554   <!--}}}-->
9555   
9556   <chapter id="reference"> <!--{{{-->
9557     <title>Reference</title>
9558     
9559     <sect1 id="commandline">
9560       <title>Command line options</title>
9561       
9562       <para>
9563         Running <literal>mutt</literal> with no arguments will make Mutt-ng
9564         attempt to read your spool
9565         mailbox.  However, it is possible to read other mailboxes and
9566         to send messages from the command line as well.
9567       </para>
9568       
9569       <para>
9570         
9571         <table frame="none" rowsep="1" texstr="l|l">
9572           <title>Reference: Command Line Options</title>
9573           <tgroup cols="2" align="left" colsep="1" rowsep="1">
9574           <thead>
9575             <row>
9576               <entry>Option</entry>
9577               <entry>Description</entry>
9578             </row>
9579           </thead>
9580           <tbody>
9581             <row>
9582               <entry><literal>-A</literal></entry>
9583               <entry>expand an alias</entry>
9584             </row>
9585             <row>
9586               <entry><literal>-a</literal></entry>
9587               <entry>attach a file to a message</entry>
9588             </row>
9589             <row>
9590               <entry><literal>-b</literal></entry>
9591               <entry>specify a blind carbon-copy (BCC) address</entry>
9592             </row>
9593             <row>
9594               <entry><literal>-c</literal></entry>
9595               <entry>specify a carbon-copy (Cc) address</entry>
9596             </row>
9597             <row>
9598               <entry><literal>-e</literal></entry>
9599               <entry>specify a config command to be run after initialization files are read</entry>
9600             </row>
9601             <row>
9602               <entry><literal>-f</literal></entry>
9603               <entry>specify a mailbox to load</entry>
9604             </row>
9605             <row>
9606               <entry><literal>-F</literal></entry>
9607               <entry>specify an alternate file to read initialization commands</entry>
9608             </row>
9609             <row>
9610               <entry><literal>-h</literal></entry>
9611               <entry>print help on command line options</entry>
9612             </row>
9613             <row>
9614               <entry><literal>-H</literal></entry>
9615               <entry>specify a draft file from which to read a header and body</entry>
9616             </row>
9617             <row>
9618               <entry><literal>-i</literal></entry>
9619               <entry>specify a file to include in a message composition</entry>
9620             </row>
9621             <row>
9622               <entry><literal>-m</literal></entry>
9623               <entry>specify a default mailbox type</entry>
9624             </row>
9625             <row>
9626               <entry><literal>-n</literal></entry>
9627               <entry>do not read the system Muttngrc</entry>
9628             </row>
9629             <row>
9630               <entry><literal>-p</literal></entry>
9631               <entry>recall a postponed message</entry>
9632             </row>
9633             <row>
9634               <entry><literal>-Q</literal></entry>
9635               <entry>query a configuration variable</entry>
9636             </row>
9637             <row>
9638               <entry><literal>-R</literal></entry>
9639               <entry>open mailbox in read-only mode</entry>
9640             </row>
9641             <row>
9642               <entry><literal>-s</literal></entry>
9643               <entry>specify a subject (enclose in quotes if it contains spaces)</entry>
9644             </row>
9645             <row>
9646               <entry><literal>-t</literal></entry>
9647               <entry>dump the value of all variables to stdout</entry>
9648             </row>
9649             <row>
9650               <entry><literal>-T</literal></entry>
9651               <entry>dump the value of all changed variables to stdout</entry>
9652             </row>
9653             <row>
9654               <entry><literal>-v</literal></entry>
9655               <entry>show version number and compile-time definitions</entry>
9656             </row>
9657             <row>
9658               <entry><literal>-x</literal></entry>
9659               <entry>simulate the mailx(1) compose mode</entry>
9660             </row>
9661             <row>
9662               <entry><literal>-y</literal></entry>
9663               <entry>show a menu containing the files specified by the mailboxes command</entry>
9664             </row>
9665             <row>
9666               <entry><literal>-z</literal></entry>
9667               <entry>exit immediately if there are no messages in the mailbox</entry>
9668             </row>
9669             <row>
9670               <entry><literal>-Z</literal></entry>
9671               <entry>open the first folder with new message,exit immediately if none</entry>
9672             </row>
9673           </tbody>
9674         </tgroup>
9675       </table>
9676
9677       </para>
9678       
9679       <para>
9680         To read messages in a mailbox
9681       </para>
9682       
9683       <para>
9684         <literal>mutt</literal> ] -nz ] ] -F <emphasis>muttrc</emphasis> ] ] -m <emphasis>
9685           type
9686         </emphasis>
9687         ] ] -f <emphasis>mailbox</emphasis> ] 
9688       </para>
9689       
9690       <para>
9691         To compose a new message
9692       </para>
9693       
9694       <para>
9695         <literal>mutt</literal> ] -n ] ] -F <emphasis>muttrc</emphasis> ] ] -a <emphasis>
9696           file
9697         </emphasis>
9698         ] ] -c <emphasis>address</emphasis> ] ] -i <emphasis>
9699           filename
9700         </emphasis>
9701         ] ] -s <emphasis>subject</emphasis> ] <emphasis>address</emphasis> ] <emphasis>
9702           address
9703         </emphasis>
9704         ... ] 
9705       </para>
9706       
9707       <para>
9708         Mutt-ng also supports a ``batch'' mode to send prepared messages. 
9709         Simply redirect
9710         input from the file you wish to send.  For example,
9711       </para>
9712       
9713       <para>
9714         <literal>mutt -s &quot;data set for run #2&quot;
9715           professor@bigschool.edu
9716           &lt; ~/run2.dat
9717         </literal>
9718       </para>
9719       
9720       <para>
9721         This command will send a message to ``professor@bigschool.edu'' with a
9722         subject
9723         of ``data set for run #2''.  In the body of the message will be the
9724         contents
9725         of the file ``~/run2.dat''.
9726       </para>
9727       
9728       <para>
9729         
9730       </para>
9731       
9732     </sect1>
9733     
9734     <sect1 id="patterns">
9735       <title>Patterns</title>
9736
9737       <para>
9738
9739         <table frame="none" rowsep="1" id="tab-patterns" texstr="l|l|l">
9740           <title>Reference: Patterns</title>
9741           <tgroup cols="2" align="left" colsep="1" rowsep="1">
9742           <thead>
9743             <row>
9744               <entry>Pattern Modifier</entry>
9745               <entry>Argument</entry>
9746               <entry>Description</entry>
9747             </row>
9748           </thead>
9749           <tbody>
9750             <row>
9751               <entry><muttng-doc:pattern full="1" name="A"/></entry>
9752               <entry><literal></literal></entry>
9753               <entry>all messages</entry>
9754             </row>
9755             <row>
9756               <entry><muttng-doc:pattern full="1" name="b"/></entry>
9757               <entry><literal>EXPR</literal></entry>
9758               <entry>messages which contain EXPR in the message body</entry>
9759             </row>
9760             <row>
9761               <entry><muttng-doc:pattern full="1" name="B"/></entry>
9762               <entry><literal>EXPR</literal></entry>
9763               <entry>messages which contain EXPR in the whole message</entry>
9764             </row>
9765             <row>
9766               <entry><muttng-doc:pattern full="1" name="c"/></entry>
9767               <entry><literal>EXPR</literal></entry>
9768               <entry>messages carbon-copied to EXPR</entry>
9769             </row>
9770             <row>
9771               <entry><muttng-doc:pattern full="1" name="C"/></entry>
9772               <entry><literal>EXPR</literal></entry>
9773               <entry>message is either to: or cc: EXPR</entry>
9774             </row>
9775             <row>
9776               <entry><muttng-doc:pattern full="1" name="D"/></entry>
9777               <entry><literal></literal></entry>
9778               <entry>deleted messages</entry>
9779             </row>
9780             <row>
9781               <entry><muttng-doc:pattern full="1" name="d"/></entry>
9782               <entry><literal>[MIN]-[MAX]</literal></entry>
9783               <entry>messages with ``date-sent'' in a Date range</entry>
9784             </row>
9785             <row>
9786               <entry><muttng-doc:pattern full="1" name="E"/></entry>
9787               <entry><literal></literal></entry>
9788               <entry>expired messages</entry>
9789             </row>
9790             <row>
9791               <entry><muttng-doc:pattern full="1" name="e"/></entry>
9792               <entry><literal>EXPR</literal></entry>
9793               <entry>message which contains EXPR in the ``Sender'' field</entry>
9794             </row>
9795             <row>
9796               <entry><muttng-doc:pattern full="1" name="F"/></entry>
9797               <entry><literal></literal></entry>
9798               <entry>flagged messages</entry>
9799             </row>
9800             <row>
9801               <entry><muttng-doc:pattern full="1" name="f"/></entry>
9802               <entry><literal>EXPR</literal></entry>
9803               <entry>messages originating from EXPR</entry>
9804             </row>
9805             <row>
9806               <entry><muttng-doc:pattern full="1" name="g"/></entry>
9807               <entry><literal></literal></entry>
9808               <entry>cryptographically signed messages</entry>
9809             </row>
9810             <row>
9811               <entry><muttng-doc:pattern full="1" name="G"/></entry>
9812               <entry><literal></literal></entry>
9813               <entry>cryptographically encrypted messages</entry>
9814             </row>
9815             <row>
9816               <entry><muttng-doc:pattern full="1" name="H"/></entry>
9817               <entry><literal>EXPR</literal></entry>
9818               <entry>messages with a spam attribute matching EXPR</entry>
9819             </row>
9820             <row>
9821               <entry><muttng-doc:pattern full="1" name="h"/></entry>
9822               <entry><literal>EXPR</literal></entry>
9823               <entry>messages which contain EXPR in the message header</entry>
9824             </row>
9825             <row>
9826               <entry><muttng-doc:pattern full="1" name="k"/></entry>
9827               <entry><literal></literal></entry>
9828               <entry>message contains PGP key material</entry>
9829             </row>
9830             <row>
9831               <entry><muttng-doc:pattern full="1" name="i"/></entry>
9832               <entry><literal>EXPR</literal></entry>
9833               <entry>message which match ID in the ``Message-ID'' field</entry>
9834             </row>
9835             <row>
9836               <entry><muttng-doc:pattern full="1" name="L"/></entry>
9837               <entry><literal>EXPR</literal></entry>
9838               <entry>message is either originated or received by EXPR</entry>
9839             </row>
9840             <row>
9841               <entry><muttng-doc:pattern full="1" name="l"/></entry>
9842               <entry><literal></literal></entry>
9843               <entry>message is addressed to a known mailing list</entry>
9844             </row>
9845             <row>
9846               <entry><muttng-doc:pattern full="1" name="m"/></entry>
9847               <entry><literal>[MIN]-[MAX]</literal></entry>
9848               <entry>message in the range MIN to MAX *)</entry>
9849             </row>
9850             <row>
9851               <entry><muttng-doc:pattern full="1" name="M"/></entry>
9852               <entry><literal></literal></entry>
9853               <entry>multipart messages</entry>
9854             </row>
9855             <row>
9856               <entry><muttng-doc:pattern full="1" name="n"/></entry>
9857               <entry><literal>[MIN]-[MAX]</literal></entry>
9858               <entry>messages with a score in the range MIN to MAX *)</entry>
9859             </row>
9860             <row>
9861               <entry><muttng-doc:pattern full="1" name="N"/></entry>
9862               <entry><literal></literal></entry>
9863               <entry>new messages</entry>
9864             </row>
9865             <row>
9866               <entry><muttng-doc:pattern full="1" name="O"/></entry>
9867               <entry><literal></literal></entry>
9868               <entry>old messages</entry>
9869             </row>
9870             <row>
9871               <entry><muttng-doc:pattern full="1" name="p"/></entry>
9872               <entry><literal></literal></entry>
9873               <entry>message is addressed to you (consults alternates)</entry>
9874             </row>
9875             <row>
9876               <entry><muttng-doc:pattern full="1" name="P"/></entry>
9877               <entry><literal></literal></entry>
9878               <entry>message is from you (consults alternates)</entry>
9879             </row>
9880             <row>
9881               <entry><muttng-doc:pattern full="1" name="Q"/></entry>
9882               <entry><literal></literal></entry>
9883               <entry>messages which have been replied to</entry>
9884             </row>
9885             <row>
9886               <entry><muttng-doc:pattern full="1" name="R"/></entry>
9887               <entry><literal></literal></entry>
9888               <entry>read messages</entry>
9889             </row>
9890             <row>
9891               <entry><muttng-doc:pattern full="1" name="r"/></entry>
9892               <entry><literal>[MIN]-[MAX]</literal></entry>
9893               <entry>messages with ``date-received'' in a Date range</entry>
9894             </row>
9895             <row>
9896               <entry><muttng-doc:pattern full="1" name="S"/></entry>
9897               <entry><literal></literal></entry>
9898               <entry>superseded messages</entry>
9899             </row>
9900             <row>
9901               <entry><muttng-doc:pattern full="1" name="s"/></entry>
9902               <entry><literal>EXPR</literal></entry>
9903               <entry>messages having EXPR in the ``Subject'' field.</entry>
9904             </row>
9905             <row>
9906               <entry><muttng-doc:pattern full="1" name="T"/></entry>
9907               <entry><literal></literal></entry>
9908               <entry>tagged messages</entry>
9909             </row>
9910             <row>
9911               <entry><muttng-doc:pattern full="1" name="t"/></entry>
9912               <entry><literal>EXPR</literal></entry>
9913               <entry>messages addressed to EXPR</entry>
9914             </row>
9915             <row>
9916               <entry><muttng-doc:pattern full="1" name="U"/></entry>
9917               <entry><literal></literal></entry>
9918               <entry>unread messages</entry>
9919             </row>
9920             <row>
9921               <entry><muttng-doc:pattern full="1" name="u"/></entry>
9922               <entry><literal></literal></entry>
9923               <entry>message is addressed to a subscribed mailing list</entry>
9924             </row>
9925             <row>
9926               <entry><muttng-doc:pattern full="1" name="v"/></entry>
9927               <entry><literal></literal></entry>
9928               <entry>message is part of a collapsed thread.</entry>
9929             </row>
9930             <row>
9931               <entry><muttng-doc:pattern full="1" name="V"/></entry>
9932               <entry><literal></literal></entry>
9933               <entry>cryptographically verified messages</entry>
9934             </row>
9935             <row>
9936               <entry><muttng-doc:pattern full="1" name="w"/></entry>
9937               <entry><literal>EXPR</literal></entry>
9938               <entry>messages which contain EXPR in the `Newsgroups' field (if compiled with NNTP support)</entry>
9939             </row>
9940             <row>
9941               <entry><muttng-doc:pattern full="1" name="x"/></entry>
9942               <entry><literal>EXPR</literal></entry>
9943               <entry>messages which contain EXPR in the `References' field</entry>
9944             </row>
9945             <row>
9946               <entry><muttng-doc:pattern full="1" name="y"/></entry>
9947               <entry><literal>EXPR</literal></entry>
9948               <entry>messages which contain EXPR in the `X-Label' field</entry>
9949             </row>
9950             <row>
9951               <entry><muttng-doc:pattern full="1" name="z"/></entry>
9952               <entry><literal>[MIN]-[MAX]</literal></entry>
9953               <entry>messages with a size in the range MIN to MAX *)</entry>
9954             </row>
9955             <row>
9956               <entry><muttng-doc:pattern full="1" name="="/></entry>
9957               <entry><literal></literal></entry>
9958               <entry>duplicated messages (see $duplicate_threads)</entry>
9959             </row>
9960             <row>
9961               <entry><muttng-doc:pattern full="1" name="$"/></entry>
9962               <entry><literal></literal></entry>
9963               <entry>unreferenced messages (requires threaded view)</entry>
9964             </row>
9965             <row>
9966               <entry><muttng-doc:pattern full="1" name="*"/></entry>
9967               <entry><literal></literal></entry>
9968               <entry>``From'' contains realname and (syntactically) valid address
9969                 (excluded are addresses matching against alternates or any alias)</entry>
9970             </row>
9971           </tbody>
9972         </tgroup>
9973       </table>
9974       </para>
9975       
9976       <para>
9977         Where EXPR are 
9978         <link linkend="advanced-regexp">regexp</link>.  Special attention has to be
9979         made when using regular expressions inside of patterns.  Specifically,
9980         Mutt-ng's parser for these patterns will strip one level of backslash
9981         (\),
9982         which is normally used for quoting.  If it is your intention to use a
9983         backslash in the regular expression, you will need to use two
9984         backslashes
9985         instead (\\).
9986       </para>
9987       
9988       <para>
9989         *) The forms <literal>&lt;[MAX]</literal>, <literal>&gt;[MIN]</literal>,
9990         <literal>[MIN]-</literal> and <literal>-[MAX]</literal>
9991         are allowed, too.
9992       </para>
9993       
9994     </sect1>
9995     
9996     <sect1 id="commands">
9997       <title>Configuration Commands</title>
9998       
9999       <para>
10000         The following are the commands understood by mutt.
10001       </para>
10002       
10003       <para>
10004         
10005         <itemizedlist>
10006           <listitem>
10007             
10008             <para>
10009               <literal><muttng-doc:hook name="account"/></literal> <emphasis>pattern</emphasis> <emphasis>command</emphasis>
10010             </para>
10011           </listitem>
10012           <listitem>
10013             
10014             <para>
10015               <literal><muttng-doc:cmdref name="alias"/></literal> <emphasis>key</emphasis> <emphasis>address</emphasis> [, <emphasis>address</emphasis>, ... ]
10016             </para>
10017           </listitem>
10018           <listitem>
10019             
10020             <para>
10021               <literal><muttng-doc:cmdref name="unalias"/></literal> [ * | <emphasis>key</emphasis> ... ]
10022             </para>
10023           </listitem>
10024           <listitem>
10025             
10026             <para>
10027               <literal><muttng-doc:cmdref name="alternates"/></literal> <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis> ... ]
10028             </para>
10029           </listitem>
10030           <listitem>
10031             
10032             <para>
10033               <literal><muttng-doc:cmdref name="unalternates"/></literal> [ * | <emphasis>regexp</emphasis> ... ]
10034             </para>
10035           </listitem>
10036           <listitem>
10037             
10038             <para>
10039               <literal><muttng-doc:cmdref name="alternative_order"/></literal> <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
10040             </para>
10041           </listitem>
10042           <listitem>
10043             
10044             <para>
10045               <literal><muttng-doc:cmdref name="unalternative_order"/></literal> <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
10046             </para>
10047           </listitem>
10048           <listitem>
10049             
10050             <para>
10051               <literal><muttng-doc:hook name="append"/></literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
10052             </para>
10053           </listitem>
10054           <listitem>
10055             
10056             <para>
10057               <literal><muttng-doc:cmdref name="auto_view"/></literal> <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
10058             </para>
10059           </listitem>
10060           <listitem>
10061             
10062             <para>
10063               <literal><muttng-doc:cmdref name="unauto_view"/></literal><emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
10064             </para>
10065           </listitem>
10066           <listitem>
10067             
10068             <para>
10069               <literal><muttng-doc:cmdref name="bind"/></literal> <emphasis>map</emphasis> <emphasis>key</emphasis> <emphasis>function</emphasis>
10070             </para>
10071           </listitem>
10072           <listitem>
10073             
10074             <para>
10075               <literal><muttng-doc:hook name="charset"/></literal> <emphasis>alias</emphasis> <emphasis>charset</emphasis>
10076             </para>
10077           </listitem>
10078           <listitem>
10079             
10080             <para>
10081               <literal><muttng-doc:hook name="close"/></literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
10082             </para>
10083           </listitem>
10084           <listitem>
10085             
10086             <para>
10087               <literal><muttng-doc:cmdref name="color"/></literal> <emphasis>object</emphasis> <emphasis>foreground</emphasis> <emphasis>background</emphasis> [ <emphasis>regexp</emphasis> ]
10088             </para>
10089           </listitem>
10090           <listitem>
10091             
10092             <para>
10093               <literal><muttng-doc:cmdref name="uncolor"/></literal> <emphasis>index</emphasis> <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis> ... ]
10094             </para>
10095           </listitem>
10096           <listitem>
10097             
10098             <para>
10099               <literal><muttng-doc:cmdref name="exec"/></literal> <emphasis>function</emphasis> [ <emphasis>function</emphasis> ... ]
10100             </para>
10101           </listitem>
10102           <listitem>
10103             
10104             <para>
10105               <literal><muttng-doc:hook name="fcc"/></literal> <emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
10106             </para>
10107           </listitem>
10108           <listitem>
10109             
10110             <para>
10111               <literal><muttng-doc:hook name="fcc-save"/></literal> <emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
10112             </para>
10113           </listitem>
10114           <listitem>
10115             
10116             <para>
10117               <literal><muttng-doc:hook name="folder"/></literal> <emphasis>pattern</emphasis> <emphasis>command</emphasis>
10118             </para>
10119           </listitem>
10120           <listitem>
10121             
10122             <para>
10123               <literal><muttng-doc:cmdref name="hdr_order"/></literal> <emphasis>header</emphasis> [ <emphasis>header</emphasis> ... ]
10124             </para>
10125           </listitem>
10126           <listitem>
10127             
10128             <para>
10129               <literal><muttng-doc:cmdref name="unhdr_order"/></literal> <emphasis>header</emphasis> [ <emphasis>header</emphasis> ... ]
10130             </para>
10131           </listitem>
10132           <listitem>
10133             
10134             <para>
10135               <literal><muttng-doc:hook name="charset"/></literal> <emphasis>charset</emphasis> <emphasis>local-charset</emphasis>
10136             </para>
10137           </listitem>
10138           <listitem>
10139             
10140             <para>
10141               <literal><muttng-doc:cmdref name="ignore"/></literal> <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis> ... ]
10142             </para>
10143           </listitem>
10144           <listitem>
10145             
10146             <para>
10147               <literal><muttng-doc:cmdref name="unignore"/></literal> <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis> ... ]
10148             </para>
10149           </listitem>
10150           <listitem>
10151             
10152             <para>
10153               <literal><muttng-doc:cmdref name="lists"/></literal> <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis> ... ]
10154             </para>
10155           </listitem>
10156           <listitem>
10157             
10158             <para>
10159               <literal><muttng-doc:cmdref name="unlists"/></literal> <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis> ... ]
10160             </para>
10161           </listitem>
10162           <listitem>
10163             
10164             <para>
10165               <literal><muttng-doc:cmdref name="macro"/></literal> <emphasis>menu</emphasis> <emphasis>key</emphasis> <emphasis>sequence</emphasis> [ <emphasis>description</emphasis> ]
10166             </para>
10167           </listitem>
10168           <listitem>
10169             
10170             <para>
10171               <literal><muttng-doc:cmdref name="mailboxes"/></literal> <emphasis>filename</emphasis> [ <emphasis>filename</emphasis> ... ]
10172             </para>
10173           </listitem>
10174           <listitem>
10175             
10176             <para>
10177               <literal><muttng-doc:hook name="mbox"/></literal> <emphasis>pattern</emphasis> <emphasis>mailbox</emphasis>
10178             </para>
10179           </listitem>
10180           <listitem>
10181             
10182             <para>
10183               <literal><muttng-doc:hook name="message"/></literal> <emphasis>pattern</emphasis> <emphasis>command</emphasis>
10184             </para>
10185           </listitem>
10186           <listitem>
10187             
10188             <para>
10189               <literal><muttng-doc:cmdref name="mime_lookup"/></literal> <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
10190             </para>
10191           </listitem>
10192           <listitem>
10193             
10194             <para>
10195               <literal>
10196                 <muttng-doc:cmdref name="unmime_lookup"/></literal> <emphasis>mimetype</emphasis> [ <emphasis>mimetype</emphasis> ... ]
10197             </para>
10198           </listitem>
10199           <listitem>
10200             
10201             <para>
10202               <literal><muttng-doc:cmdref name="mono"/></literal> <emphasis>object attribute</emphasis> [ <emphasis>regexp</emphasis> ]
10203             </para>
10204           </listitem>
10205           <listitem>
10206             
10207             <para>
10208               <literal><muttng-doc:cmdref name="unmono"/></literal> <emphasis>index</emphasis> <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis> ... ]
10209             </para>
10210           </listitem>
10211           <listitem>
10212             
10213             <para>
10214               <literal><muttng-doc:cmdref name="my_hdr"/></literal> <emphasis>string</emphasis>
10215             </para>
10216           </listitem>
10217           <listitem>
10218             
10219             <para>
10220               <literal><muttng-doc:cmdref name="unmy_hdr"/></literal> <emphasis>field</emphasis> [ <emphasis>field</emphasis> ... ]
10221             </para>
10222           </listitem>
10223           <listitem>
10224             
10225             <para>
10226               <literal><muttng-doc:hook name="open"/></literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
10227             </para>
10228           </listitem>
10229           <listitem>
10230             
10231             <para>
10232               <literal><muttng-doc:hook name="crypt"/></literal> <emphasis>pattern</emphasis> <emphasis>key-id</emphasis>
10233             </para>
10234           </listitem>
10235           <listitem>
10236             
10237             <para>
10238               <literal><muttng-doc:cmdref name="push"/></literal> <emphasis>string</emphasis>
10239             </para>
10240           </listitem>
10241           <listitem>
10242             
10243             <para>
10244               <literal><muttng-doc:cmdref name="reset"/> </literal><emphasis>variable</emphasis> [ <emphasis>variable</emphasis> ... ]
10245             </para>
10246           </listitem>
10247           <listitem>
10248             
10249             <para>
10250               <literal><muttng-doc:hook name="save"/></literal> <emphasis>regexp</emphasis> <emphasis>filename</emphasis>
10251             </para>
10252           </listitem>
10253           <listitem>
10254             
10255             <para>
10256               <literal><muttng-doc:cmdref name="score"/> </literal> <emphasis>pattern</emphasis> <emphasis>value</emphasis>
10257             </para>
10258           </listitem>
10259           <listitem>
10260             
10261             <para>
10262               <literal><muttng-doc:cmdref name="unscore"/></literal> <emphasis>pattern</emphasis> [ <emphasis>pattern</emphasis> ... ]
10263             </para>
10264           </listitem>
10265           <listitem>
10266             
10267             <para>
10268               <literal><muttng-doc:hook name="send"/></literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
10269             </para>
10270           </listitem>
10271           <listitem>
10272             
10273             <para>
10274               <literal><muttng-doc:hook name="reply"/></literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
10275             </para>
10276           </listitem>
10277           <listitem>
10278             
10279             <para>
10280               <literal><muttng-doc:cmdref name="set"/></literal> [no|inv]<emphasis>variable</emphasis>[ =<emphasis>value</emphasis> ] [ <emphasis>variable</emphasis> ... ]
10281             </para>
10282           </listitem>
10283           <listitem>
10284             
10285             <para>
10286               <literal><muttng-doc:cmdref name="unset"/></literal> <emphasis>variable</emphasis> [ <emphasis>variable</emphasis> ... ]
10287             </para>
10288           </listitem>
10289           <listitem>
10290             
10291             <para>
10292               <literal><muttng-doc:cmdref name="source"/></literal> <emphasis>filename</emphasis>
10293             </para>
10294           </listitem>
10295           <listitem>
10296             
10297             <para>
10298               <literal><muttng-doc:cmdref name="spam"/></literal> <emphasis>pattern</emphasis> <emphasis>format</emphasis>
10299             </para>
10300           </listitem>
10301           <listitem>
10302             
10303             <para>
10304               <literal><muttng-doc:cmdref name="nospam"/></literal> <emphasis>pattern</emphasis>
10305             </para>
10306           </listitem>
10307           <listitem>
10308             
10309             <para>
10310               <literal><muttng-doc:cmdref name="subscribe"/></literal> <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis> ... ] 
10311             </para>
10312           </listitem>
10313           <listitem>
10314             
10315             <para>
10316               <literal><muttng-doc:cmdref name="unsubscribe"/></literal> <emphasis>regexp</emphasis> [ <emphasis>regexp</emphasis> ... ] 
10317             </para>
10318           </listitem>
10319           <listitem>
10320             
10321             <para>
10322               <literal><muttng-doc:cmdref name="toggle"/></literal> <emphasis>variable</emphasis> [ <emphasis>variable</emphasis> ... ]
10323             </para>
10324           </listitem>
10325           <listitem>
10326             
10327             <para>
10328               <literal><muttng-doc:cmdref name="unhook"/></literal> <emphasis>hook-type</emphasis>
10329             </para>
10330           </listitem>
10331           
10332         </itemizedlist>
10333         
10334       </para>
10335       
10336     </sect1>
10337     
10338     <sect1 id="variables">
10339       <title>Configuration variables</title>
10340       
10341       <para>
10342         The following list contains all variables which, in the process of
10343         providing more consistency, have been renamed and are partially even
10344         removed already. The left column contains the old synonym variables,
10345         the right column the full/new name:
10346       </para>
10347       
10348       <para>
10349         <anchor id="sect-obsolete"/>
10350
10351         <table frame="none" rowsep="1" texstr="l|l">
10352           <title>Reference: Obsolete Variables</title>
10353           <tgroup cols="2" align="left" colsep="1" rowsep="1">
10354           <thead>
10355             <row>
10356               <entry>Old Name</entry>
10357               <entry>New Name</entry>
10358             </row>
10359           </thead>
10360           <tbody>
10361             <row>
10362               <entry><literal>edit_hdrs</literal></entry>
10363               <entry><muttng-doc:varref name="edit-headers"/></entry>
10364             </row>
10365             <row>
10366               <entry><literal>forw_decode</literal></entry>
10367               <entry><muttng-doc:varref name="forward-decode"/></entry>
10368               </row>
10369             <row>
10370               <entry><literal>forw_format</literal></entry>
10371               <entry><muttng-doc:varref name="forward-format"/></entry>
10372               </row>
10373             <row>
10374               <entry><literal>forw_quote</literal></entry>
10375               <entry><muttng-doc:varref name="forward-quote"/></entry>
10376               </row>
10377             <row>
10378               <entry><literal>hdr_format</literal></entry>
10379               <entry><muttng-doc:varref name="index-format"/></entry>
10380               </row>
10381             <row>
10382               <entry><literal>indent_str</literal></entry>
10383               <entry><muttng-doc:varref name="indent-string"/></entry>
10384               </row>
10385             <row>
10386               <entry><literal>mime_fwd</literal></entry>
10387               <entry><muttng-doc:varref name="mime-forward"/></entry>
10388               </row>
10389             <row>
10390               <entry><literal>msg_format</literal></entry>
10391               <entry><muttng-doc:varref name="message-format"/></entry>
10392               </row>
10393             <row>
10394               <entry><literal>pgp_autosign</literal></entry>
10395               <entry><muttng-doc:varref name="crypt-autosign"/></entry>
10396               </row>
10397             <row>
10398               <entry><literal>pgp_autoencrypt</literal></entry>
10399               <entry><muttng-doc:varref name="crypt-autoencrypt"/></entry>
10400               </row>
10401             <row>
10402               <entry><literal>pgp_replyencrypt</literal></entry>
10403               <entry><muttng-doc:varref name="crypt-replyencrypt"/></entry>
10404               </row>
10405             <row>
10406               <entry><literal>pgp_replysign</literal></entry>
10407               <entry><muttng-doc:varref name="crypt-replysign"/></entry>
10408               </row>
10409             <row>
10410               <entry><literal>pgp_replysignencrypted</literal></entry>
10411               <entry><muttng-doc:varref name="crypt-replysignencrypted"/></entry>
10412               </row>
10413             <row>
10414               <entry><literal>pgp_verify_sig</literal></entry>
10415               <entry><muttng-doc:varref name="crypt-verify-sig"/></entry>
10416               </row>
10417             <row>
10418               <entry><literal>pgp_create_traditional</literal></entry>
10419               <entry><muttng-doc:varref name="pgp-autoinline"/></entry>
10420               </row>
10421             <row>
10422               <entry><literal>pgp_auto_traditional</literal></entry>
10423               <entry><muttng-doc:varref name="pgp-replyinline"/></entry>
10424               </row>
10425             <row>
10426               <entry><literal>forw_decrypt</literal></entry>
10427               <entry><muttng-doc:varref name="forward-decrypt"/></entry>
10428               </row>
10429             <row>
10430               <entry><literal>smime_sign_as</literal></entry>
10431               <entry><muttng-doc:varref name="smime-default-key"/></entry>
10432               </row>
10433             <row>
10434               <entry><literal>post_indent_str</literal></entry>
10435               <entry><muttng-doc:varref name="post-indent-string"/></entry>
10436               </row>
10437             <row>
10438               <entry><literal>print_cmd</literal></entry>
10439               <entry><muttng-doc:varref name="print-command"/></entry>
10440               </row>
10441             <row>
10442               <entry><literal>shorten_hierarchy</literal></entry>
10443               <entry><muttng-doc:varref name="sidebar-shorten-hierarchy"/></entry>
10444               </row>
10445             <row>
10446               <entry><literal>ask_followup_to</literal></entry>
10447               <entry><muttng-doc:varref name="nntp-ask-followup-to"/></entry>
10448               </row>
10449             <row>
10450               <entry><literal>ask_x_comment_to</literal></entry>
10451               <entry><muttng-doc:varref name="nntp-ask-x-comment-to"/></entry>
10452               </row>
10453             <row>
10454               <entry><literal>catchup_newsgroup</literal></entry>
10455               <entry><muttng-doc:varref name="nntp-catchup"/></entry>
10456             </row>
10457             <row>
10458               <entry><literal>followup_to_poster</literal></entry>
10459               <entry><muttng-doc:varref name="nntp-followup-to-poster"/></entry>
10460             </row>
10461             <row>
10462               <entry><literal>group_index_format</literal></entry>
10463               <entry><muttng-doc:varref name="nntp-group-index-format"/></entry>
10464             </row>
10465             <row>
10466               <entry><literal>inews</literal></entry>
10467               <entry><muttng-doc:varref name="nntp-inews"/></entry>
10468             </row>
10469             <row>
10470               <entry><literal>mime_subject</literal></entry>
10471               <entry><muttng-doc:varref name="nntp-mime-subject"/></entry>
10472             </row>
10473             <row>
10474               <entry><literal>news_cache_dir</literal></entry>
10475               <entry><muttng-doc:varref name="nntp-cache-dir"/></entry>
10476             </row>
10477             <row>
10478               <entry><literal>news_server</literal></entry>
10479               <entry><muttng-doc:varref name="nntp-host"/></entry>
10480             </row>
10481             <row>
10482               <entry><literal>newsrc</literal></entry>
10483               <entry><muttng-doc:varref name="nntp-newsrc"/></entry>
10484             </row>
10485             <row>
10486               <entry><literal>nntp_poll</literal></entry>
10487               <entry><muttng-doc:varref name="nntp-mail-check"/></entry>
10488             </row>
10489             <row>
10490               <entry><literal>pop_checkinterval</literal></entry>
10491               <entry><muttng-doc:varref name="pop-mail-check"/></entry>
10492             </row>
10493             <row>
10494               <entry><literal>post_moderated</literal></entry>
10495               <entry><muttng-doc:varref name="nntp-post-moderated"/></entry>
10496             </row>
10497             <row>
10498               <entry><literal>save_unsubscribed</literal></entry>
10499               <entry><muttng-doc:varref name="nntp-save-unsubscribed"/></entry>
10500             </row>
10501             <row>
10502               <entry><literal>show_new_news</literal></entry>
10503               <entry><muttng-doc:varref name="nntp-show-new-news"/></entry>
10504             </row>
10505             <row>
10506               <entry><literal>show_only_unread</literal></entry>
10507               <entry><muttng-doc:varref name="nntp-show-only-unread"/></entry>
10508             </row>
10509             <row>
10510               <entry><literal>x_comment_to</literal></entry>
10511               <entry><muttng-doc:varref name="nntp-x-comment-to"/></entry>
10512             </row>
10513             <row>
10514               <entry><literal>smtp_auth_username</literal></entry>
10515               <entry><muttng-doc:varref name="smtp-user"/></entry>
10516             </row>
10517             <row>
10518               <entry><literal>smtp_auth_password</literal></entry>
10519               <entry><muttng-doc:varref name="smtp-pass"/></entry>
10520             </row>
10521             <row>
10522               <entry><literal>user_agent</literal></entry>
10523               <entry><muttng-doc:varref name="agent-string"/></entry>
10524             </row>
10525           </tbody>
10526         </tgroup>
10527       </table>
10528
10529       </para>
10530       
10531       <para>
10532         The <literal>contrib</literal> subdirectory contains a script named
10533         <literal>update-config.pl</literal> which eases migration.
10534       </para>
10535       
10536       <para>
10537         A complete list of current variables follows.
10538       </para>