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