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