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