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