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