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