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