e49e0643ef2f14c56187f3a8e5bddd47958f78e0
[apps/madmutt.git] / doc / manual.sgml.head
1 <!-- vim:ft=sgml --> 
2 <!doctype linuxdoc system>
3
4 <book>
5
6 <title>The Mutt Next Generation E-Mail Client
7 <author>by Andreas Krennmair <htmlurl url="mailto:ak@synflood.at" name="&lt;ak@synflood.at&gt;"> and others
8         originally based on <em>mutt</em> by Michael Elkins <htmlurl url="mailto:me@cs.hmc.edu" name="&lt;me@cs.hmc.edu&gt;"> and others
9 <date>version @VERSION@
10 <abstract>
11 Michael Elinks on mutt, circa 1995: ``All mail clients suck. 
12 This one just sucks less.'' - Sven Guckes on mutt, ca. 2003: ``But it still sucks!''
13 </abstract>
14
15 <toc>
16
17 <chapt>Introduction <!--{{{--> 
18
19 <sect>Overview <!--{{{--> 
20 <p>
21 <bf/Mutt-ng/ is a small but very powerful text-based MIME mail client.  Mutt-ng is
22 highly configurable, and is well suited to the mail power user with advanced
23 features like key bindings, keyboard macros, mail threading, regular
24 expression searches and a powerful pattern matching language for selecting
25 groups of messages.
26
27 <p>This documentation additionally contains documentation to <bf/Mutt-NG/, a 
28 fork from Mutt with the goal to fix all the little annoyances of Mutt, to
29 integrate all the Mutt patches that are floating around in the web, and to
30 add other new features. Features specific to Mutt-ng will be discussed in
31 an extra section. Don't be confused when most of the documentation talk about
32 Mutt and not Mutt-ng, Mutt-ng contains all Mutt features, plus many more.
33
34 <!--}}}--> 
35
36 <sect>Mutt-ng Home Page <!--{{{--> 
37 <p>
38 <htmlurl url="http://www.muttng.org/"
39 name="http://www.muttng.org">
40
41 <!--}}}--> 
42
43 <sect>Mailing Lists <!--{{{--> 
44 <p>
45
46 <itemize>
47 <item><htmlurl url="https://lists.berlios.de/mailman/listinfo/mutt-ng-users"
48 name="mutt-ng-users@lists.berlios.de"> -- This is where the mutt-ng user support happens.
49 <item><htmlurl url="https://lists.berlios.de/mailman/listinfo/mutt-ng-devel" name="mutt-ng-devel@lists.berlios.de"> -- The development mailing list for mutt-ng
50 </itemize>
51
52 <!--}}}--> 
53
54 <sect>Software Distribution Sites <!--{{{--> 
55 <p>
56 So far, there are no official releases of Mutt-ng, but you can download
57 daily snapshots from <htmlurl url="http://mutt-ng.berlios.de/snapshots/" name="http://mutt-ng.berlios.de/snapshots/">
58
59 <!--}}}--> 
60
61 <sect>IRC <!--{{{--> 
62 <p>
63 Visit channel <em/#muttng/ on <htmlurl
64 url="http://www.freenode.net/" name="irc.freenode.net
65 (www.freenode.net)"> to chat with other people interested in Mutt-ng.
66
67 <!--}}}--> 
68
69 <sect>Weblog <!--{{{--> 
70 <p>
71 If you want to read fresh news about the latest development in Mutt-ng, and get informed
72 about stuff like interesting, Mutt-ng-related articles and packages for your favorite
73 distribution, you can read and/or subscribe to our 
74 <htmlurl url="http://mutt-ng.supersized.org/" name="Mutt-ng development weblog">.
75
76 <!--}}}--> 
77
78 <sect>Copyright <!--{{{--> 
79 <p>
80 Mutt is Copyright (C) 1996-2000 Michael R. Elkins
81 &lt;me@cs.hmc.edu&gt; and others
82
83 This program is free software; you can redistribute it and/or modify
84 it under the terms of the GNU General Public License as published by
85 the Free Software Foundation; either version 2 of the License, or
86 (at your option) any later version.
87
88 This program is distributed in the hope that it will be useful,
89 but WITHOUT ANY WARRANTY; without even the implied warranty of
90 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
91 GNU General Public License for more details.
92
93 You should have received a copy of the GNU General Public License
94 along with this program; if not, write to the Free Software
95 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
96
97 <!--}}}--> 
98
99 <!--}}}--> 
100
101 <chapt>Getting Started <!--{{{--> 
102
103   <sect>Basic Concepts <!--{{{--> 
104
105     <sect1>Screens and Menus <!--{{{--> 
106
107       <p>mutt-ng offers different screens of which every has its special
108       purpose:
109
110       <itemize>
111
112         <item>The <em/index/ displays the contents of the currently opened
113         mailbox.
114
115         <item>The <em/pager/ is responsible for displaying messages, that
116         is, the header, the body and all attached parts.
117
118         <item>The <em/file browser/ offers operations on and displays
119         information of all folders mutt-ng should watch for mail.
120
121         <item>The <em/sidebar/ offers a permanent view of which mailboxes
122         contain how many total, new and/or flagged mails.
123
124         <item>The <em/help screen/ lists for all currently available
125         commands how to invoke them as well as a short description.
126
127         <item>The <em/compose/ menu is a comfortable interface take last
128         actions before sending mail: change subjects, attach files, remove
129         attachements, etc.
130
131         <item>The <em/attachement/ menu gives a summary and the tree
132         structure of the attachements of the current message.
133
134         <item>The <em/alias/ menu lists all or a fraction of the aliases
135         a user has defined.
136
137         <item>The <em/key/ menu used in connection with encryption lets
138         users choose the right key to encrypt with.
139
140       </itemize>
141
142       <p>When mutt-ng is started without any further options, it'll open
143       the users default mailbox and display the index.
144
145     <!--}}}--> 
146
147     <sect1>Configuration <!--{{{--> 
148
149       <p>Mutt-ng does <em/not/ feature an internal configuration
150       interface or menu due to the simple fact that this would be too
151       complex to handle (currently there are several <em/hundred/
152       variables which fine-tune the behaviour.)
153
154       <p>Mutt-ng is configured using configuration files which allow
155       users to add comments or manage them via version control systems
156       to ease maintenance.
157
158       <p>Also, mutt-ng comes with a shell script named <tt/grml-muttng/
159       kindly contributed by users which really helps and eases the
160       creation of a user's configuration file. When downloading the
161       source code via a snapshot or via subversion, it can be found in
162       the <tt/contrib/ directory.
163
164     <!--}}}--> 
165
166     <sect1>Functions <!--{{{--> 
167
168       <p>Mutt-ng offers great flexibility due to the use of functions:
169       internally, every action a user can make mutt-ng perform is named
170       ``function.'' Those functions are assigned to keys (or even key
171       sequences) and may be completely adjusted to user's needs. The
172       basic idea is that the impatient users get a very intuitive
173       interface to start off with and advanced users virtually get no
174       limits to adjustments.
175
176     <!--}}}--> 
177
178     <sect1>Interaction <!--{{{--> 
179
180       <p>Mutt-ng has two basic concepts of user interaction:
181
182         <enum>
183
184           <item>There is one dedicated line on the screen used to query
185           the user for input, issue any command, query variables and
186           display error and informational messages. As for every type of
187           user input, this requires manual action leading to the need of
188           input.
189
190           <item>The automatized interface for interaction are the so
191           called <em/hooks/. Hooks specify actions the user wants to be
192           performed at well-defined situations: what to do when entering
193           which folder, what to do when displaying or replying to what
194           kind of message, etc. These are optional, i.e. a user doesn't
195           need to specify them but can do so.
196
197         </enum>
198
199     <!--}}}--> 
200
201     <sect1>Modularization <!--{{{--> 
202
203       <p>Although mutt-ng has many functionality built-in, many
204       features can be delegated to external tools to increase
205       flexibility: users can define programs to filter a message through
206       before displaying, users can use any program they want for
207       displaying a message, message types (such as PDF or PostScript)
208       for which mutt-ng doesn't have a built-in filter can be rendered
209       by arbitrary tools and so forth. Although mutt-ng has an alias
210       mechanism built-in, it features using external tools to query for
211       nearly every type of addresses from sources like LDAP, databases
212       or just the list of locally known users.
213
214     <!--}}}--> 
215
216     <sect1>Patterns <!--{{{--> 
217
218       <p>Mutt-ng has a built-in pattern matching ``language'' which is
219       as widely used as possible to present a consistent interface to
220       users. The same ``pattern terms'' can be used for searching,
221       scoring, message selection and much more.
222
223     <!--}}}--> 
224
225   <!--}}}--> 
226
227   <sect>Screens and Menus <!--{{{--> 
228
229     <sect1>Index <!--{{{--> 
230
231      <p>The index is the screen that you usually see first when you
232      start mutt-ng. It gives an overview over your emails in the
233      currently opened mailbox. By default, this is your system mailbox.
234      The information you see in the index is a list of emails, each with
235      its number on the left, its flags (new email, important email,
236      email that has been forwarded or replied to, tagged email, ...),
237      the date when email was sent, its sender, the email size, and the
238      subject. Additionally, the index also shows thread hierarchies:
239      when you reply to an email, and the other person replies back, you
240      can see the other's person email in a "sub-tree" below.  This is
241      especially useful for personal email between a group of people or
242      when you've subscribed to mailing lists.
243
244     <!--}}}--> 
245
246     <sect1>Pager <!--{{{--> 
247
248      <p>The pager is responsible for showing the email content. On the
249      top of the pager you have an overview over the most important email
250      headers like the sender, the recipient, the subject, and much more
251      information. How much information you actually see depends on your
252      configuration, which we'll describe below.
253
254      <p>Below the headers, you see the email body which usually contains
255      the message. If the email contains any attachments, you will see
256      more information about them below the email body, or, if the
257      attachments are text files, you can view them directly in the
258      pager.
259
260      <p>To give the user a good overview, it is possible to configure
261      mutt-ng to show different things in the pager with different
262      colors. Virtually everything that can be described with a regular
263      expression can be colored, e.g. URLs, email addresses or smileys.
264
265      <!--}}}--> 
266
267     <sect1>File Browser <!--{{{--> 
268
269       <p>The file browser is the interface to the local or remote
270       file system. When selecting a mailbox to open, the browser allows
271       custom sorting of items, limiting the items shown by a regular
272       expression and a freely adjustable format of what to display in
273       which way. It also allows for easy navigation through the
274       file system when selecting file(s) to attach to a message, select
275       multiple files to attach and many more.
276
277     <!--}}}--> 
278
279     <sect1>Sidebar <!--{{{--> 
280
281       <p>The sidebar comes in handy to manage mails which are spread
282       over different folders. All folders users setup mutt-ng to watch
283       for new mail will be listed. The listing includes not only the
284       name but also the number of total messages, the number of new and
285       flagged messages. Items with new mail may be colored different
286       from those with flagged mail, items may be shortened or compress
287       if they're they to long to be printed in full form so that by
288       abbreviated names, user still now what the name stands for.
289
290     <!--}}}--> 
291
292     <sect1>Help <!--{{{--> 
293
294       <p>The help screen is meant to offer a quick help to the user. It
295       lists the current configuration of key bindings and their
296       associated commands including a short description, and currently
297       unbound functions that still need to be associated with a key
298       binding (or alternatively, they can be called via the mutt-ng
299       command prompt).
300
301     <!--}}}--> 
302
303       <sect1>Compose Menu <!--{{{--> 
304
305         <p>The compose menu features a split screen containing the
306         information which really matter before actually sending a
307         message by mail or posting an article to a newsgroup: who gets
308         the message as what (recipient, newsgroup, who gets what kind of
309         copy). Additionally, users may set security options like
310         deciding whether to sign, encrypt or sign and encrypt a message
311         with/for what keys.
312
313         <p>Also, it's used to attach messages, news articles or files to
314         a message, to re-edit any attachment including the message
315         itself.
316
317       <!--}}}--> 
318
319       <sect1>Alias Menu <!--{{{--> 
320
321         <p>The alias menu is used to help users finding the recipients
322         of messages. For users who need to contact many people, there's
323         no need to remember addresses or names completely because it
324         allows for searching, too. The alias mechanism and thus the
325         alias menu also features grouping several addresses by a shorter
326         nickname, the actual alias, so that users don't have to select
327         each single recipient manually.
328
329       <!--}}}--> 
330
331       <sect1>Attachment Menu <!--{{{--> 
332
333         <p>As will be later discussed in detail, mutt-ng features a good
334         and stable MIME implementation, that is, is greatly supports
335         sending and receiving messages of arbitrary type. The
336         attachment menu displays a message's structure in detail: what
337         content parts are attached to which parent part (which gives a
338         true tree structure), which type is of what type and what size.
339         Single parts may saved, deleted or modified to offer great and
340         easy access to message's internals.
341
342       <!--}}}--> 
343
344       <sect1>Key Menu <!--{{{--> 
345
346         <p><tt/FIXME/
347
348       <!--}}}--> 
349
350   <!--}}}--> 
351
352 <sect>Moving Around in Menus <!--{{{--> 
353 <p>
354
355 Information is presented in menus, very similar to ELM.  Here is a table
356 showing the common keys used to navigate menus in Mutt-ng.
357
358 <tscreen><verb>
359 j or Down       next-entry      move to the next entry
360 k or Up         previous-entry  move to the previous entry
361 z or PageDn     page-down       go to the next page
362 Z or PageUp     page-up         go to the previous page
363 = or Home       first-entry     jump to the first entry
364 * or End        last-entry      jump to the last entry
365 q               quit            exit the current menu
366 ?               help            list all key bindings for the current menu
367 </verb></tscreen>
368
369 <!--}}}--> 
370
371 <sect>Editing Input Fields<label id="editing"> <!--{{{--> 
372 <p>
373 Mutt-ng has a builtin line editor which is used as the primary way to input
374 textual data such as email addresses or filenames.  The keys used to move
375 around while editing are very similar to those of Emacs.
376
377 <tscreen><verb>
378 ^A or <Home>    bol             move to the start of the line
379 ^B or <Left>    backward-char   move back one char
380 Esc B           backward-word   move back one word
381 ^D or <Delete>  delete-char     delete the char under the cursor
382 ^E or <End>     eol             move to the end of the line
383 ^F or <Right>   forward-char    move forward one char
384 Esc F           forward-word    move forward one word
385 <Tab>           complete        complete filename or alias
386 ^T              complete-query  complete address with query
387 ^K              kill-eol        delete to the end of the line
388 ESC d           kill-eow        delete to the end of the word
389 ^W              kill-word       kill the word in front of the cursor
390 ^U              kill-line       delete entire line
391 ^V              quote-char      quote the next typed key
392 <Up>            history-up      recall previous string from history
393 <Down>          history-down    recall next string from history
394 <BackSpace>     backspace       kill the char in front of the cursor
395 Esc u           upcase-word     convert word to upper case
396 Esc l           downcase-word   convert word to lower case
397 Esc c           capitalize-word capitalize the word
398 ^G              n/a             abort
399 <Return>        n/a             finish editing
400 </verb></tscreen>
401
402 You can remap the <em/editor/ functions using the <ref id="bind" name="bind">
403 command.  For example, to make the <em/Delete/ key delete the character in
404 front of the cursor rather than under, you could use
405
406 <tt/bind editor &lt;delete&gt; backspace/
407
408 <!--}}}--> 
409
410 <sect>Reading Mail - The Index and Pager <!--{{{--> 
411 <p>
412
413 Similar to many other mail clients, there are two modes in which mail is
414 read in Mutt-ng.  The first is the index of messages in the mailbox, which is
415 called the ``index'' in Mutt-ng.  The second mode is the display of the
416 message contents.  This is called the ``pager.''
417
418 The next few sections describe the functions provided in each of these
419 modes.
420
421 <sect1>The Message Index
422 <p>
423
424 <tscreen><verb>
425 c               change to a different mailbox
426 ESC c           change to a folder in read-only mode
427 C               copy the current message to another mailbox
428 ESC C           decode a message and copy it to a folder
429 ESC s           decode a message and save it to a folder
430 D               delete messages matching a pattern
431 d               delete the current message
432 F               mark as important
433 l               show messages matching a pattern
434 N               mark message as new
435 o               change the current sort method
436 O               reverse sort the mailbox
437 q               save changes and exit
438 s               save-message
439 T               tag messages matching a pattern
440 t               toggle the tag on a message
441 ESC t           toggle tag on entire message thread
442 U               undelete messages matching a pattern
443 u               undelete-message
444 v               view-attachments
445 x               abort changes and exit
446 <Return>        display-message
447 <Tab>           jump to the next new message
448 @               show the author's full e-mail address
449 $               save changes to mailbox
450 /               search
451 ESC /           search-reverse
452 ^L              clear and redraw the screen
453 ^T              untag messages matching a pattern
454 </verb></tscreen>
455
456 <sect2>Status Flags
457 <p>
458
459 In addition to who sent the message and the subject, a short summary of
460 the disposition of each message is printed beside the message number.
461 Zero or more of the following ``flags'' may appear, which mean:
462
463 <p>
464 <descrip>
465 <tag/D/ message is deleted (is marked for deletion)
466 <tag/d/ message have attachments marked for deletion
467 <tag/K/ contains a PGP public key
468 <tag/N/ message is new
469 <tag/O/ message is old
470 <tag/P/ message is PGP encrypted
471 <tag/r/ message has been replied to
472 <tag/S/ message is signed, and the signature is succesfully verified
473 <tag/s/ message is signed
474 <tag/!/ message is flagged
475 <tag/*/ message is tagged
476 </descrip>
477
478 Some of the status flags can be turned on or off using
479 <itemize>
480 <item><bf/set-flag/ (default: w)
481 <item><bf/clear-flag/ (default: W)
482 </itemize>
483
484 <p>
485 Furthermore, the following flags reflect who the message is addressed
486 to.  They can be customized with the
487 <ref id="to_chars" name="&dollar;to&lowbar;chars"> variable.
488
489 <p>
490 <descrip>
491 <tag/+/ message is to you and you only
492 <tag/T/ message is to you, but also to or cc'ed to others
493 <tag/C/ message is cc'ed to you
494 <tag/F/ message is from you
495 <tag/L/ message is sent to a subscribed mailing list
496 </descrip>
497
498 <sect1>The Pager
499 <p>
500
501 By default, Mutt-ng uses its builtin pager to display the body of messages.
502 The pager is very similar to the Unix program <em/less/ though not nearly as
503 featureful.
504
505 <tscreen><verb>
506 <Return>        go down one line
507 <Space>         display the next page (or next message if at the end of a message)
508 -               go back to the previous page
509 n               search for next match
510 S               skip beyond quoted text
511 T               toggle display of quoted text
512 ?               show key bindings
513 /               search for a regular expression (pattern)
514 ESC /           search backwards for a regular expression
515 \               toggle search pattern coloring
516 ^               jump to the top of the message
517 </verb></tscreen>
518
519 In addition, many of the functions from the <em/index/ are available in
520 the pager, such as <em/delete-message/ or <em/copy-message/ (this is one
521 advantage over using an external pager to view messages).
522
523 Also, the internal pager supports a couple other advanced features. For
524 one, it will accept and translate the ``standard'' nroff sequences for
525 bold and underline. These sequences are a series of either the letter,
526 backspace (^H), the letter again for bold or the letter, backspace,
527 ``&lowbar;'' for denoting underline. Mutt-ng will attempt to display these
528 in bold and underline respectively if your terminal supports them. If
529 not, you can use the bold and underline <ref id="color" name="color">
530 objects to specify a color or mono attribute for them.
531
532 Additionally, the internal pager supports the ANSI escape sequences for
533 character attributes.  Mutt-ng translates them into the correct color and
534 character settings.  The sequences Mutt-ng supports are:
535
536 <p>
537 <tscreen><verb>
538 ESC [ Ps;Ps;Ps;...;Ps m
539 where Ps =
540 0    All Attributes Off
541 1    Bold on
542 4    Underline on
543 5    Blink on
544 7    Reverse video on
545 3x   Foreground color is x
546 4x   Background color is x
547
548 Colors are
549 0    black
550 1    red
551 2    green
552 3    yellow
553 4    blue
554 5    magenta
555 6    cyan
556 7    white
557 </verb></tscreen>
558
559 Mutt-ng uses these attributes for handling text/enriched messages, and they
560 can also be used by an external <ref id="auto_view" name="autoview">
561 script for highlighting purposes.  <bf/Note:/ If you change the colors for your
562 display, for example by changing the color associated with color2 for
563 your xterm, then that color will be used instead of green.
564
565 <sect1>Threaded Mode<label id="threads">
566 <p>
567 When the mailbox is <ref id="sort" name="sorted"> by <em/threads/, there are
568 a few additional functions available in the <em/index/ and <em/pager/ modes.
569
570 <tscreen><verb>
571 ^D      delete-thread           delete all messages in the current thread
572 ^U      undelete-thread         undelete all messages in the current thread
573 ^N      next-thread             jump to the start of the next thread
574 ^P      previous-thread         jump to the start of the previous thread
575 ^R      read-thread             mark the current thread as read
576 ESC d   delete-subthread        delete all messages in the current subthread
577 ESC u   undelete-subthread      undelete all messages in the current subthread
578 ESC n   next-subthread          jump to the start of the next subthread
579 ESC p   previous-subthread      jump to the start of the previous subthread
580 ESC r   read-subthread          mark the current subthread as read
581 ESC t   tag-thread              toggle the tag on the current thread
582 ESC v   collapse-thread         toggle collapse for the current thread
583 ESC V   collapse-all            toggle collapse for all threads
584 P       parent-message          jump to parent message in thread
585 </verb></tscreen>
586
587 <bf/Note:/ Collapsing a thread displays only the first message
588 in the thread and hides the others. This is useful when threads
589 contain so many messages that you can only see a handful of threads on
590 the screen. See %M in <ref id="index_format"name="&dollar;index&lowbar;format">.
591 For example, you could use "&percnt;?M?(#&percnt;03M)&amp;(&percnt;4l)?" in <ref
592 id="index_format"name="&dollar;index&lowbar;format"> to optionally
593 display the number of hidden messages if the thread is collapsed.
594
595 See also: <ref id="strict_threads" name="&dollar;strict&lowbar;threads">.
596
597 <sect1>Miscellaneous Functions
598 <p><bf/create-alias/<label id="create-alias"> (default: a)<newline>
599
600 Creates a new alias based upon the current message (or prompts for a
601 new one).  Once editing is complete, an <ref id="alias" name="alias">
602 command is added to the file specified by the <ref id="alias_file"
603 name="&dollar;alias&lowbar;file"> variable for future use. <bf/Note:/
604 Specifying an <ref id="alias_file" name="&dollar;alias&lowbar;file">
605 does not add the aliases specified there-in, you must also <ref
606 id="source" name="source"> the file.
607
608 <p><bf/check-traditional-pgp/<label id="check-traditional-pgp"> (default: ESC P)<newline>
609
610 This function will search the current message for content signed or
611 encrypted with PGP the "traditional" way, that is, without proper
612 MIME tagging.  Technically, this function will temporarily change
613 the MIME content types of the body parts containing PGP data; this
614 is similar to the <ref id="edit-type" name="edit-type"> function's
615 effect.
616
617
618 <p><bf/display-toggle-weed/<label id="display-toggle-weed"> (default: h)<newline>
619
620 Toggles the weeding of message header fields specified by <ref id="ignore"
621 name="ignore"> commands.
622
623 <p><bf/edit/<label id="edit"> (default: e)<newline>
624
625 This command (available in the ``index'' and ``pager'') allows you to
626 edit the raw current message as it's present in the mail folder.
627 After you have finished editing, the changed message will be
628 appended to the current folder, and the original message will be
629 marked for deletion.
630
631 <p><bf/edit-type/<label id="edit-type"><newline>
632 (default: ^E on the attachment menu, and in the pager and index menus; ^T on the
633 compose menu)
634
635 This command is used to temporarily edit an attachment's content
636 type to fix, for instance, bogus character set parameters.  When
637 invoked from the index or from the pager, you'll have the
638 opportunity to edit the top-level attachment's content type.  On the
639 <ref id="attach_menu" name="attachment menu">, you can change any
640 attachment's content type. These changes are not persistent, and get
641 lost upon changing folders.
642
643 Note that this command is also available on the <ref
644 id="compose_menu" name="compose menu">.  There, it's used to
645 fine-tune the properties of attachments you are going to send.
646
647 <p><bf/enter-command/<label id="enter-command"> (default: ``:'')<newline>
648
649 This command is used to execute any command you would normally put in a
650 configuration file.  A common use is to check the settings of variables, or
651 in conjunction with <ref id="macro" name="macros"> to change settings on the
652 fly.
653
654 <p><bf/extract-keys/<label id="extract-keys"> (default: ^K)<newline>
655
656 This command extracts PGP public keys from the current or tagged
657 message(s) and adds them to your PGP public key ring.
658
659 <p><bf/forget-passphrase/<label id="forget-passphrase"> (default:
660 ^F)<newline> 
661
662 This command wipes the passphrase(s) from memory. It is useful, if
663 you misspelled the passphrase.
664
665 <p><bf/list-reply/<label id="list-reply"> (default: L)<newline>
666
667 Reply to the current or tagged message(s) by extracting any addresses which
668 match the regular expressions given by the <ref id="lists" name="lists or subscribe">
669 commands, but also honor any <tt/Mail-Followup-To/ header(s) if the
670 <ref id="honor_followup_to" name="&dollar;honor&lowbar;followup&lowbar;to">
671 configuration variable is set.  Using this when replying to messages posted
672 to mailing lists helps avoid duplicate copies being sent to the author of
673 the message you are replying to.
674
675 <bf/pipe-message/<label id="pipe-message"> (default: |)<newline>
676
677 Asks for an external Unix command and pipes the current or
678 tagged message(s) to it.  The variables <ref id="pipe_decode"
679 name="&dollar;pipe&lowbar;decode">, <ref id="pipe_split"
680 name="&dollar;pipe&lowbar;split">, <ref id="pipe_sep"
681 name="&dollar;pipe&lowbar;sep"> and <ref id="wait_key"
682 name="&dollar;wait&lowbar;key"> control the exact behavior of this
683 function.
684
685 <bf/resend-message/<label id="resend-message"> (default: ESC e)<newline>
686
687 With resend-message, mutt takes the current message as a template for a
688 new message.  This function is best described as "recall from arbitrary
689 folders".  It can conveniently be used to forward MIME messages while
690 preserving the original mail structure. Note that the amount of headers
691 included here depends on the value of the <ref id="weed" name="&dollar;weed">
692 variable.
693
694 This function is also available from the attachment menu. You can use this
695 to easily resend a message which was included with a bounce message
696 as a message/rfc822 body part.
697
698 <bf/shell-escape/<label id="shell-escape"> (default: !)<newline>
699
700 Asks for an external Unix command and executes it.  The <ref
701 id="wait_key" name="&dollar;wait&lowbar;key"> can be used to control
702 whether Mutt-ng will wait for a key to be pressed when the command returns
703 (presumably to let the user read the output of the command), based on
704 the return status of the named command.
705
706 <bf/toggle-quoted/<label id="toggle-quoted"> (default: T)<newline>
707
708 The <em/pager/ uses the <ref id="quote_regexp"
709 name="&dollar;quote&lowbar;regexp"> variable to detect quoted text when
710 displaying the body of the message.  This function toggles the display
711 of the quoted material in the message.  It is particularly useful when
712 are interested in just the response and there is a large amount of
713 quoted text in the way.
714
715 <bf/skip-quoted/<label id="skip-quoted"> (default: S)<newline>
716
717 This function will go to the next line of non-quoted text which come
718 after a line of quoted text in the internal pager.
719
720 <!--}}}--> 
721
722 <sect>Sending Mail <!--{{{--> 
723 <p>
724
725 The following bindings are available in the <em/index/ for sending
726 messages.
727
728 <tscreen><verb>
729 m       compose         compose a new message
730 r       reply           reply to sender
731 g       group-reply     reply to all recipients
732 L       list-reply      reply to mailing list address
733 f       forward         forward message
734 b       bounce          bounce (remail) message
735 ESC k   mail-key        mail a PGP public key to someone
736 </verb></tscreen>
737
738 Bouncing a message sends the message as is to the recipient you
739 specify.  Forwarding a message allows you to add comments or
740 modify the message you are forwarding.  These items are discussed
741 in greater detail in the next chapter <ref id="forwarding_mail"
742 name="``Forwarding and Bouncing Mail''">.
743
744 <sect1>Composing new messages <!--{{{--> 
745
746 <p>When you want to send an email using mutt-ng, simply press <tt/m/ on
747 your keyboard. Then, mutt-ng asks for the recipient via a prompt in
748 the last line:
749
750 <verb>
751 To: 
752 </verb>
753
754 <p>After you've finished entering the recipient(s), press return. If you
755 want to send an email to more than one recipient, separate the email
756 addresses using the comma "<tt/,/". Mutt-ng then asks you for the email
757 subject. Again, press return after you've entered it. After that, mutt-ng
758 got the most important information from you, and starts up an editor
759 where you can then enter your email.
760
761 <p>The editor that is called is selected in the following way: you
762 can e.g. set it in the mutt-ng configuration:
763
764 <verb>
765 set editor = "vim +/^$/ -c ':set tw=72'"
766 set editor = "nano"
767 set editor = "emacs"
768 </verb>
769
770 <p>If you don't set your preferred editor in your configuration, mutt-ng
771 first looks whether the environment variable <tt/$VISUAL/ is set, and if
772 so, it takes its value as editor command. Otherwise, it has a look
773 at <tt/$EDITOR/ and takes its value if it is set. If no editor command
774 can be found, mutt-ng simply assumes <tt/vi/ to be the default editor,
775 since it's the most widespread editor in the Unix world and it's pretty
776 safe to assume that it is installed and available.
777
778 <p>When you've finished entering your message, save it and quit your 
779 editor. Mutt-ng will then present you with a summary screen, the compose menu. 
780 On the top, you see a summary of the most important available key commands.
781 Below that, you see the sender, the recipient(s), Cc and/or Bcc 
782 recipient(s), the subject, the reply-to address, and optionally
783 information where the sent email will be stored and whether it should
784 be digitally signed and/or encrypted.
785
786 <p>Below that, you see a list of "attachments". The mail you've just
787 entered before is also an attachment, but due to its special type
788 (it's plain text), it will be displayed as the normal message on
789 the receiver's side.
790
791 <p>At this point, you can add more attachments, pressing <tt/a/, you
792 can edit the recipient addresses, pressing <tt/t/ for the "To:" field,
793 <tt/c/ for the "Cc:" field, and <tt/b/ for the "Bcc: field. You can
794 also edit the subject the subject by simply pressing <tt/s/ or the
795 email message that you've entered before by pressing <tt/e/. You will
796 then again return to the editor. You can even edit the sender, by pressing
797 <tt/&lt;esc&gt;f/, but this shall only be used with caution.
798
799 <p>Alternatively, you can configure mutt-ng in a way that most of the
800 above settings can be edited using the editor. Therefore, you only
801 need to add the following to your configuration:
802
803 <verb>
804 set edit_headers
805 </verb>
806
807 <p>Once you have finished editing the body of your mail message, you are
808 returned to the <em/compose/ menu.  The following options are available:
809
810 <tscreen><verb>
811 a       attach-file             attach a file
812 A       attach-message          attach message(s) to the message
813 ESC k   attach-key              attach a PGP public key
814 d       edit-description        edit description on attachment
815 D       detach-file             detach a file
816 t       edit-to                 edit the To field
817 ESC f   edit-from               edit the From field
818 r       edit-reply-to           edit the Reply-To field
819 c       edit-cc                 edit the Cc field
820 b       edit-bcc                edit the Bcc field
821 y       send-message            send the message
822 s       edit-subject            edit the Subject
823 S       smime-menu              select S/MIME options
824 f       edit-fcc                specify an ``Fcc'' mailbox
825 p       pgp-menu                select PGP options
826 P       postpone-message        postpone this message until later
827 q       quit                    quit (abort) sending the message
828 w       write-fcc               write the message to a folder
829 i       ispell                  check spelling (if available on your system)
830 ^F      forget-passphrase       wipe passphrase(s) from memory
831 </verb></tscreen>
832
833 <bf/Note:/ The attach-message function will prompt you for a folder to
834 attach messages from. You can now tag messages in that folder and they
835 will be attached to the message you are sending. Note that certain
836 operations like composing a new mail, replying, forwarding, etc. are
837 not permitted when you are in that folder. The %r in <ref
838 id="status_format" name="&dollar;status&lowbar;format"> will change to
839 a 'A' to indicate that you are in attach-message mode.
840
841 <!--}}}--> 
842
843 <sect1>Replying <!--{{{--> 
844
845     <sect2>Simple Replies  <!--{{{--> 
846
847     <p>When you want to reply to an email message, select it in the index
848     menu and then press <tt/r/. Mutt-ng's behaviour is then similar to the 
849     behaviour when you compose a message: first, you will be asked for
850     the recipient, then for the subject, and then, mutt-ng will start
851     the editor with the quote attribution and the quoted message. This
852     can e.g. look like the example below.
853
854     <verb>
855 On Mon, Mar 07, 2005 at 05:02:12PM +0100, Michael Svensson wrote:
856 &gt; Bill, can you please send last month's progress report to Mr. 
857 &gt; Morgan? We also urgently need the cost estimation for the new 
858 &gt; production server that we want to set up before our customer's 
859 &gt; project will go live.
860     </verb>
861
862     <p>You can start editing the email message. It is strongly
863     recommended to put your answer <em/below/ the quoted text and to
864     only quote what is really necessary and that you refer to. Putting
865     your answer on top of the quoted message, is, although very
866     widespread, very often not considered to be a polite way to answer
867     emails.
868
869     <p>The quote attribution is configurable, by default it is set to
870     <verb>
871 set attribution = "On %d, %n wrote:"
872     </verb>
873
874     <p>It can also be set to something more compact, e.g.
875     <verb>
876 set attribution = "attribution="* %n &lt;%a&gt; [%(%y-%m-%d %H:%M)]:"
877     </verb>
878
879     <p>The example above results in the following attribution:
880     <verb>
881 * Michael Svensson &lt;svensson@foobar.com&gt; [05-03-06 17:02]:
882 &gt; Bill, can you please send last month's progress report to Mr. 
883 &gt; Morgan? We also urgently need the cost estimation for the new 
884 &gt; production server that we want to set up before our customer's 
885 &gt; project will go live.
886     </verb>
887
888     <p>Generally, try to keep your attribution short yet
889     information-rich. It is <em/not/ the right place for witty quotes,
890     long "attribution" novels or anything like that: the right place
891     for such things is - if at all - the email signature at the very
892     bottom of the message.
893
894     <p>When you're done with writing your message, save and quit the
895     editor. As before, you will return to the compose menu, which is
896     used in the same way as before.
897
898     <!--}}}--> 
899
900     <sect2>Group Replies <!--{{{--> 
901
902     <p>In the situation where a group of people uses email as a
903     discussion, most of the emails will have one or more recipients,
904     and probably several "Cc:" recipients. The group reply functionality
905     ensures that when you press <tt/g/ instead of <tt/r/ to do a reply,
906     each and every recipient that is contained in the original message
907     will receive a copy of the message, either as normal recipient or
908     as "Cc:" recipient.
909
910     <!--}}}--> 
911
912     <sect2>List Replies <!--{{{--> 
913
914     <p>When you use mailing lists, it's generally better to send your
915     reply to a message only to the list instead of the list and the
916     original author. To make this easy to use, mutt-ng features list
917     replies.
918
919     <p>To do a list reply, simply press <tt/L/. If the email contains
920     a <tt/Mail-Followup-To:/ header, its value will be used as reply
921     address. Otherwise, mutt-ng searches through all mail addresses in
922     the original message and tries to match them a list of regular
923     expressions which can be specified using the <tt/lists/ command. 
924     If any of the regular expression matches, a mailing
925     list address has been found, and it will be used as reply address.
926
927     <verb>
928 lists linuxevent@luga\.at vuln-dev@ mutt-ng-users@
929     </verb>
930
931     <p>Nowadays, most mailing list software like GNU Mailman adds a
932     <tt/Mail-Followup-To:/ header to their emails anyway, so setting
933     <tt/lists/ is hardly ever necessary in practice.
934
935     <!--}}}--> 
936
937 <!--}}}--> 
938
939 <sect1>Editing the message header <!--{{{--> 
940 <p>
941 When editing the header of your outgoing message, there are a couple of
942 special features available.
943
944 If you specify<newline>
945 <tt/Fcc:/ <em/filename/<newline>
946 Mutt-ng will pick up <em/filename/
947 just as if you had used the <em/edit-fcc/ function in the <em/compose/ menu.
948
949 You can also attach files to your message by specifying<newline>
950 <tt/Attach:/ <em/filename/  &lsqb; <em/description/ &rsqb;<newline>
951 where <em/filename/ is the file to attach and <em/description/ is an
952 optional string to use as the description of the attached file.
953
954 When replying to messages, if you remove the <em/In-Reply-To:/ field from
955 the header field, Mutt-ng will not generate a <em/References:/ field, which
956 allows you to create a new message thread.
957
958 Also see <ref id="edit_headers" name="edit&lowbar;headers">.
959
960 <!--}}}--> 
961
962 <sect1>Using Mutt-ng with PGP <!--{{{--> 
963
964 <p>
965 If you want to use PGP, you can specify 
966
967 <tt/Pgp:/ &lsqb; <tt/E/ | <tt/S/ | <tt/S/<em/&lt;id&gt;/ &rsqb; <newline>
968
969 ``E'' encrypts, ``S'' signs and
970 ``S&lt;id&gt;'' signs with the given key, setting <ref
971 id="pgp_sign_as" name="&dollar;pgp&lowbar;sign&lowbar;as"> permanently.
972
973 If you have told mutt to PGP encrypt a message, it will guide you
974 through a key selection process when you try to send the message.
975 Mutt-ng will not ask you any questions about keys which have a
976 certified user ID matching one of the message recipients' mail
977 addresses.  However, there may be situations in which there are
978 several keys, weakly certified user ID fields, or where no matching
979 keys can be found.
980
981 In these cases, you are dropped into a menu with a list of keys from
982 which you can select one.  When you quit this menu, or mutt can't
983 find any matching keys, you are prompted for a user ID.  You can, as
984 usually, abort this prompt using <tt/^G/.  When you do so, mutt will
985 return to the compose screen.
986
987 Once you have successfully finished the key selection, the message
988 will be encrypted using the selected public keys, and sent out.
989
990 Most fields of the entries in the key selection menu (see also <ref
991 id="pgp_entry_format" name="&dollar;pgp&lowbar;entry&lowbar;format">) 
992 have obvious meanings.  But some explanations on the capabilities, flags, 
993 and validity fields are in order.
994
995 The flags sequence (&percnt;f) will expand to one of the following flags:
996 <tscreen><verb>
997 R            The key has been revoked and can't be used.
998 X            The key is expired and can't be used.
999 d            You have marked the key as disabled.
1000 c            There are unknown critical self-signature 
1001              packets.
1002 </verb></tscreen>
1003
1004 The capabilities field (&percnt;c) expands to a two-character sequence
1005 representing a key's capabilities.  The first character gives
1006 the key's encryption capabilities: A minus sign (<bf/-/) means 
1007 that the key cannot be used for encryption.  A dot (<bf/./) means that
1008 it's marked as a signature key in one of the user IDs, but may 
1009 also be used for encryption.  The letter <bf/e/ indicates that 
1010 this key can be used for encryption.
1011  
1012 The second character indicates the key's signing capabilities.  Once 
1013 again, a ``<bf/-/'' implies ``not for signing'', ``<bf/./'' implies
1014 that the key is marked as an encryption key in one of the user-ids, and
1015 ``<bf/s/'' denotes a key which can be used for signing.
1016
1017 Finally, the validity field (%t) indicates how well-certified a user-id
1018 is.  A question mark (<bf/?/) indicates undefined validity, a minus 
1019 character (<bf/-/) marks an untrusted association, a space character 
1020 means a partially trusted association, and a plus character (<bf/+/) 
1021 indicates complete validity.
1022
1023 <!--}}}--> 
1024
1025 <sect1>Sending anonymous messages via mixmaster <!--{{{--> 
1026
1027 <p>
1028 You may also have configured mutt to co-operate with Mixmaster, an
1029 anonymous remailer.  Mixmaster permits you to send your messages
1030 anonymously using a chain of remailers. Mixmaster support in mutt is for 
1031 mixmaster version 2.04 (beta 45 appears to be the latest) and 2.03. 
1032 It does not support earlier versions or the later so-called version 3 betas, 
1033 of which the latest appears to be called 2.9b23.
1034
1035 To use it, you'll have to obey certain restrictions.  Most
1036 important, you cannot use the <tt/Cc/ and <tt/Bcc/ headers.  To tell
1037 Mutt-ng to use mixmaster, you have to select a remailer chain, using
1038 the mix function on the compose menu.  
1039
1040 The chain selection screen is divided into two parts.  In the
1041 (larger) upper part, you get a list of remailers you may use.  In
1042 the lower part, you see the currently selected chain of remailers.
1043
1044 You can navigate in the chain using the <tt/chain-prev/ and
1045 <tt/chain-next/ functions, which are by default bound to the left
1046 and right arrows and to the <tt/h/ and <tt/l/ keys (think vi
1047 keyboard bindings).  To insert a remailer at the current chain
1048 position, use the <tt/insert/ function.  To append a remailer behind
1049 the current chain position, use <tt/select-entry/ or <tt/append/.
1050 You can also delete entries from the chain, using the corresponding
1051 function.  Finally, to abandon your changes, leave the menu, or
1052 <tt/accept/ them pressing (by default) the <tt/Return/ key.
1053
1054 Note that different remailers do have different capabilities,
1055 indicated in the &percnt;c entry of the remailer menu lines (see
1056 <ref id="mix_entry_format"
1057 name="&dollar;mix&lowbar;entry&lowbar;format">).  Most important is
1058 the ``middleman'' capability, indicated by a capital ``M'': This
1059 means that the remailer in question cannot be used as the final
1060 element of a chain, but will only forward messages to other
1061 mixmaster remailers.  For details on the other capabilities, please
1062 have a look at the mixmaster documentation.
1063
1064 <!--}}}--> 
1065
1066 <!--}}}--> 
1067
1068 <sect>Forwarding and Bouncing Mail<label id="forwarding_mail"> <!--{{{--> 
1069
1070 <p>Often, it is necessary to forward mails to other people.
1071 Therefore, mutt-ng supports forwarding messages in two different
1072 ways.
1073
1074 <p>The first one is regular forwarding, as you probably know it from
1075 other mail clients. You simply press <tt/f/, enter the recipient
1076 email address, the subject of the forwarded email, and then you can
1077 edit the message to be forwarded in the editor. The forwarded
1078 message is separated from the rest of the message via the two
1079 following markers:
1080
1081 <verb>
1082 ----- Forwarded message from Lucas User <luser@example.com> -----
1083
1084 From: Lucas User <luser@example.com>
1085 Date: Thu, 02 Dec 2004 03:08:34 +0100
1086 To: Michael Random <mrandom@example.com>
1087 Subject: Re: blackmail
1088
1089 Pay me EUR 50,000.- cash or your favorite stuffed animal will die
1090 a horrible death.
1091
1092
1093 ----- End forwarded message -----</verb>
1094
1095 <p>When you're done with editing the mail, save and quit the editor,
1096 and you will return to the compose menu, the same menu you also
1097 encounter when composing or replying to mails.
1098
1099 <p>The second mode of forwarding emails with mutt-ng is the
1100 so-called <em/bouncing/: when you bounce an email to another
1101 address, it will be sent in practically the same format you send it
1102 (except for headers that are created during transporting the
1103 message). To bounce a message, press <tt/b/ and enter the recipient
1104 email address. By default, you are then asked whether you really
1105 want to bounce the message to the specified recipient. If you answer
1106 with yes, the message will then be bounced.
1107
1108 <p>To the recipient, the bounced email will look as if he got it
1109 like a regular email where he was <tt/Bcc:/ recipient. The only
1110 possibility to find out whether it was a bounced email is to
1111 carefully study the email headers and to find out which host really
1112 sent the email.
1113
1114 <!--}}}--> 
1115
1116 <sect>Postponing Mail<label id="postponing_mail"> <!--{{{--> 
1117 <p>
1118
1119 At times it is desirable to delay sending a message that you have
1120 already begun to compose.  When the <em/postpone-message/ function is
1121 used in the <em/compose/ menu, the body of your message and attachments
1122 are stored in the mailbox specified by the <ref id="postponed"
1123 name="&dollar;postponed"> variable.  This means that you can recall the
1124 message even if you exit Mutt-ng and then restart it at a later time.
1125
1126 Once a message is postponed, there are several ways to resume it.  From the
1127 command line you can use the ``-p'' option, or if you <em/compose/ a new
1128 message from the <em/index/ or <em/pager/ you will be prompted if postponed
1129 messages exist.  If multiple messages are currently postponed, the
1130 <em/postponed/ menu will pop up and you can select which message you would
1131 like to resume.
1132
1133 <bf/Note:/ If you postpone a reply to a message, the reply setting of
1134 the message is only updated when you actually finish the message and
1135 send it.  Also, you must be in the same folder with the message you
1136 replied to for the status of the message to be updated.
1137
1138 See also the <ref id="postpone" name="&dollar;postpone"> quad-option.
1139
1140 <!--}}}--> 
1141
1142 <!--}}}--> 
1143
1144 <chapt>Configuration <!--{{{--> 
1145
1146 <sect>Locations of Configuration Files <!--{{{--> 
1147 <p>While the default configuration (or ``preferences'') make Mutt-ng usable right out
1148 of the box, it is often desirable to tailor Mutt-ng to suit your own tastes. When
1149 Mutt-ng is first invoked, it will attempt to read the ``system'' configuration
1150 file (defaults set by your local system administrator), unless the ``-n'' <ref
1151 id="commandline" name="command line"> option is specified.  This file is
1152 typically <tt>/usr/local/share/muttng/Muttngrc</tt> or <tt>/etc/Muttngrc</tt>,
1153 Mutt-ng users will find this file in <tt>/usr/local/share/muttng/Muttrc</tt> or
1154 <tt>/etc/Muttngrc</tt>. Mutt will next look for a file named <tt>.muttrc</tt>
1155 in your home directory, Mutt-ng will look for <tt>.muttngrc</tt>.  If this file
1156 does not exist and your home directory has a subdirectory named <tt/.mutt/,
1157 mutt try to load a file named <tt>.muttng/muttngrc</tt>. 
1158
1159 <tt>.muttrc</tt> (or <tt>.muttngrc</tt> for Mutt-ng) is the file where you will
1160 usually place your <ref id="commands" name="commands"> to configure Mutt-ng.
1161
1162 <!--}}}--> 
1163
1164 <sect>Syntax of Initialization Files<label id="muttrc-syntax"> <!--{{{--> 
1165 <p>
1166
1167 An initialization file consists of a series of <ref id="commands"
1168 name="commands">.  Each line of the file may contain one or more commands.
1169 When multiple commands are used, they must be separated by a semicolon (;).
1170 <tscreen><verb>
1171 set realname='Mutt-ng user' ; ignore x-
1172 </verb></tscreen>
1173 The hash mark, or pound sign
1174 (``&num;''), is used as a ``comment'' character. You can use it to
1175 annotate your initialization file. All text after the comment character
1176 to the end of the line is ignored. For example,
1177
1178 <tscreen><verb>
1179 my_hdr X-Disclaimer: Why are you listening to me? &num; This is a comment
1180 </verb></tscreen>
1181
1182 Single quotes (') and double quotes (&dquot;) can be used to quote strings
1183 which contain spaces or other special characters.  The difference between
1184 the two types of quotes is similar to that of many popular shell programs,
1185 namely that a single quote is used to specify a literal string (one that is
1186 not interpreted for shell variables or quoting with a backslash &lsqb;see
1187 next paragraph&rsqb;), while double quotes indicate a string for which
1188 should be evaluated.  For example, backtics are evaluated inside of double
1189 quotes, but <bf/not/ for single quotes.
1190
1191 &bsol; quotes the next character, just as in shells such as bash and zsh.
1192 For example, if want to put quotes ``&dquot;'' inside of a string, you can use
1193 ``&bsol;'' to force the next character to be a literal instead of interpreted
1194 character.
1195 <tscreen><verb>
1196 set realname="Michael \"MuttDude\" Elkins"
1197 </verb></tscreen>
1198
1199 ``&bsol;&bsol;'' means to insert a literal ``&bsol;'' into the line.
1200 ``&bsol;n'' and ``&bsol;r'' have their usual C meanings of linefeed and
1201 carriage-return, respectively.
1202
1203 A &bsol; at the end of a line can be used to split commands over
1204 multiple lines, provided that the split points don't appear in the
1205 middle of command names.
1206
1207 Please note that, unlike the various shells, mutt-ng interprets a ``&bsol;''
1208 at the end of a line also in comments. This allows you to disable a command
1209 split over multiple lines with only one ``&num;''.
1210
1211 <tscreen><verb>
1212 # folder-hook . \
1213   set realname="Michael \"MuttDude\" Elkins"
1214 </verb></tscreen>
1215
1216 When testing your config files, beware the following caveat. The backslash
1217 at the end of the commented line extends the current line with the next line
1218 - then referred to as a ``continuation line''.  As the first line is
1219 commented with a hash (&num;) all following continuation lines are also
1220 part of a comment and therefore are ignored, too. So take care of comments
1221 when continuation lines are involved within your setup files!
1222
1223 Abstract example:
1224  
1225 <tscreen><verb>
1226 line1\
1227 line2a # line2b\
1228 line3\
1229 line4
1230 line5
1231 </verb></tscreen>
1232
1233 line1 ``continues'' until line4. however, the part after the &num; is a
1234 comment which includes line3 and line4. line5 is a new line of its own and
1235 thus is interpreted again.
1236
1237 It is also possible to substitute the output of a Unix command in an
1238 initialization file.  This is accomplished by enclosing the command in
1239 backquotes (``).  For example,
1240 <tscreen><verb>
1241 my_hdr X-Operating-System: `uname -a`
1242 </verb></tscreen>
1243 The output of the Unix command ``uname -a'' will be substituted before the
1244 line is parsed.  Note that since initialization files are line oriented, only
1245 the first line of output from the Unix command will be substituted.
1246
1247 UNIX environments can be accessed like the way it is done in shells like
1248 sh and bash: Prepend the name of the environment by a ``&dollar;''.  For
1249 example,
1250 <tscreen><verb>
1251 set record=+sent_on_$HOSTNAME
1252 </verb></tscreen>
1253
1254 The commands understood by mutt are explained in the next paragraphs.
1255 For a complete list, see the <ref id="commands" name="command reference">.
1256
1257 <!--}}}--> 
1258
1259 <sect>Defining/Using aliases<label id="alias"> <!--{{{--> 
1260 <p>
1261
1262 Usage: <tt/alias/ <em/key/ <em/address/ &lsqb; , <em/address/, ... &rsqb;
1263
1264 It's usually very cumbersome to remember or type out the address of someone
1265 you are communicating with.  Mutt-ng allows you to create ``aliases'' which map
1266 a short string to a full address.
1267
1268 <bf/Note:/ if you want to create an alias for a group (by specifying more than
1269 one address), you <bf/must/ separate the addresses with a comma (``,'').
1270
1271 To remove an alias or aliases (``*'' means all aliases):
1272
1273 <tt/unalias/ &lsqb; * | <em/key/ <em/.../ &rsqb;
1274
1275 <tscreen><verb>
1276 alias muttdude me@cs.hmc.edu (Michael Elkins)
1277 alias theguys manny, moe, jack
1278 </verb></tscreen>
1279
1280 Unlike other mailers, Mutt-ng doesn't require aliases to be defined
1281 in a special file.  The <tt/alias/ command can appear anywhere in
1282 a configuration file, as long as this file is <ref id="source"
1283 name="sourced">.  Consequently, you can have multiple alias files, or
1284 you can have all aliases defined in your muttrc.
1285
1286 On the other hand, the <ref id="create-alias" name="create-alias">
1287 function can use only one file, the one pointed to by the <ref
1288 id="alias_file" name="&dollar;alias&lowbar;file"> variable (which is
1289 <tt>&tilde;/.muttrc</tt> by default). This file is not special either,
1290 in the sense that Mutt-ng will happily append aliases to any file, but in
1291 order for the new aliases to take effect you need to explicitly <ref
1292 id="source" name="source"> this file too.
1293
1294 For example:
1295
1296 <tscreen><verb>
1297 source /usr/local/share/Mutt-ng.aliases
1298 source ~/.mail_aliases
1299 set alias_file=~/.mail_aliases
1300 </verb></tscreen>
1301
1302 To use aliases, you merely use the alias at any place in mutt where mutt
1303 prompts for addresses, such as the <em/To:/ or <em/Cc:/ prompt.  You can
1304 also enter aliases in your editor at the appropriate headers if you have the
1305 <ref id="edit_headers" name="&dollar;edit&lowbar;headers"> variable set.
1306
1307 In addition, at the various address prompts, you can use the tab character
1308 to expand a partial alias to the full alias.  If there are multiple matches,
1309 mutt will bring up a menu with the matching aliases.  In order to be
1310 presented with the full list of aliases, you must hit tab with out a partial
1311 alias, such as at the beginning of the prompt or after a comma denoting
1312 multiple addresses.
1313
1314 In the alias menu, you can select as many aliases as you want with the
1315 <em/select-entry/ key (default: RET), and use the <em/exit/ key
1316 (default: q) to return to the address prompt.
1317
1318 <!--}}}--> 
1319
1320 <sect>Changing the default key bindings<label id="bind"> <!--{{{--> 
1321 <p>
1322 Usage: <tt/bind/ <em/map/ <em/key/ <em/function/
1323
1324 This command allows you to change the default key bindings (operation
1325 invoked when pressing a key).
1326
1327 <em/map/ specifies in which menu the binding belongs.  Multiple maps may
1328 be specified by separating them with commas (no additional whitespace is
1329 allowed). The currently defined maps are:
1330
1331 <label id="maps">
1332 <descrip>
1333 <tag/generic/
1334 This is not a real menu, but is used as a fallback for all of the other
1335 menus except for the pager and editor modes.  If a key is not defined in
1336 another menu, Mutt-ng will look for a binding to use in this menu.  This allows
1337 you to bind a key to a certain function in multiple menus instead of having
1338 multiple bind statements to accomplish the same task.
1339 <tag/alias/
1340 The alias menu is the list of your personal aliases as defined in your
1341 muttrc.  It is the mapping from a short alias name to the full email
1342 address(es) of the recipient(s).
1343 <tag/attach/
1344 The attachment menu is used to access the attachments on received messages.
1345 <tag/browser/
1346 The browser is used for both browsing the local directory structure, and for
1347 listing all of your incoming mailboxes.
1348 <tag/editor/
1349 The editor is the line-based editor the user enters text data.
1350 <tag/index/
1351 The index is the list of messages contained in a mailbox.
1352 <tag/compose/
1353 The compose menu is the screen used when sending a new message.
1354 <tag/pager/
1355 The pager is the mode used to display message/attachment data, and help
1356 listings.
1357 <tag/pgp/
1358 The pgp menu is used to select the OpenPGP keys used for encrypting outgoing
1359 messages.
1360 <tag/postpone/
1361 The postpone menu is similar to the index menu, except is used when
1362 recalling a message the user was composing, but saved until later.
1363 </descrip>
1364
1365 <em/key/ is the key (or key sequence) you wish to bind.  To specify a
1366 control character, use the sequence <em/&bsol;Cx/, where <em/x/ is the
1367 letter of the control character (for example, to specify control-A use
1368 ``&bsol;Ca'').  Note that the case of <em/x/ as well as <em/&bsol;C/ is
1369 ignored, so that <em/&bsol;CA/, <em/&bsol;Ca/, <em/&bsol;cA/ and <em/&bsol;ca/ are all
1370 equivalent.  An alternative form is to specify the key as a three digit
1371 octal number prefixed with a ``&bsol;'' (for example <em/&bsol;177/ is
1372 equivalent to <em/&bsol;c?/).
1373
1374 In addition, <em/key/ may consist of:
1375
1376 <tscreen><verb>
1377 \t              tab
1378 <tab>           tab
1379 <backtab>       backtab / shift-tab
1380 \r              carriage return
1381 \n              newline
1382 \e              escape
1383 <esc>           escape
1384 <up>            up arrow
1385 <down>          down arrow
1386 <left>          left arrow
1387 <right>         right arrow
1388 <pageup>        Page Up
1389 <pagedown>      Page Down
1390 <backspace>     Backspace
1391 <delete>        Delete
1392 <insert>        Insert
1393 <enter>         Enter
1394 <return>        Return
1395 <home>          Home
1396 <end>           End
1397 <space>         Space bar
1398 <f1>            function key 1
1399 <f10>           function key 10
1400 </verb></tscreen>
1401
1402 <em/key/ does not need to be enclosed in quotes unless it contains a
1403 space (`` '').
1404
1405 <em/function/ specifies which action to take when <em/key/ is pressed.
1406 For a complete list of functions, see the <ref id="functions"
1407 name="reference">.  The special function <tt/noop/ unbinds the specified key
1408 sequence.
1409
1410 <!--}}}--> 
1411
1412 <sect>Defining aliases for character sets <label id="charset-hook"> <!--{{{--> 
1413 <p>
1414 Usage: <tt/charset-hook/ <em/alias/ <em/charset/<newline>
1415 Usage: <tt/iconv-hook/ <em/charset/ <em/local-charset/
1416
1417 The <tt/charset-hook/ command defines an alias for a character set.
1418 This is useful to properly display messages which are tagged with a
1419 character set name not known to mutt.
1420
1421 The <tt/iconv-hook/ command defines a system-specific name for a
1422 character set.  This is helpful when your systems character
1423 conversion library insists on using strange, system-specific names
1424 for character sets.
1425
1426 <!--}}}--> 
1427
1428 <sect>Setting variables based upon mailbox<label id="folder-hook"> <!--{{{--> 
1429 <p>
1430 Usage: <tt/folder-hook/ &lsqb;!&rsqb;<em/regexp/ <em/command/
1431
1432 It is often desirable to change settings based on which mailbox you are
1433 reading.  The folder-hook command provides a method by which you can execute
1434 any configuration command.  <em/regexp/ is a regular expression specifying
1435 in which mailboxes to execute <em/command/ before loading.  If a mailbox
1436 matches multiple folder-hook's, they are executed in the order given in the
1437 muttrc.
1438
1439 <bf/Note:/ if you use the ``!'' shortcut for <ref id="spoolfile"
1440 name="&dollar;spoolfile"> at the beginning of the pattern, you must place it
1441 inside of double or single quotes in order to distinguish it from the
1442 logical <em/not/ operator for the expression.
1443
1444 Note that the settings are <em/not/ restored when you leave the mailbox.
1445 For example, a command action to perform is to change the sorting method
1446 based upon the mailbox being read:
1447
1448 <tscreen><verb>
1449 folder-hook mutt set sort=threads
1450 </verb></tscreen>
1451
1452 However, the sorting method is not restored to its previous value when
1453 reading a different mailbox.  To specify a <em/default/ command, use the
1454 pattern ``.'':
1455
1456 <p>
1457 <tscreen><verb>
1458 folder-hook . set sort=date-sent
1459 </verb></tscreen>
1460
1461 <!--}}}--> 
1462
1463 <sect>Keyboard macros<label id="macro"> <!--{{{--> 
1464 <p>
1465 Usage: <tt/macro/ <em/menu/ <em/key/ <em/sequence/ &lsqb; <em/description/ &rsqb;
1466
1467 Macros are useful when you would like a single key to perform a series of
1468 actions.  When you press <em/key/ in menu <em/menu/, Mutt-ng will behave as if
1469 you had typed <em/sequence/.  So if you have a common sequence of commands
1470 you type, you can create a macro to execute those commands with a single
1471 key.
1472
1473 <em/menu/ is the <ref id="maps" name="map"> which the macro will be bound.
1474 Multiple maps may be specified by separating multiple menu arguments by
1475 commas. Whitespace may not be used in between the menu arguments and the
1476 commas separating them.
1477
1478 <em/key/ and <em/sequence/ are expanded by the same rules as the <ref
1479 id="bind" name="key bindings">.  There are some additions however.  The
1480 first is that control characters in <em/sequence/ can also be specified
1481 as <em/&circ;x/.  In order to get a caret (`&circ;'') you need to use
1482 <em/&circ;&circ;/.  Secondly, to specify a certain key such as <em/up/
1483 or to invoke a function directly, you can use the format
1484 <em/&lt;key name&gt;/ and <em/&lt;function name&gt;/.  For a listing of key
1485 names see the section on <ref id="bind" name="key bindings">.  Functions
1486 are listed in the <ref id="functions" name="function reference">.
1487
1488 The advantage with using function names directly is that the macros will
1489 work regardless of the current key bindings, so they are not dependent on
1490 the user having particular key definitions.  This makes them more robust
1491 and portable, and also facilitates defining of macros in files used by more
1492 than one user (eg. the system Muttngrc).
1493
1494 Optionally you can specify a descriptive text after <em/sequence/,
1495 which is shown in the help screens.
1496
1497 <bf/Note:/ Macro definitions (if any) listed in the help screen(s), are
1498 silently truncated at the screen width, and are not wrapped.   
1499
1500 <!--}}}--> 
1501
1502 <sect>Using color and mono video attributes<label id="color"> <!--{{{--> 
1503 <p>
1504 Usage: <tt/color/ <em/object/ <em/foreground/ <em/background/ &lsqb; <em/regexp/ &rsqb;<newline>
1505 Usage: <tt/color/ index <em/foreground/ <em/background/ <em/pattern/<newline>
1506 Usage: <tt/uncolor/ index <em/pattern/ &lsqb; <em/pattern/ ...  &rsqb;<newline>
1507
1508 If your terminal supports color, you can spice up Mutt-ng by creating your own
1509 color scheme.  To define the color of an object (type of information), you
1510 must specify both a foreground color <bf/and/ a background color (it is not
1511 possible to only specify one or the other).
1512
1513 <em/object/ can be one of:
1514
1515 <itemize>
1516 <item>attachment
1517 <item>body (match <em/regexp/ in the body of messages)
1518 <item>bold (highlighting bold patterns in the body of messages)
1519 <item>error (error messages printed by Mutt-ng)
1520 <item>header (match <em/regexp/ in the message header)
1521 <item>hdrdefault (default color of the message header in the pager)
1522 <item>index (match <em/pattern/ in the message index)
1523 <item>indicator (arrow or bar used to indicate the current item in a menu)
1524 <item>markers (the ``+'' markers at the beginning of wrapped lines in the pager)
1525 <item>message (informational messages)
1526 <item>normal
1527 <item>quoted (text matching <ref id="quote_regexp"
1528 name="&dollar;quote&lowbar;regexp"> in the body of a message)
1529 <item>quoted1, quoted2, ..., quoted<bf/N/ (higher levels of quoting)
1530 <item>search (highlighting of words in the pager)
1531 <item>signature
1532 <item>status (mode lines used to display info about the mailbox or message)
1533 <item>tilde (the ``&tilde;'' used to pad blank lines in the pager)
1534 <item>tree (thread tree drawn in the message index and attachment menu)
1535 <item>underline (highlighting underlined patterns in the body of messages)
1536 </itemize>
1537
1538 <em/foreground/ and <em/background/ can be one of the following:
1539
1540 <itemize>
1541 <item>white
1542 <item>black
1543 <item>green
1544 <item>magenta
1545 <item>blue
1546 <item>cyan
1547 <item>yellow
1548 <item>red
1549 <item>default
1550 <item>color<em/x/
1551 </itemize>
1552
1553 <em/foreground/ can optionally be prefixed with the keyword <tt/bright/ to make
1554 the foreground color boldfaced (e.g., <tt/brightred/).
1555
1556 If your terminal supports it, the special keyword <em/default/ can be
1557 used as a transparent color.  The value <em/brightdefault/ is also valid.
1558 If Mutt-ng is linked against the <em/S-Lang/ library, you also need to set
1559 the <em/COLORFGBG/ environment variable to the default colors of your
1560 terminal for this to work; for example (for Bourne-like shells):
1561
1562 <tscreen><verb>
1563 set COLORFGBG="green;black"
1564 export COLORFGBG
1565 </verb></tscreen>
1566
1567 <bf/Note:/ The <em/S-Lang/ library requires you to use the <em/lightgray/
1568 and <em/brown/ keywords instead of <em/white/ and <em/yellow/ when
1569 setting this variable.
1570
1571 <bf/Note:/ The uncolor command can be applied to the index object only.  It
1572 removes entries from the list. You <bf/must/ specify the same pattern
1573 specified in the color command for it to be removed.  The pattern ``*'' is
1574 a special token which means to clear the color index list of all entries.
1575
1576 Mutt-ng also recognizes the keywords <em/color0/, <em/color1/, &hellip;,
1577 <em/color/<bf/N-1/ (<bf/N/ being the number of colors supported
1578 by your terminal).  This is useful when you remap the colors for your
1579 display (for example by changing the color associated with <em/color2/
1580 for your xterm), since color names may then lose their normal meaning.
1581
1582 If your terminal does not support color, it is still possible change the video
1583 attributes through the use of the ``mono'' command:
1584
1585 Usage: <tt/mono/ <em/&lt;object&gt; &lt;attribute&gt;/ &lsqb; <em/regexp/ &rsqb;<newline>
1586 Usage: <tt/mono/ index <em/attribute/ <em/pattern/<newline>
1587 Usage: <tt/unmono/ index <em/pattern/ &lsqb; <em/pattern/ ...  &rsqb;<newline>
1588
1589 where <em/attribute/ is one of the following:
1590
1591 <itemize>
1592 <item>none
1593 <item>bold
1594 <item>underline
1595 <item>reverse
1596 <item>standout
1597 </itemize>
1598
1599 <!--}}}--> 
1600
1601 <sect>Ignoring (weeding) unwanted message headers<label id="ignore"> <!--{{{--> 
1602 <p>
1603 Usage: <tt/&lsqb;un&rsqb;ignore/ <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
1604
1605 Messages often have many header fields added by automatic processing systems,
1606 or which may not seem useful to display on the screen.  This command allows
1607 you to specify header fields which you don't normally want to see.
1608
1609 You do not need to specify the full header field name.  For example,
1610 ``ignore content-'' will ignore all header fields that begin with the pattern
1611 ``content-''. ``ignore *'' will ignore all headers.
1612
1613 To remove a previously added token from the list, use the ``unignore'' command.
1614 The ``unignore'' command will make Mutt-ng display headers with the given pattern.
1615 For example, if you do ``ignore x-'' it is possible to ``unignore x-mailer''.
1616
1617 ``unignore *'' will remove all tokens from the ignore list.
1618
1619 For example:
1620 <tscreen><verb>
1621 # Sven's draconian header weeding
1622 ignore *
1623 unignore from date subject to cc
1624 unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
1625 unignore posted-to:
1626 </verb></tscreen>
1627
1628 <!--}}}--> 
1629
1630 <sect>Alternative addresses<label id="alternates"> <!--{{{--> 
1631 <p>
1632 Usage: <tt/&lsqb;un&rsqb;alternates/ <em/regexp/ &lsqb; <em/regexp/ ... &rsqb;<newline>
1633
1634 With various functions, mutt will treat messages differently,
1635 depending on whether you sent them or whether you received them from
1636 someone else.  For instance, when replying to a message that you
1637 sent to a different party, mutt will automatically suggest to send
1638 the response to the original message's recipients -- responding to
1639 yourself won't make much sense in many cases.  (See <ref
1640 id="reply_to" name="&dollar;reply&lowbar;to">.)
1641
1642 Many users receive e-mail under a number of different addresses. To
1643 fully use mutt's features here, the program must be able to
1644 recognize what e-mail addresses you receive mail under. That's the
1645 purpose of the <tt/alternates/ command: It takes a list of regular
1646 expressions, each of which can identify an address under which you
1647 receive e-mail.
1648
1649 The <tt/unalternates/ command can be used to write exceptions to
1650 <tt/alternates/ patterns. If an address matches something in an
1651 <tt/alternates/ command, but you nonetheless do not think it is
1652 from you, you can list a more precise pattern under an <tt/unalternates/
1653 command.
1654
1655 To remove a regular expression from the <tt/alternates/ list, use the
1656 <tt/unalternates/ command with exactly the same <em/regexp/.
1657 Likewise, if the <em/regexp/ for a <tt/alternates/ command matches
1658 an entry on the <tt/unalternates/ list, that <tt/unalternates/
1659 entry will be removed. If the <em/regexp/ for <tt/unalternates/
1660 is ``*'', <em/all entries/ on <tt/alternates/ will be removed.
1661
1662 <!--}}}--> 
1663
1664 <sect>Format = Flowed <!--{{{--> 
1665
1666 <p>Mutt-ng contains support for so-called <tt/format=flowed/ messages.
1667 In the beginning of email, each message had a fixed line width, and
1668 it was enough for displaying them on fixed-size terminals. But times
1669 changed, and nowadays hardly anybody still uses fixed-size terminals:
1670 more people nowaydays use graphical user interfaces, with dynamically
1671 resizable windows. This led to the demand of a new email format that
1672 makes it possible for the email client to make the email look nice
1673 in a resizable window without breaking quoting levels and creating
1674 an incompatible email format that can also be displayed nicely on
1675 old fixed-size terminals.
1676
1677 <p>For introductory information on <tt/format=flowed/ messages, see
1678 <htmlurl url="http://www.joeclark.org/ffaq.html"
1679 name="&lt;http://www.joeclark.org/ffaq.html&gt;">.
1680
1681 <p>When you receive emails that are marked as <tt/format=flowed/
1682 messages, and is formatted correctly, mutt-ng will try to reformat
1683 the message to optimally fit on your terminal. If you want a fixed
1684 margin on the right side of your terminal, you can set the
1685 following:
1686
1687 <verb>
1688 set wrapmargin = 10
1689 </verb>
1690
1691 <p>The code above makes the line break 10 columns before the right
1692 side of the terminal.
1693
1694 <p>If your terminal is so wide that the lines are embarrassingly long,
1695 you can also set a maximum line length:
1696
1697 <verb>
1698 set max_line_length = 120
1699 </verb>
1700
1701 <p>The example above will give you lines not longer than 120
1702 characters.
1703
1704 <p>When you view at <tt/format=flowed/ messages, you will often see
1705 the quoting hierarchy like in the following example:
1706
1707 <verb>
1708 &gt;Bill, can you please send last month's progress report to Mr. 
1709 &gt;Morgan? We also urgently need the cost estimation for the new 
1710 &gt;production server that we want to set up before our customer's 
1711 &gt;project will go live.
1712 </verb>
1713
1714 <p>This obviously doesn't look very nice, and it makes it very
1715 hard to differentiate between text and quoting character. The
1716 solution is to configure mutt-ng to "stuff" the quoting:
1717
1718 <verb>
1719 set stuff_quoted
1720 </verb>
1721
1722 <p>This will lead to a nicer result that is easier to read:
1723
1724 <verb>
1725 &gt; Bill, can you please send last month's progress report to Mr. 
1726 &gt; Morgan? We also urgently need the cost estimation for the new 
1727 &gt; production server that we want to set up before our customer's 
1728 &gt; project will go live.
1729 </verb>
1730
1731 <p>If you want mutt-ng to send emails with <tt/format=flowed/ set, you
1732 need to explicitly set it:
1733
1734 <verb>
1735 set text_flowed
1736 </verb>
1737
1738 <p>Additionally, you have to use an editor which supports writing
1739 <tt/format=flowed/-conforming emails. For vim, this is done by
1740 adding <tt/w/ to the formatoptions (see <tt/:h formatoptions/ and
1741 <tt/:h fo-table/) when writing emails.
1742
1743 <!--}}}--> 
1744
1745 <sect>Mailing lists<label id="lists"> <!--{{{--> 
1746 <p>
1747 Usage: <tt/&lsqb;un&rsqb;lists/ <em/regexp/ &lsqb; <em/regexp/ ... &rsqb;<newline>
1748 Usage: <tt/&lsqb;un&rsqb;subscribe/ <em/regexp/ &lsqb; <em/regexp/ ... &rsqb;
1749
1750 Mutt-ng has a few nice features for <ref id="using_lists" name="handling
1751 mailing lists">.  In order to take advantage of them, you must
1752 specify which addresses belong to mailing lists, and which mailing
1753 lists you are subscribed to.  Once you have done this, the <ref
1754 id="list-reply" name="list-reply"> function will work for all known lists.
1755 Additionally, when you send a message to a subscribed list, mutt will
1756 add a Mail-Followup-To header to tell other users' mail user agents
1757 not to send copies of replies to your personal address.   Note that
1758 the Mail-Followup-To header is a non-standard extension which is not
1759 supported by all mail user agents.  Adding it is not bullet-proof against
1760 receiving personal CCs of list messages.  Also note that the generation
1761 of the Mail-Followup-To header is controlled by the <ref id="followup_to"
1762 name="&dollar;followup&lowbar;to"> configuration variable.
1763
1764 More precisely, Mutt-ng maintains lists of patterns for the addresses
1765 of known and subscribed mailing lists.  Every subscribed mailing
1766 list is known. To mark a mailing list as known, use the ``lists''
1767 command.  To mark it as subscribed, use ``subscribe''.
1768
1769 You can use regular expressions with both commands.  To mark all
1770 messages sent to a specific bug report's address on mutt's bug
1771 tracking system as list mail, for instance, you could say
1772 ``subscribe [0-9]*@bugs.guug.de''.  Often, it's sufficient to just
1773 give a portion of the list's e-mail address.
1774
1775 Specify as much of the address as you need to to remove ambiguity.  For
1776 example, if you've subscribed to the Mutt-ng mailing list, you will receive mail
1777 addressed to <em/mutt-users@mutt.org/.  So, to tell Mutt-ng that this is a
1778 mailing list, you could add ``lists mutt-users'' to your
1779 initialization file.  To tell mutt that you are subscribed to it,
1780 add ``subscribe mutt-users'' to your initialization file instead.
1781 If you also happen to get mail from someone whose address is
1782 <em/mutt-users@example.com/, you could use ``lists mutt-users@mutt&bsol;&bsol;.org'' 
1783 or ``subscribe mutt-users@mutt&bsol;&bsol;.org'' to
1784 match only mail from the actual list.
1785
1786 The ``unlists'' command is used to remove a token from the list of
1787 known and subscribed mailing-lists. Use ``unlists *'' to remove all
1788 tokens.
1789
1790 To remove a mailing list from the list of subscribed mailing lists,
1791 but keep it on the list of known mailing lists, use ``unsubscribe''.
1792
1793 <!--}}}--> 
1794
1795 <sect>Using Multiple spool mailboxes<label id="mbox-hook"> <!--{{{--> 
1796 <p>
1797 Usage: <tt/mbox-hook/ &lsqb;!&rsqb;<em/pattern/ <em/mailbox/
1798
1799 This command is used to move read messages from a specified mailbox to a
1800 different mailbox automatically when you quit or change folders.
1801 <em/pattern/ is a regular expression specifying the mailbox to treat as a
1802 ``spool'' mailbox and <em/mailbox/ specifies where mail should be saved when
1803 read.
1804
1805 Unlike some of the other <em/hook/ commands, only the <em/first/ matching
1806 pattern is used (it is not possible to save read mail in more than a single
1807 mailbox).
1808
1809 <!--}}}--> 
1810
1811 <sect>Defining mailboxes which receive mail<label id="mailboxes"> <!--{{{--> 
1812 <p>
1813 Usage: <tt/&lsqb;un&rsqb;mailboxes/ &lsqb;!&rsqb;<em/filename/ &lsqb; <em/filename/ ... &rsqb;
1814
1815 This command specifies folders which can receive mail and
1816 which will be checked for new messages.  By default, the
1817 main menu status bar displays how many of these folders have
1818 new messages.
1819 <p>
1820 When changing folders, pressing <em/space/ will cycle
1821 through folders with new mail.
1822 <p>
1823 Pressing TAB in the directory browser will bring up a menu showing the files
1824 specified by the <tt/mailboxes/ command, and indicate which contain new
1825 messages.  Mutt-ng will automatically enter this mode when invoked from the
1826 command line with the <tt/-y/ option.
1827
1828 The ``unmailboxes'' command is used to remove a token from the list
1829 of folders which receive mail. Use ``unmailboxes *'' to remove all
1830 tokens.
1831
1832 <p>
1833 <bf/Note:/ new mail is detected by comparing the last modification time to
1834 the last access time.  Utilities like <tt/biff/ or <tt/frm/ or any other
1835 program which accesses the mailbox might cause Mutt-ng to never detect new mail
1836 for that mailbox if they do not properly reset the access time.  Backup
1837 tools are another common reason for updated access times.
1838 <p>
1839
1840 <bf/Note:/ the filenames in the <tt/mailboxes/ command are resolved when
1841 the command is executed, so if these names contain <ref id="shortcuts"
1842 name="shortcut characters"> (such as ``='' and ``!''), any variable
1843 definition that affect these characters (like <ref id="folder"
1844 name="&dollar;folder"> and <ref id="spoolfile" name="&dollar;spoolfile">)
1845 should be executed before the <tt/mailboxes/ command.
1846
1847 <!--}}}--> 
1848
1849 <sect>User defined headers<label id="my_hdr"> <!--{{{--> 
1850 <p>
1851 Usage:<newline>
1852 <tt/my_hdr/ <em/string/<newline>
1853 <tt/unmy_hdr/ <em/field/ &lsqb; <em/field/ ... &rsqb;
1854
1855 The ``my&lowbar;hdr'' command allows you to create your own header
1856 fields which will be added to every message you send.
1857
1858 For example, if you would like to add an ``Organization:'' header field to
1859 all of your outgoing messages, you can put the command
1860
1861 <quote>
1862 my_hdr Organization: A Really Big Company, Anytown, USA
1863 </quote>
1864
1865 in your <tt/.muttrc/.
1866
1867 <bf/Note:/  space characters are <em/not/ allowed between the keyword and
1868 the colon (``:'').  The standard for electronic mail (RFC822) says that
1869 space is illegal there, so Mutt-ng enforces the rule.
1870
1871 If you would like to add a header field to a single message, you should
1872 either set the <ref id="edit_headers" name="edit&lowbar;headers"> variable,
1873 or use the <em/edit-headers/ function (default: ``E'') in the send-menu so
1874 that you can edit the header of your message along with the body.
1875
1876 To remove user defined header fields, use the ``unmy&lowbar;hdr''
1877 command.  You may specify an asterisk (``*'') to remove all header
1878 fields, or the fields to remove.  For example, to remove all ``To'' and
1879 ``Cc'' header fields, you could use:
1880
1881 <quote>
1882 unmy_hdr to cc
1883 </quote>
1884
1885 <!--}}}--> 
1886
1887 <sect>Defining the order of headers when viewing messages<label id="hdr_order"> <!--{{{--> 
1888 <p>
1889 Usage: <tt/hdr&lowbar;order/ <em/header1/ <em/header2/ <em/header3/
1890
1891 With this command, you can specify an order in which mutt will attempt
1892 to present headers to you when viewing messages.
1893
1894 ``unhdr_order *'' will clear all previous headers from the order list,
1895 thus removing the header order effects set by the system-wide startup
1896 file.
1897
1898 <tscreen><verb>
1899 hdr&lowbar;order From Date: From: To: Cc: Subject:
1900 </verb></tscreen>
1901
1902 <!--}}}--> 
1903
1904 <sect>Specify default save filename<label id="save-hook"> <!--{{{--> 
1905 <p>
1906 Usage: <tt/save-hook/ &lsqb;!&rsqb;<em/pattern/ <em/filename/
1907
1908 This command is used to override the default filename used when saving
1909 messages.  <em/filename/ will be used as the default filename if the message is
1910 <em/From:/ an address matching <em/regexp/ or if you are the author and the
1911 message is addressed <em/to:/ something matching <em/regexp/.
1912
1913 See <ref id="pattern_hook" name="Message Matching in Hooks"> for information on the exact format of <em/pattern/.
1914
1915 Examples:
1916
1917 <tscreen><verb>
1918 save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins
1919 save-hook aol\\.com$ +spam
1920 </verb></tscreen>
1921
1922 Also see the <ref id="fcc-save-hook" name="fcc-save-hook"> command.
1923
1924 <!--}}}--> 
1925
1926 <sect>Specify default Fcc: mailbox when composing<label id="fcc-hook"> <!--{{{--> 
1927 <p>
1928 Usage: <tt/fcc-hook/ &lsqb;!&rsqb;<em/pattern/ <em/mailbox/
1929
1930 This command is used to save outgoing mail in a mailbox other than
1931 <ref id="record" name="&dollar;record">.  Mutt-ng searches the initial list of
1932 message recipients for the first matching <em/regexp/ and uses <em/mailbox/
1933 as the default Fcc: mailbox.  If no match is found the message will be saved
1934 to <ref id="record" name="&dollar;record"> mailbox.
1935
1936 See <ref id="pattern_hook" name="Message Matching in Hooks"> for information on the exact format of <em/pattern/.
1937
1938 Example: <tt/fcc-hook &lsqb;@.&rsqb;aol&bsol;&bsol;.com&dollar; +spammers/
1939
1940 The above will save a copy of all messages going to the aol.com domain to
1941 the `+spammers' mailbox by default.  Also see the <ref id="fcc-save-hook" 
1942 name="fcc-save-hook"> command.
1943
1944 <!--}}}--> 
1945
1946 <sect>Specify default save filename and default Fcc: mailbox at once<label id="fcc-save-hook"> <!--{{{--> 
1947 <p>
1948 Usage: <tt/fcc-save-hook/ &lsqb;!&rsqb;<em/pattern/ <em/mailbox/
1949
1950 This command is a shortcut, equivalent to doing both a <ref id="fcc-hook" name="fcc-hook">
1951 and a <ref id="save-hook" name="save-hook"> with its arguments.
1952
1953 <!--}}}--> 
1954
1955 <sect>Change settings based upon message recipients<label id="send-hook"><label id="reply-hook"><label id="send2-hook"> <!--{{{--> 
1956 <p>
1957 Usage: <tt/reply-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/<newline>
1958 Usage: <tt/send-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/<newline>
1959 Usage: <tt/send2-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/
1960
1961 These commands can be used to execute arbitrary configuration commands based
1962 upon recipients of the message.  <em/pattern/ is a regular expression
1963 matching the desired address.  <em/command/ is executed when <em/regexp/
1964 matches recipients of the message.
1965
1966 <tt/reply-hook/ is matched against the message you are <em/replying/
1967 <bf/to/, instead of the message you are <em/sending/.  <tt/send-hook/ is
1968 matched against all messages, both <em/new/ and <em/replies/.  <bf/Note:/
1969 <tt/reply-hook/s are matched <bf/before/ the <tt/send-hook/, <bf/regardless/
1970 of the order specified in the users's configuration file.
1971
1972 <tt/send2-hook/ is matched every time a message is changed, either
1973 by editing it, or by using the compose menu to change its recipients
1974 or subject.  <tt/send2-hook/ is executed after <tt/send-hook/, and
1975 can, e.g., be used to set parameters such as the <ref id="sendmail"
1976 name="&dollar;sendmail"> variable depending on the message's sender
1977 address.
1978
1979 For each type of <tt/send-hook/ or <tt/reply-hook/, when multiple matches
1980 occur, commands are executed in the order they are specified in the muttrc
1981 (for that type of hook).
1982
1983 See <ref id="pattern_hook" name="Message Matching in Hooks"> for information on the exact format of <em/pattern/.
1984
1985 Example: <tt/send-hook mutt &dquot;set mime&lowbar;forward signature=''&dquot;/
1986
1987 Another typical use for this command is to change the values of the
1988 <ref id="attribution" name="&dollar;attribution">, <ref id="signature"
1989 name="&dollar;signature"> and <ref id="locale" name="&dollar;locale">
1990 variables in order to change the language of the attributions and
1991 signatures based upon the recipients.
1992
1993 <bf/Note:/ the send-hook's are only executed ONCE after getting the initial
1994 list of recipients.  Adding a recipient after replying or editing the
1995 message will NOT cause any send-hook to be executed.  Also note that
1996 my_hdr commands which modify recipient headers, or the message's
1997 subject, don't have any effect on the current message when executed
1998 from a send-hook.
1999
2000 <!--}}}--> 
2001
2002 <sect>Change settings before formatting a message<label id="message-hook"> <!--{{{--> 
2003 <p>
2004 Usage: <tt/message-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/
2005
2006 This command can be used to execute arbitrary configuration commands
2007 before viewing or formatting a message based upon information about the message.
2008 <em/command/ is executed if the <em/pattern/ matches the message to be
2009 displayed. When multiple matches occur, commands are executed in the order
2010 they are specified in the muttrc.
2011
2012 See <ref id="pattern_hook" name="Message Matching in Hooks"> for
2013 information on the exact format of <em/pattern/.
2014
2015 Example:
2016 <tscreen><verb>
2017 message-hook ~A 'set pager=builtin'
2018 message-hook '~f freshmeat-news' 'set pager="less \"+/^  subject: .*\""'
2019 </verb></tscreen>
2020
2021 <!--}}}--> 
2022
2023 <sect>Choosing the cryptographic key of the recipient<label id="crypt-hook"> <!--{{{--> 
2024 <p>
2025 Usage: <tt/crypt-hook/ <em/pattern/ <em/keyid/
2026
2027 When encrypting messages with PGP or OpenSSL, you may want to associate a certain
2028 key with a given e-mail address automatically, either because the
2029 recipient's public key can't be deduced from the destination address,
2030 or because, for some reasons, you need to override the key Mutt-ng would
2031 normally use.  The crypt-hook command provides a method by which you can
2032 specify the ID of the public key to be used when encrypting messages to
2033 a certain recipient.
2034
2035 The meaning of "key id" is to be taken broadly in this context:  You
2036 can either put a numerical key ID here, an e-mail address, or even
2037 just a real name.
2038
2039 <!--}}}--> 
2040
2041 <sect>Adding key sequences to the keyboard buffer<label id="push"> <!--{{{--> 
2042 <p>
2043 Usage: <tt/push/ <em/string/
2044
2045 This command adds the named string to the keyboard buffer. The string may
2046 contain control characters, key names and function names like the sequence
2047 string in the <ref id="macro" name="macro"> command. You may use it to
2048 automatically run a sequence of commands at startup, or when entering
2049 certain folders.
2050
2051 <!--}}}--> 
2052
2053 <sect>Executing functions<label id="exec"> <!--{{{--> 
2054 <p>
2055 Usage: <tt/exec/ <em/function/ &lsqb; <em/function/ ... &rsqb;
2056
2057 This command can be used to execute any function. Functions are
2058 listed in the <ref id="functions" name="function reference">.
2059 ``exec function'' is equivalent to ``push &lt;function&gt;''.
2060
2061 <!--}}}--> 
2062
2063 <sect>Message Scoring<label id="score-command"> <!--{{{--> 
2064
2065 <p>
2066 Usage: <tt/score/ <em/pattern/ <em/value/<newline>
2067 Usage: <tt/unscore/ <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
2068
2069 <p>
2070 In situations where you have to cope with a lot of emails, e.g.
2071 when you read many different mailing lists, and take part in
2072 discussions, it is always useful to have the important messages
2073 marked and the annoying messages or the ones that you aren't
2074 interested in deleted. For this purpose, mutt-ng features a
2075 mechanism called ``scoring''.
2076
2077 <p>
2078 When you use scoring, every message has a base score of 0. You
2079 can then use the <tt/score/ command to define patterns and a
2080 positive or negative value associated with it. When a pattern
2081 matches a message, the message's score will be raised or lowered by
2082 the amount of the value associated with the pattern.
2083
2084 <verb>
2085 score "~f nion@muttng\.org" 50
2086 score "~f @sco\.com" -100</verb>
2087
2088 <p>If the pattern matches, it is also possible to set the score
2089 value of the current message to a certain value and then stop
2090 evaluation:
2091
2092 <verb>
2093 score "~f santaclaus@northpole\.int" =666</verb>
2094
2095 <p>What is important to note is that negative score values will be
2096 rounded up to 0.
2097
2098 <p>To make scoring actually useful, the score must be applied in
2099 some way.  That's what the <em/score thresholds/ are for. Currently,
2100 there are three score thresholds:
2101
2102 <itemize>
2103
2104   <item>flag threshold: when a message has a score value equal or higher
2105   than the flag threshold, it will be flagged.
2106
2107   <item>read threshold: when a message has a score value equal or lower
2108   than the read threshold, it will be marked as read.
2109
2110   <item>delete threshold: when a message has a score value equal or
2111   lower than the delete threshold, it will be marked as deleted.
2112
2113 </itemize>
2114
2115 <p>These three thresholds can be set via the variables <ref
2116 id="score_threshold_flag"
2117 name="&dollar;score&lowbar;threshold&lowbar;flag">, <ref
2118 id="score_threshold_read"
2119 name="&dollar;score&lowbar;threshold&lowbar;read">, <ref
2120 id="score_threshold_delete"
2121 name="&dollar;score&lowbar;threshold&lowbar;delete"> and.  By
2122 default, <ref id="score_threshold_read"
2123 name="&dollar;score&lowbar;threshold&lowbar;read"> and <ref
2124 id="score_threshold_delete"
2125 name="&dollar;score&lowbar;threshold&lowbar;delete"> are set to
2126 <tt/-1/, which means that in the default threshold configuration no
2127 message will ever get marked as read or deleted.
2128
2129 <p>Scoring gets especially interesting when combined with the <tt/color/ command
2130 and the <tt>&tilde;n</tt> pattern:
2131
2132 <verb>
2133 color   black   yellow  "~n 10-"
2134 color   red     yellow  "~n 100-"</verb>
2135
2136 <p>The rules above mark all messages with a score between 10 and 99
2137 with black and yellow, and messages with a score greater or equal
2138 100 with red and yellow. This might be unusual to you if you're used
2139 to e.g. slrn's scoring mechanism, but it is more flexible, as it
2140 visually marks different scores.
2141
2142 <!--}}}--> 
2143
2144 <sect>Spam detection<label id="spam"> <!--{{{--> 
2145 <p>
2146 Usage: <tt/spam/ <em/pattern/ <em/format/<newline>
2147 Usage: <tt/nospam/ <em/pattern/
2148
2149 Mutt-ng has generalized support for external spam-scoring filters.
2150 By defining your spam patterns with the <tt/spam/ and <tt/nospam/
2151 commands, you can <em/limit/, <em/search/, and <em/sort/ your
2152 mail based on its spam attributes, as determined by the external
2153 filter. You also can display the spam attributes in your index
2154 display using the <tt/%H/ selector in the <ref id="index_format"
2155 name="&dollar;index&lowbar;format"> variable. (Tip: try <tt/%?H?[%H] ?/
2156 to display spam tags only when they are defined for a given message.)
2157
2158 Your first step is to define your external filter's spam patterns using
2159 the <tt/spam/ command. <em/pattern/ should be a regular expression
2160 that matches a header in a mail message. If any message in the mailbox
2161 matches this regular expression, it will receive a ``spam tag'' or
2162 ``spam attribute'' (unless it also matches a <tt/nospam/ pattern -- see
2163 below.) The appearance of this attribute is entirely up to you, and is
2164 governed by the <em/format/ parameter. <em/format/ can be any static
2165 text, but it also can include back-references from the <em/pattern/
2166 expression. (A regular expression ``back-reference'' refers to a
2167 sub-expression contained within parentheses.) <tt/%1/ is replaced with
2168 the first back-reference in the regex, <tt/%2/ with the second, etc.
2169
2170 If you're using multiple spam filters, a message can have more than
2171 one spam-related header. You can define <tt/spam/ patterns for each
2172 filter you use. If a message matches two or more of these patterns, and
2173 the &dollar;spam&lowbar;separator variable is set to a string, then the
2174 message's spam tag will consist of all the <em/format/ strings joined
2175 together, with the value of &dollar;spam&lowbar;separator separating
2176 them.
2177
2178 For example, suppose I use DCC, SpamAssassin, and PureMessage. I might
2179 define these spam settings:
2180 <tscreen><verb>
2181 spam "X-DCC-.*-Metrics:.*(....)=many"         "90+/DCC-%1"
2182 spam "X-Spam-Status: Yes"                     "90+/SA"
2183 spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM"
2184 set spam_separator=", "
2185 </verb></tscreen>
2186
2187 If I then received a message that DCC registered with ``many'' hits
2188 under the ``Fuz2'' checksum, and that PureMessage registered with a
2189 97% probability of being spam, that message's spam tag would read
2190 <tt>90+/DCC-Fuz2, 97/PM</tt>. (The four characters before ``=many'' in a
2191 DCC report indicate the checksum used -- in this case, ``Fuz2''.)
2192
2193 If the &dollar;spam&lowbar;separator variable is unset, then each
2194 spam pattern match supersedes the previous one. Instead of getting
2195 joined <em/format/ strings, you'll get only the last one to match.
2196
2197 The spam tag is what will be displayed in the index when you use
2198 <tt/%H/ in the <tt/&dollar;index&lowbar;format/ variable. It's also the
2199 string that the <tt/~H/ pattern-matching expression matches against for
2200 <em/search/ and <em/limit/ functions. And it's what sorting by spam
2201 attribute will use as a sort key.
2202
2203 That's a pretty complicated example, and most people's actual
2204 environments will have only one spam filter. The simpler your
2205 configuration, the more effective mutt can be, especially when it comes
2206 to sorting.
2207
2208 Generally, when you sort by spam tag, mutt will sort <em/lexically/ --
2209 that is, by ordering strings alphnumerically. However, if a spam tag
2210 begins with a number, mutt will sort numerically first, and lexically
2211 only when two numbers are equal in value. (This is like UNIX's
2212 <tt/sort -n/.) A message with no spam attributes at all -- that is, one
2213 that didn't match <em/any/ of your <tt/spam/ patterns -- is sorted at
2214 lowest priority. Numbers are sorted next, beginning with 0 and ranging
2215 upward. Finally, non-numeric strings are sorted, with ``a'' taking lower
2216 priority than ``z''. Clearly, in general, sorting by spam tags is most
2217 effective when you can coerce your filter to give you a raw number. But
2218 in case you can't, mutt can still do something useful.
2219
2220 The <tt/nospam/ command can be used to write exceptions to <tt/spam/
2221 patterns. If a header pattern matches something in a <tt/spam/ command,
2222 but you nonetheless do not want it to receive a spam tag, you can list a
2223 more precise pattern under a <tt/nospam/ command.
2224
2225 If the <em/pattern/ given to <tt/nospam/ is exactly the same as the
2226 <em/pattern/ on an existing <tt/spam/ list entry, the effect will be to
2227 remove the entry from the spam list, instead of adding an exception.
2228 Likewise, if the <em/pattern/ for a <tt/spam/ command matches an entry
2229 on the <tt/nospam/ list, that <tt/nospam/ entry will be removed. If the
2230 <em/pattern/ for <tt/nospam/ is ``*'', <em/all entries on both lists/
2231 will be removed. This might be the default action if you use <tt/spam/
2232 and <tt/nospam/ in conjunction with a <tt/folder-hook/.
2233
2234 You can have as many <tt/spam/ or <tt/nospam/ commands as you like.
2235 You can even do your own primitive spam detection within mutt -- for
2236 example, if you consider all mail from <tt/MAILER-DAEMON/ to be spam,
2237 you can use a <tt/spam/ command like this:
2238
2239 <tscreen><verb>
2240 spam "^From: .*MAILER-DAEMON"       "999"
2241 </verb></tscreen>
2242
2243 <!--}}}--> 
2244
2245 <sect>Setting variables<label id="set"> <!--{{{--> 
2246 <p>
2247 Usage: <tt/set/ &lsqb;no|inv&rsqb;<em/variable/&lsqb;=<em/value/&rsqb; &lsqb; <em/variable/ ... &rsqb;<newline>
2248 Usage: <tt/toggle/ <em/variable/ &lsqb;<em/variable/ ... &rsqb;<newline>
2249 Usage: <tt/unset/ <em/variable/ &lsqb;<em/variable/ ... &rsqb;<newline>
2250 Usage: <tt/reset/ <em/variable/ &lsqb;<em/variable/ ... &rsqb;
2251
2252 This command is used to set (and unset) <ref id="variables"
2253 name="configuration variables">.  There are four basic types of variables:
2254 boolean, number, string and quadoption.  <em/boolean/ variables can be
2255 <em/set/ (true) or <em/unset/ (false).  <em/number/ variables can be
2256 assigned a positive integer value.
2257
2258 <em/string/ variables consist of any number of printable characters.
2259 <em/strings/ must be enclosed in quotes if they contain spaces or tabs.  You
2260 may also use the ``C'' escape sequences <bf/&bsol;n/ and <bf/&bsol;t/ for
2261 newline and tab, respectively.
2262
2263 <em/quadoption/ variables are used to control whether or not to be prompted
2264 for certain actions, or to specify a default action.  A value of <em/yes/
2265 will cause the action to be carried out automatically as if you had answered
2266 yes to the question.  Similarly, a value of <em/no/ will cause the the
2267 action to be carried out as if you had answered ``no.''  A value of
2268 <em/ask-yes/ will cause a prompt with a default answer of ``yes'' and
2269 <em/ask-no/ will provide a default answer of ``no.''
2270
2271 Prefixing a variable with ``no'' will unset it.  Example: <tt/set noaskbcc/.
2272
2273 For <em/boolean/ variables, you may optionally prefix the variable name with
2274 <tt/inv/ to toggle the value (on or off).  This is useful when writing
2275 macros.  Example: <tt/set invsmart&lowbar;wrap/.
2276
2277 The <tt/toggle/ command automatically prepends the <tt/inv/ prefix to all
2278 specified variables.
2279
2280 The <tt/unset/ command automatically prepends the <tt/no/ prefix to all
2281 specified variables.
2282
2283 Using the enter-command function in the <em/index/ menu, you can query the
2284 value of a variable by prefixing the name of the variable with a question
2285 mark:
2286
2287 <tscreen><verb>
2288 set ?allow_8bit
2289 </verb></tscreen>
2290
2291 The question mark is actually only required for boolean and quadoption 
2292 variables.
2293
2294 The <tt/reset/ command resets all given variables to the compile time
2295 defaults (hopefully mentioned in this manual). If you use the command
2296 <tt/set/ and prefix the variable with ``&amp;'' this has the same
2297 behavior as the reset command.
2298
2299 With the <tt/reset/ command there exists the special variable ``all'',
2300 which allows you to reset all variables to their system defaults.
2301
2302 <!--}}}--> 
2303
2304 <sect>Reading initialization commands from another file<label id="source"> <!--{{{--> 
2305 <p>
2306 Usage: <tt/source/ <em/filename/ &lsqb; <em/filename/ ... &rsqb;
2307
2308 This command allows the inclusion of initialization commands
2309 from other files.  For example, I place all of my aliases in
2310 <tt>&tilde;/.mail&lowbar;aliases</tt> so that I can make my
2311 <tt>&tilde;/.muttrc</tt> readable and keep my aliases private.
2312
2313 If the filename begins with a tilde (``&tilde;''), it will be expanded to the
2314 path of your home directory.
2315
2316 If the filename ends with a vertical bar (|), then <em/filename/ is
2317 considered to be an executable program from which to read input (eg.
2318 <tt>source ~/bin/myscript|</tt>).
2319
2320 <!--}}}--> 
2321
2322 <sect>Removing hooks<label id="unhook"> <!--{{{--> 
2323 <p>
2324 Usage: <tt/unhook/ &lsqb; * | <em/hook-type/ &rsqb;
2325
2326 This command permits you to flush hooks you have previously defined.
2327 You can either remove all hooks by giving the ``*'' character as an
2328 argument, or you can remove all hooks of a specific type by saying
2329 something like <tt/unhook send-hook/.
2330
2331 <!--}}}--> 
2332
2333   <sect>Sharing Setups<label id="sect:sharingsetups"> <!--{{{--> 
2334
2335     <sect1>Character Sets <!--{{{--> 
2336
2337     <p>As users may run mutt-ng on different systems, the configuration
2338     must be maintained because it's likely that people want to use the
2339     setup everywhere they use mutt-ng. And mutt-ng tries to help where it
2340     can.
2341
2342     <p>To not produce conflicts with different character sets, mutt-ng
2343     allows users to specify in which character set their configuration
2344     files are encoded. Please note that while reading the configuration
2345     files, this is only respected after the corresponding declaration
2346     appears. It's advised to put the following at the very beginning of a
2347     users muttngrc:
2348
2349     <verb>
2350 set config_charset = "..."</verb>
2351
2352     <p>and replacing the dots with the actual character set. To avoid
2353     problems while maintaining the setup, vim user's may want to use
2354     modelines as show in:
2355
2356     <verb>
2357 # vim:fileencoding=...:</verb>
2358
2359     <p>while, again, replacing the dots with the appropriate name. This
2360     tells vim as which character set to read and save the file.
2361
2362     <!--}}}--> 
2363
2364     <sect1>Modularization <!--{{{--> 
2365
2366       <p>``Modularization'' means to divide the setup into several files
2367       while sorting the options or commands by topic. Especially for
2368       longer setups (e.g. with many hooks), this helps maintaining it
2369       and solving trouble.
2370
2371       <p>When using separation, setups may be, as a whole or in
2372       fractions, shared over different systems.
2373
2374     <!--}}}--> 
2375
2376     <sect1>Conditional parts <!--{{{--> 
2377
2378     <p>When using a configuration on different systems, the user may not
2379     always have influence on how mutt-ng is installed and which features
2380     it includes.
2381
2382     <p>To solve this, mutt-ng contain a feature based on the ``ifdef''
2383     patch written for mutt. Its basic syntax is:
2384
2385     <verb>
2386 ifdef &lt;item&gt; &lt;command&gt;
2387 ifndef &lt;item&gt; &lt;command&gt;</verb>
2388
2389     <p>...whereby <tt/&lt;item&gt;/ can be one of:
2390
2391     <itemize>
2392
2393       <item>a function name
2394
2395       <item>a variable name
2396
2397       <item>a menu name
2398
2399       <item>a feature name
2400
2401     </itemize>
2402
2403     <p>All available functions, variables and menus are documented
2404     elsewhere in this manual but ``features'' is specific to these two
2405     commands. To test for one, prefix one of the following keywords with
2406     <tt/feature&lowbar;/:
2407
2408     <verb>
2409 ncurses, slang, iconv, idn, dotlock, standalone, pop, nntp, imap, ssl,
2410 gnutls, sasl, sasl2, libesmtp, compressed, color, classic_pgp,
2411 classic_smime, gpgme, header_cache</verb>
2412
2413     <p>As an example, one can use the following in
2414     <tt>&tilde;/.muttngrc</tt>:
2415
2416     <verb>
2417 ifdef feature_imap 'source ~/.mutt-ng/setup-imap'
2418 ifdef feature_pop  'source ~/.mutt-ng/setup-pop'
2419 ifdef feature_nntp 'source ~/.mutt-ng/setup-nntp'</verb>
2420
2421     <p>...to only source <tt>&tilde;/.mutt-ng/setup-imap</tt> if IMAP
2422     support is built in, only source <tt>&tilde;/.mutt-ng/setup-pop</tt>
2423     if POP support is built in and only source
2424     <tt>&tilde;/.mutt-ng/setup-nntp</tt> if NNTP support is built in.
2425
2426     <p>An example for testing for variable names can be used if users
2427     use different revisions of mutt-ng whereby the older one may not
2428     have a certain variable. To test for the availability of <ref
2429     id="imap_mail_check" name="&dollar;imap&lowbar;mail&lowbar;check">,
2430     use:
2431
2432     <verb>
2433 ifdef imap_mail_check 'set imap_mail_check = 300'</verb>
2434
2435     <p>Provided for completeness is the test for menu names. To set <ref
2436     id="pager_index_lines"
2437     name="&dollar;pager&lowbar;index&lowbar;lines"> only if the pager
2438     menu is available, use:
2439
2440     <verb>
2441 ifdef pager 'set pager_index_lines = 10'</verb>
2442
2443     <p>For completeness, too, the opposite of <tt/ifdef/ is provided:
2444     <tt/ifndef/ which only executes the command if the test fails. For
2445     example, the following two examples are equivalent:
2446
2447     <verb>
2448 ifdef feature_ncurses 'source ~/.mutt-ng/setup-ncurses'
2449 ifndef feature_ncurses 'source ~/.mutt-ng/setup-slang'</verb>
2450
2451     <p>...and...
2452
2453     <verb>
2454 ifdef feature_slang 'source ~/.mutt-ng/setup-slang'
2455 ifndef feature_slang 'source ~/.mutt-ng/setup-ncurses'</verb>
2456
2457   <!--}}}--> 
2458
2459
2460   <!--}}}--> 
2461
2462 <!--}}}--> 
2463
2464 <chapt>Advanced Usage <!--{{{--> 
2465
2466 <sect>Regular Expressions<label id="regexp"> <!--{{{--> 
2467 <p>
2468 All string patterns in Mutt-ng including those in more complex
2469 <ref id="patterns" name="patterns"> must be specified
2470 using regular expressions (regexp) in the ``POSIX extended'' syntax (which
2471 is more or less the syntax used by egrep and GNU awk).  For your
2472 convenience, we have included below a brief description of this syntax.
2473
2474 The search is case sensitive if the pattern contains at least one upper
2475 case letter, and case insensitive otherwise. Note that ``&bsol;''
2476 must be quoted if used for a regular expression in an initialization
2477 command: ``&bsol;&bsol;''.
2478
2479 A regular expression is a pattern that describes a set of strings.
2480 Regular expressions are constructed analogously to arithmetic
2481 expressions, by using various operators to combine smaller expressions.
2482
2483 Note that the regular expression can be enclosed/delimited by either &dquot;
2484 or ' which is useful if the regular expression includes a white-space
2485 character.  See <ref id="muttrc-syntax" name="Syntax of Initialization Files">
2486 for more information on &dquot; and ' delimiter processing.  To match a
2487 literal &dquot; or ' you must preface it with \ (backslash).
2488
2489 The fundamental building blocks are the regular expressions that match
2490 a single character.  Most characters, including all letters and digits,
2491 are regular expressions that match themselves.  Any metacharacter with
2492 special meaning may be quoted by preceding it with a backslash.
2493
2494 The period ``.'' matches any single character.  The caret ``&circ;'' and
2495 the dollar sign ``&dollar'' are metacharacters that respectively match
2496 the empty string at the beginning and end of a line.
2497
2498 A list of characters enclosed by ``&lsqb;'' and ``&rsqb;'' matches any
2499 single character in that list; if the first character of the list
2500 is a caret ``&circ;'' then it matches any character <bf/not/ in the
2501 list.  For example, the regular expression <bf/&lsqb;0123456789&rsqb;/
2502 matches any single digit.  A range of ASCII characters may be specified
2503 by giving the first and last characters, separated by a hyphen
2504 ``-''.  Most metacharacters lose their special meaning inside
2505 lists.  To include a literal ``&rsqb;'' place it first in the list.
2506 Similarly, to include a literal ``&circ;'' place it anywhere but first.
2507 Finally, to include a literal hyphen ``-'' place it last.
2508
2509 Certain named classes of characters are predefined.  Character classes
2510 consist of ``&lsqb;:'', a keyword denoting the class, and ``:&rsqb;''.
2511 The following classes are defined by the POSIX standard:
2512
2513 <descrip>
2514 <tag/&lsqb;:alnum:&rsqb;/
2515 Alphanumeric characters.
2516 <tag/&lsqb;:alpha:&rsqb;/
2517 Alphabetic characters.
2518 <tag/&lsqb;:blank:&rsqb;/
2519 Space or tab characters.
2520 <tag/&lsqb;:cntrl:&rsqb;/
2521 Control characters.
2522 <tag/&lsqb;:digit:&rsqb;/
2523 Numeric characters.
2524 <tag/&lsqb;:graph:&rsqb;/
2525 Characters that are both printable and visible.  (A space is printable,
2526 but not visible, while an ``a'' is both.)
2527 <tag/&lsqb;:lower:&rsqb;/
2528 Lower-case alphabetic characters.
2529 <tag/&lsqb;:print:&rsqb;/
2530 Printable characters (characters that are not control characters.)
2531 <tag/&lsqb;:punct:&rsqb;/
2532 Punctuation characters (characters that are not letter, digits, control
2533 characters, or space characters).
2534 <tag/&lsqb;:space:&rsqb;/
2535 Space characters (such as space, tab and formfeed, to name a few).
2536 <tag/&lsqb;:upper:&rsqb;/
2537 Upper-case alphabetic characters.
2538 <tag/&lsqb;:xdigit:&rsqb;/
2539 Characters that are hexadecimal digits.
2540 </descrip>
2541
2542 A character class is only valid in a regular expression inside the
2543 brackets of a character list.  Note that the brackets in these
2544 class names are part of the symbolic names, and must be included
2545 in addition to the brackets delimiting the bracket list.  For
2546 example, <bf/&lsqb;&lsqb;:digit:&rsqb;&rsqb;/ is equivalent to
2547 <bf/&lsqb;0-9&rsqb;/.
2548
2549 Two additional special sequences can appear in character lists.  These
2550 apply to non-ASCII character sets, which can have single symbols (called
2551 collating elements) that are represented with more than one character,
2552 as well as several characters that are equivalent for collating or
2553 sorting purposes:
2554
2555 <descrip>
2556 <tag/Collating Symbols/
2557 A collating symbol is a multi-character collating element enclosed in
2558 ``&lsqb;.'' and ``.&rsqb;''.  For example, if ``ch'' is a collating
2559 element, then <bf/&lsqb;&lsqb;.ch.&rsqb;&rsqb;/ is a regexp that matches
2560 this collating element, while <bf/&lsqb;ch&rsqb;/ is a regexp that
2561 matches either ``c'' or ``h''.
2562 <tag/Equivalence Classes/
2563 An equivalence class is a locale-specific name for a list of
2564 characters that are equivalent. The name is enclosed in ``&lsqb;=''
2565 and ``=&rsqb;''.  For example, the name ``e'' might be used to
2566 represent all of ``&egrave;'' ``&eacute;'' and ``e''.  In this case,
2567 <bf/&lsqb;&lsqb;=e=&rsqb;&rsqb;/ is a regexp that matches any of
2568 ``&egrave;'', ``&eacute;'' and ``e''.
2569 </descrip>
2570
2571 A regular expression matching a single character may be followed by one
2572 of several repetition operators:
2573
2574 <descrip>
2575 <tag/?/
2576 The preceding item is optional and matched at most once.
2577 <tag/*/
2578 The preceding item will be matched zero or more times.
2579 <tag/+/
2580 The preceding item will be matched one or more times.
2581 <tag/&lcub;n&rcub;/
2582 The preceding item is matched exactly <em/n/ times.
2583 <tag/&lcub;n,&rcub;/
2584 The preceding item is matched <em/n/ or more times.
2585 <tag/&lcub;,m&rcub;/
2586 The preceding item is matched at most <em/m/ times.
2587 <tag/&lcub;n,m&rcub;/
2588 The preceding item is matched at least <em/n/ times, but no more than
2589 <em/m/ times.
2590 </descrip>
2591
2592 Two regular expressions may be concatenated; the resulting regular
2593 expression matches any string formed by concatenating two substrings
2594 that respectively match the concatenated subexpressions.
2595
2596 Two regular expressions may be joined by the infix operator ``|'';
2597 the resulting regular expression matches any string matching either
2598 subexpression.
2599
2600 Repetition takes precedence over concatenation, which in turn takes
2601 precedence over alternation.  A whole subexpression may be enclosed in
2602 parentheses to override these precedence rules.
2603
2604 <bf/Note:/ If you compile Mutt-ng with the GNU <em/rx/ package, the
2605 following operators may also be used in regular expressions:
2606
2607 <descrip>
2608 <tag/&bsol;&bsol;y/
2609 Matches the empty string at either the beginning or the end of a word.
2610 <tag/&bsol;&bsol;B/
2611 Matches the empty string within a word.
2612 <tag/&bsol;&bsol;&lt;/
2613 Matches the empty string at the beginning of a word.
2614 <tag/&bsol;&bsol;&gt;/
2615 Matches the empty string at the end of a word.
2616 <tag/&bsol;&bsol;w/
2617 Matches any word-constituent character (letter, digit, or underscore).
2618 <tag/&bsol;&bsol;W/
2619 Matches any character that is not word-constituent.
2620 <tag/&bsol;&bsol;`/
2621 Matches the empty string at the beginning of a buffer (string).
2622 <tag/&bsol;&bsol;'/
2623 Matches the empty string at the end of a buffer.
2624 </descrip>
2625
2626 Please note however that these operators are not defined by POSIX, so
2627 they may or may not be available in stock libraries on various systems.
2628
2629 <!--}}}--> 
2630
2631 <sect>Patterns <!--{{{--> 
2632
2633 <p>Mutt-ng's pattern language provides a simple yet effective way to
2634 set up rules to match messages, e.g. for operations like tagging and
2635 scoring. A pattern consists of one or more sub-pattern, which can be
2636 logically grouped, ORed, and negated. For a complete listing of
2637 these patterns, please refer to table <ref id="patterns"
2638 name="Patterns"> in the Reference chapter.
2639
2640 <p>It must be noted that in this table, <tt/EXPR/, <tt/USER/,
2641 <tt/ID/ and <tt/SUBJECT/ are regular expressions. For ranges, the
2642 forms <tt/&lt;[MAX]/, <tt/&gt;>[MIN]/, <tt/[MIN]-/ and <tt/-[MAX]/
2643 are also possible.
2644
2645 <sect1>Complex Patterns 
2646
2647 <p>It is possible to combine several sub-patterns to a more complex
2648 pattern. The most simple possibility is to logically AND several
2649 patterns by stringing them together:
2650
2651 <verb>
2652 ~s 'SPAM' ~U</verb>
2653
2654 <p>The pattern above matches all messages that contain ``SPAM'' in
2655 the subject and are unread.
2656
2657 <p>To logical OR patterns, simply use the <tt/|/ operator. This one
2658 especially useful when using local groups:
2659
2660 <verb>
2661 ~f ("nion@muttng\.org"|"ak@muttng\.org"|"pdmef@muttng\.org")
2662 (~b mutt-ng|~s Mutt-ng)
2663 !~x '@synflood\.at'</verb>
2664
2665 <p>The first pattern matches all messages that were sent by one of
2666 the mutt-ng maintainers, while the seconds pattern matches all
2667 messages that contain ``mutt-ng'' in the message body or ``Mutt-ng''
2668 in the subject. The third pattern matches all messages that do not
2669 contain ``@synflood\.at'' in the <tt/References:/ header, i.e.
2670 messages that are not an (indirect) reply to one of my messages. A
2671 pattern can be logicall negated using the <tt/!/ operator.
2672
2673 <sect1>Patterns and Dates 
2674
2675 <p>When using dates in patterns, the dates must be specified in a
2676 special format, i.e.  <tt>DD/MM/YYYY</tt>. If you don't specify
2677 month or year, they default to the current month or year. When using
2678 date ranges, and you specify only the minimum or the maximum, the
2679 specified date will be excluded, e.g. <tt>01/06/2005-</tt> matches
2680 against all messages <em/after/ Juni 1st, 2005.
2681
2682 <p>It is also possible to use so-called ``error margins'' when
2683 specifying date ranges.  You simply specify a date, and then the
2684 error margin. This margin needs to contain the information whether
2685 it goes ``forth'' or ``back'' in time, by using <tt/+/ and <tt/-/.
2686 Then follows a number and a unit, i.e. <tt/y/ for years, <tt/m/ for
2687 months, <tt/w/ for weeks and <tt/d/ for days. If you use the special
2688 <tt/*/ sign, it means that the error margin goes to both
2689 ``directions'' in time.
2690
2691 <verb>
2692 ~d 01/01/2005+1y
2693 ~d 18/10/2004-2w
2694 ~d 28/12/2004*1d</verb>
2695
2696 <p>The first pattern matches all dates between January 1st, 2005 and
2697 January 1st 2006.  The second pattern matches all dates between
2698 October 18th, 2004 and October 4th 2004 (2 weeks before 18/10/2004),
2699 while the third pattern matches all dates 1 day around December
2700 28th, 2004 (i.e. Dec 27th, 28th and 29th).
2701
2702 <p>Relative dates are also very important, as they make it possible
2703 to specify date ranges between a fixed number of units and the
2704 current date. How this works can be seen in the following example:
2705
2706 <verb>
2707 ~d &gt;2w # messages older than two weeks
2708 ~d &lt;3d # messages newer than 3 days
2709 ~d =1m # messages that are exactly one month old</verb>
2710
2711 <!--}}}--> 
2712
2713   <sect>Format Strings <!--{{{--> 
2714
2715     <sect1>Introduction <!--{{{--> 
2716   
2717       <p>The so called <em/Format Strings/ offer great flexibility when
2718       configuring mutt-ng. In short, they describe what items to print
2719       out how in menus and status messages.
2720
2721       <p>Basically, they work as this: for different menus and bars,
2722       there's a variable specifying the layout. For every item
2723       available, there is a so called <em/expando/.
2724       
2725       <p>For example, when running mutt-ng on different machines or
2726       different versions for testing purposes, it may be interesting to
2727       have the following information always printed on screen when one
2728       is in the index:
2729
2730       <itemize>
2731
2732         <item>the current hostname
2733
2734         <item>the current mutt-ng version number
2735
2736       </itemize>
2737
2738       <p>The setting for the status bar of the index is controlled via the
2739       <ref id="status_format" name="&dollar;status&lowbar;format">
2740       variable. For the hostname and version string, there's an expando
2741       for <tt>&dollar;status&lowbar;format</tt>: <tt/%h/ expands to the
2742       hostname and <tt/%v/ to the version string. When just configuring:
2743
2744       <verb>
2745 set status_format = "%v on %h: ..."</verb>
2746
2747       <p>mutt-ng will replace the sequence <tt/%v/ with the version string
2748       and <tt/%h/ with the host's name. When you are, for example, running
2749       mutt-ng version <tt/1.5.9i/ on host <tt/mailhost/, you'll see the
2750       following when you're in the index:
2751
2752       <verb>
2753 Mutt-ng 1.5.9i on mailhost: ...</verb>
2754
2755       <p>In the index, there're more useful information one could want to 
2756       see:
2757
2758       <itemize>
2759
2760         <item>which mailbox is open
2761
2762         <item>how man new, flagged or postponed messages
2763
2764         <item>...
2765
2766       </itemize>
2767
2768       <p>To include the mailbox' name is as easy as:
2769
2770       <verb>
2771 set status_format = "%v on %h: %B: ...</verb>
2772
2773       <p>When the currently opened mailbox is <tt/Inbox/, this will be expanded
2774       to:
2775
2776       <verb>
2777 Mutt-ng 1.5.9i on mailhost: Inbox: ...</verb>
2778       
2779       <p>For the number of certain types of messages, one more feature of the format
2780       strings is extremely useful. If there aren't messages of a certain type, it
2781       may not be desired to print just that there aren't any but instead only
2782       print something if there are any.
2783
2784     <!--}}}--> 
2785
2786     <sect1>Conditional Expansion <!--{{{--> 
2787       
2788       <p>To only print the number of messages if there are new messages in
2789       the current mailbox, further extend
2790       <tt/&dollar;status&lowbar;format/ to:
2791
2792       <verb>
2793 set status_format = "%v on %h: %B %?n?%n new? ...</verb>
2794
2795       <p>This feature is called <em/nonzero-printing/ and works as this:
2796       some expandos may be optionally printed nonzero, i.e.  a portion
2797       of the format string is only evaluated if the value of the expando
2798       is different from zero. The basic syntax is:
2799
2800       <verb>
2801 %?<item>?<string if nonzero>?</verb>
2802
2803       <p>which tells mutt-ng to only look at <tt>&lt;string if
2804       nonzero&gt;</tt> if the value of the <tt>%&lt;item%gt;</tt>
2805       expando is different from zero. In our example, we used <tt/n/ as
2806       the expando to check for and <tt/%n new/ as the optional nonzero
2807       string.
2808
2809       <p>But this is not all: this feature only offers one alternative: 
2810       ``print something if not zero.'' Mutt-ng does, as you might guess, 
2811       also provide a logically complete version: ``if zero, print 
2812       something and else print something else.'' This is achieved by the 
2813       following syntax for those expandos which may be printed nonzero:
2814
2815       <verb>
2816 %?<item>?<string if nonzero>&<string if zero>?</verb>
2817
2818       <p>Using this we can make mutt-ng to do the following:
2819
2820       <itemize>
2821
2822         <item> make it print ``<em/n/ new messages'' whereby <em/n/ is the
2823           count but only if there new ones
2824
2825         <item> and make it print ``no new messages'' if there aren't any
2826
2827       </itemize>
2828
2829       <p>The corresponding configuration is:
2830
2831       <verb>
2832 set status_format = "%v on %h: %B: %?n?%n new messages&amp;no new messages? ...</verb>
2833
2834       <p>This doubles the use of the ``new messages'' string because it'll get
2835       always printed. Thus, it can be shortened to:
2836
2837       <verb>
2838 set status_format = "%v on %h: %B: %?n?%n&amp;no? new messages ...</verb>
2839
2840       <p>As you might see from this rather simple example, one can create
2841       very complex but fancy status messages. Please see the reference
2842       chapter for expandos and those which may be printed nonzero.
2843
2844     <!--}}}--> 
2845  
2846     <sect1>Modifications and Padding <!--{{{--> 
2847
2848       <p>Besides the information given so far, there're even more features of
2849       format strings:
2850
2851       <itemize>
2852
2853         <item>When specifying <tt>%&lowbar;&lt;item&gt;</tt> instead of
2854           just <tt>%&lt;item&gt;</tt>, mutt-ng will convert all
2855           characters in the expansion of <tt>&lt;item&gt;</tt> to
2856           lowercase.
2857
2858         <item>When specifying <tt>%:&lt;item&gt;</tt> instead of just
2859           <tt>%&lt;item&gt;</tt>, mutt-ng will convert all dots in the
2860           expansion of <tt>&lt;item&gt;</tt> to underscores
2861           (<tt>&lowbar;</tt>).
2862
2863       </itemize>
2864     
2865       <p>Also, there's a feature called <em/Padding/ supplied by the
2866       following two expandos: <tt/%|X/ and <tt/%&gt;X/.
2867
2868       <descrip>
2869
2870         <tag><tt>%|X</tt></tag> When this occurs, mutt-ng will fill the
2871           rest of the line with the character <tt/X/. In our example,
2872           filling the rest of the line with dashes is done by setting:
2873
2874           <verb>
2875 set status_format = "%v on %h: %B: %?n?%n&amp;no? new messages %|-"</verb>
2876
2877         <tag><tt>%&gt;X</tt></tag> Since the previous expando stops at
2878           the end of line, there must be a way to fill the gap between
2879           two items via the <tt>%&gt;X</tt> expando: it puts as many
2880           characters <tt>X</tt> in between two items so that the rest of
2881           the line will be right-justified. For example, to not put the
2882           version string and hostname of our example on the left but on
2883           the right and fill the gap with spaces, one might use (note
2884           the space after <tt>%&gt;</tt>):
2885
2886           <verb>
2887 set status_format = "%B: %?n?%n&amp;no? new messages %> (%v on %h)"</verb>
2888
2889       </descrip>
2890
2891     <!--}}}--> 
2892  
2893   <!--}}}--> 
2894  
2895 <sect>Using Tags <!--{{{--> 
2896 <p>
2897
2898 Sometimes it is desirable to perform an operation on a group of
2899 messages all at once rather than one at a time.  An example might be
2900 to save messages to a mailing list to a separate folder, or to
2901 delete all messages with a given subject.  To tag all messages
2902 matching a pattern, use the tag-pattern function, which is bound to
2903 ``shift-T'' by default.  Or you can select individual messages by
2904 hand using the ``tag-message'' function, which is bound to ``t'' by
2905 default.  See <ref id="patterns" name="patterns"> for Mutt-ng's pattern
2906 matching syntax.
2907
2908 Once you have tagged the desired messages, you can use the
2909 ``tag-prefix'' operator, which is the ``;'' (semicolon) key by default.
2910 When the ``tag-prefix'' operator is used, the <bf/next/ operation will
2911 be applied to all tagged messages if that operation can be used in that
2912 manner.  If the <ref id="auto_tag" name="&dollar;auto&lowbar;tag">
2913 variable is set, the next operation applies to the tagged messages
2914 automatically, without requiring the ``tag-prefix''.
2915
2916 In <ref id="macro" name="macros"> or <ref id="push" name="push"> commands,
2917 you can use the ``tag-prefix-cond'' operator.  If there are no tagged
2918 messages, mutt will "eat" the rest of the macro to abort it's execution.
2919 Mutt-ng will stop "eating" the macro when it encounters the ``end-cond''
2920 operator;  after this operator the rest of the macro will be executed as
2921 normal.
2922
2923 <!--}}}--> 
2924
2925 <sect>Using Hooks<label id="hooks"> <!--{{{--> 
2926 <p>
2927 A <em/hook/ is a concept borrowed from the EMACS editor which allows you to
2928 execute arbitrary commands before performing some operation.  For example,
2929 you may wish to tailor your configuration based upon which mailbox you are
2930 reading, or to whom you are sending mail.  In the Mutt-ng world, a <em/hook/
2931 consists of a <ref id="regexp" name="regular expression"> or
2932 <ref id="patterns" name="pattern"> along with a
2933 configuration option/command.  See
2934 <itemize>
2935 <item><ref id="folder-hook" name="folder-hook">
2936 <item><ref id="send-hook" name="send-hook">
2937 <item><ref id="message-hook" name="message-hook">
2938 <item><ref id="save-hook" name="save-hook">
2939 <item><ref id="mbox-hook" name="mbox-hook">
2940 <item><ref id="fcc-hook" name="fcc-hook">
2941 <item><ref id="fcc-save-hook" name="fcc-save-hook">
2942 </itemize>
2943 for specific details on each type of <em/hook/ available.
2944
2945 <bf/Note:/ if a hook changes configuration settings, these changes remain
2946 effective until the end of the current mutt session. As this is generally
2947 not desired, a default hook needs to be added before all other hooks to
2948 restore configuration defaults. Here is an example with send-hook and the
2949 my_hdr directive:
2950
2951 <tscreen><verb>
2952 send-hook . 'unmy_hdr From:'
2953 send-hook ~C'^b@b\.b$' my_hdr from: c@c.c
2954 </verb></tscreen>
2955
2956 <sect1>Message Matching in Hooks<label id="pattern_hook">
2957 <p>
2958 Hooks that act upon messages (<tt/send-hook, save-hook, fcc-hook,
2959 message-hook/) are evaluated in a slightly different manner.  For the other
2960 types of hooks, a <ref id="regexp" name="regular expression"> is
2961 sufficient.  But in dealing with messages a finer grain of control is
2962 needed for matching since for different purposes you want to match
2963 different criteria.
2964
2965 Mutt-ng allows the use of the <ref id="patterns" name="search pattern">
2966 language for matching messages in hook commands.  This works in
2967 exactly the same way as it would when <em/limiting/ or
2968 <em/searching/ the mailbox, except that you are restricted to those
2969 operators which match information mutt extracts from the header of
2970 the message (i.e.  from, to, cc, date, subject, etc.).
2971
2972 For example, if you wanted to set your return address based upon sending
2973 mail to a specific address, you could do something like:
2974 <tscreen><verb>
2975 send-hook '~t ^me@cs\.hmc\.edu$' 'my_hdr From: Mutt-ng User <user@host>'
2976 </verb></tscreen>
2977 which would execute the given command when sending mail to
2978 <em/me@cs.hmc.edu/.
2979
2980 However, it is not required that you write the pattern to match using the
2981 full searching language.  You can still specify a simple <em/regular
2982 expression/ like the other hooks, in which case Mutt-ng will translate your
2983 pattern into the full language, using the translation specified by the 
2984 <ref id="default_hook" name="&dollar;default&lowbar;hook"> variable.  The
2985 pattern is translated at the time the hook is declared, so the value of 
2986 <ref id="default_hook" name="&dollar;default&lowbar;hook"> that is in effect
2987 at that time will be used.
2988
2989 <!--}}}--> 
2990
2991 <sect>Using the sidebar<label id="sidebar"> <!--{{{--> 
2992 <p>
2993 The sidebar, a feature specific to Mutt-ng, allows you to use a mailbox listing 
2994 which looks very similar to the ones you probably know from GUI mail clients.
2995 The sidebar lists all specified mailboxes, shows the number in each
2996 and highlights the ones with new email
2997 Use the following configuration commands:
2998 <tscreen><verb>
2999 set sidebar_visible="yes"
3000 set sidebar_width=25
3001 </verb></tscreen>
3002
3003 If you want to specify the mailboxes you can do so with:
3004 <tscreen><verb>
3005 set mbox='=INBOX'
3006 mailboxes INBOX \
3007           MBOX1 \
3008           MBOX2 \
3009           ...
3010 </verb></tscreen>
3011
3012 You can also specify the colors for mailboxes with new mails by using:
3013 <tscreen><verb>
3014 color sidebar_new red black
3015 color sidebar white black
3016 </verb></tscreen>
3017
3018 The available functions are:
3019 <tscreen><verb>
3020 sidebar-scroll-up      Scrolls the mailbox list up 1 page
3021 sidebar-scroll-down    Scrolls the mailbox list down 1 page
3022 sidebar-next           Highlights the next mailbox
3023 sidebar-next-new       Highlights the next mailbox with new mail
3024 sidebar-previous       Highlights the previous mailbox
3025 sidebar-open           Opens the currently highlighted mailbox
3026 </verb></tscreen>
3027
3028 Reasonable key bindings look e.g. like this:
3029 <tscreen><verb>
3030 bind index \Cp sidebar-prev
3031 bind index \Cn sidebar-next
3032 bind index \Cb sidebar-open
3033 bind pager \Cp sidebar-prev
3034 bind pager \Cn sidebar-next
3035 bind pager \Cb sidebar-open
3036
3037 macro index B ':toggle sidebar_visible^M'
3038 macro pager B ':toggle sidebar_visible^M'
3039 </verb></tscreen>
3040
3041 You can then go up and down by pressing Ctrl-P and Ctrl-N, and 
3042 switch on and off the sidebar simply by pressing 'B'.
3043
3044 <!--}}}--> 
3045
3046 <sect>External Address Queries<label id="query"> <!--{{{--> 
3047 <p>
3048 Mutt-ng supports connecting to external directory databases such as LDAP,
3049 ph/qi, bbdb, or NIS through a wrapper script which connects to mutt
3050 using a simple interface.  Using the <ref id="query_command"
3051 name="&dollar;query&lowbar;command"> variable, you specify the wrapper
3052 command to use.  For example:
3053
3054 <tscreen><verb>
3055 set query_command = "mutt_ldap_query.pl '%s'"
3056 </verb></tscreen>
3057
3058 The wrapper script should accept the query on the command-line.  It
3059 should return a one line message, then each matching response on a
3060 single line, each line containing a tab separated address then name then
3061 some other optional information.  On error, or if there are no matching
3062 addresses, return a non-zero exit code and a one line error message.
3063
3064 An example multiple response output:
3065 <tscreen><verb>
3066 Searching database ... 20 entries ... 3 matching:
3067 me@cs.hmc.edu           Michael Elkins  mutt dude
3068 blong@fiction.net       Brandon Long    mutt and more
3069 roessler@guug.de        Thomas Roessler mutt pgp
3070 </verb></tscreen>
3071
3072 There are two mechanisms for accessing the query function of mutt.  One
3073 is to do a query from the index menu using the query function (default: Q).
3074 This will prompt for a query, then bring up the query menu which will
3075 list the matching responses.  From the query menu, you can select
3076 addresses to create aliases, or to mail.  You can tag multiple addresses
3077 to mail, start a new query, or have a new query appended to the current
3078 responses.
3079
3080 The other mechanism for accessing the query function is for address
3081 completion, similar to the alias completion.  In any prompt for address
3082 entry, you can use the complete-query function (default: ^T) to run a
3083 query based on the current address you have typed.  Like aliases, mutt
3084 will look for what you have typed back to the last space or comma.  If
3085 there is a single response for that query, mutt will expand the address
3086 in place.  If there are multiple responses, mutt will activate the query
3087 menu.  At the query menu, you can select one or more addresses to be
3088 added to the prompt.
3089
3090 <!--}}}--> 
3091
3092 <sect>Mailbox Formats <!--{{{--> 
3093 <p>
3094 Mutt-ng supports reading and writing of four different mailbox formats:
3095 mbox, MMDF, MH and Maildir.  The mailbox type is autodetected, so there
3096 is no need to use a flag for different mailbox types.  When creating new
3097 mailboxes, Mutt-ng uses the default specified with the <ref id="mbox_type"
3098 name="&dollar;mbox&lowbar;type"> variable.
3099
3100 <bf/mbox/.  This is the most widely used mailbox format for UNIX.  All
3101 messages are stored in a single file.  Each message has a line of the form:
3102
3103 <tscreen><verb>
3104 From me@cs.hmc.edu Fri, 11 Apr 1997 11:44:56 PST
3105 </verb></tscreen>
3106
3107 to denote the start of a new message (this is often referred to as the
3108 ``From&lowbar;'' line).
3109
3110 <bf/MMDF/.  This is a variant of the <em/mbox/ format.  Each message is
3111 surrounded by lines containing ``^A^A^A^A'' (four control-A's).
3112
3113 <bf/MH/. A radical departure from <em/mbox/ and <em/MMDF/, a mailbox
3114 consists of a directory and each message is stored in a separate file.
3115 The filename indicates the message number (however, this is may not
3116 correspond to the message number Mutt-ng displays). Deleted messages are
3117 renamed with a comma (,) prepended to the filename. <bf/Note:/ Mutt
3118 detects this type of mailbox by looking for either <tt/.mh&lowbar;sequences/
3119 or <tt/.xmhcache/ (needed to distinguish normal directories from MH
3120 mailboxes).
3121
3122 <bf/Maildir/.  The newest of the mailbox formats, used by the Qmail MTA (a
3123 replacement for sendmail).  Similar to <em/MH/, except that it adds three
3124 subdirectories of the mailbox: <em/tmp/, <em/new/ and <em/cur/.  Filenames
3125 for the messages are chosen in such a way they are unique, even when two
3126 programs are writing the mailbox over NFS, which means that no file locking
3127 is needed.
3128
3129 <!--}}}--> 
3130
3131 <sect>Mailbox Shortcuts<label id="shortcuts"> <!--{{{--> 
3132 <p>
3133 There are a number of built in shortcuts which refer to specific mailboxes.
3134 These shortcuts can be used anywhere you are prompted for a file or mailbox
3135 path.
3136
3137 <itemize>
3138 <item>! -- refers to your <ref id="spoolfile" name="&dollar;spoolfile"> (incoming) mailbox
3139 <item>&gt; -- refers to your <ref id="mbox" name="&dollar;mbox"> file
3140 <item>&lt; -- refers to your <ref id="record" name="&dollar;record"> file
3141 <item>^ -- refers to the current mailbox
3142 <item>- or !! -- refers to the file you've last visited
3143 <item>&tilde; -- refers to your home directory
3144 <item>= or + -- refers to your <ref id="folder" name="&dollar;folder"> directory
3145 <item>@<em/alias/ -- refers to the <ref id="save-hook" 
3146 name="default save folder"> as determined by the address of the alias
3147 </itemize>
3148
3149 <!--}}}--> 
3150
3151 <sect>Handling Mailing Lists<label id="using_lists"> <!--{{{--> 
3152 <p>
3153
3154 Mutt-ng has a few configuration options that make dealing with large
3155 amounts of mail easier.  The first thing you must do is to let Mutt
3156 know what addresses you consider to be mailing lists (technically
3157 this does not have to be a mailing list, but that is what it is most
3158 often used for), and what lists you are subscribed to.  This is
3159 accomplished through the use of the <ref id="lists"
3160 name="lists and subscribe"> commands in your muttrc.
3161
3162 Now that Mutt-ng knows what your mailing lists are, it can do several
3163 things, the first of which is the ability to show the name of a list
3164 through which you received a message (i.e., of a subscribed list) in
3165 the <em/index/ menu display.  This is useful to distinguish between
3166 personal and list mail in the same mailbox.  In the <ref id="index_format"
3167 name="&dollar;index&lowbar;format"> variable, the escape ``&percnt;L''
3168 will return the string ``To &lt;list&gt;'' when ``list'' appears in the
3169 ``To'' field, and ``Cc &lt;list&gt;'' when it appears in the ``Cc''
3170 field (otherwise it returns the name of the author).
3171
3172 Often times the ``To'' and ``Cc'' fields in mailing list messages
3173 tend to get quite large. Most people do not bother to remove the
3174 author of the message they are reply to from the list, resulting in
3175 two or more copies being sent to that person.  The ``list-reply''
3176 function, which by default is bound to ``L'' in the <em/index/ menu
3177 and <em/pager/, helps reduce the clutter by only replying to the
3178 known mailing list addresses instead of all recipients (except as
3179 specified by <tt/Mail-Followup-To/, see below).
3180
3181 Mutt-ng also supports the <tt/Mail-Followup-To/ header.  When you send
3182 a message to a list of recipients which includes one or several
3183 subscribed mailing lists, and if the <ref id="followup_to"
3184 name="&dollar;followup&lowbar;to"> option is set, mutt will generate
3185 a Mail-Followup-To header which contains all the recipients to whom
3186 you send this message, but not your address. This indicates that
3187 group-replies or list-replies (also known as ``followups'') to this
3188 message should only be sent to the original recipients of the
3189 message, and not separately to you - you'll receive your copy through
3190 one of the mailing lists you are subscribed to.
3191
3192 Conversely, when group-replying or list-replying to a message which
3193 has a <tt/Mail-Followup-To/ header, mutt will respect this header if
3194 the <ref id="honor_followup_to"
3195 name="&dollar;honor&lowbar;followup&lowbar;to"> configuration
3196 variable is set.  Using list-reply will in this case also make sure
3197 that the reply goes to the mailing list, even if it's not specified
3198 in the list of recipients in the <tt/Mail-Followup-To/.
3199
3200 Note that, when header editing is enabled, you can create a
3201 <tt/Mail-Followup-To/ header manually.  Mutt-ng will only auto-generate
3202 this header if it doesn't exist when you send the message.
3203
3204
3205 The other method some mailing list admins use is to generate a
3206 ``Reply-To'' field which points back to the mailing list address rather
3207 than the author of the message.  This can create problems when trying
3208 to reply directly to the author in private, since most mail clients
3209 will automatically reply to the address given in the ``Reply-To''
3210 field.  Mutt-ng uses the <ref id="reply_to" name="&dollar;reply&lowbar;to">
3211 variable to help decide which address to use.  If set to <em/ask-yes/ or
3212 <em/ask-no/, you will be
3213 prompted as to whether or not you would like to use the address given in
3214 the ``Reply-To'' field, or reply directly to the address given in the
3215 ``From'' field.  When set to <em/yes/, the ``Reply-To'' field will be used when
3216 present.
3217
3218 The ``X-Label:'' header field can be used to further identify mailing
3219 lists or list subject matter (or just to annotate messages
3220 individually).  The <ref id="index_format"
3221 name="&dollar;index&lowbar;format"> variable's ``&percnt;y'' and
3222 ``&percnt;Y'' escapes can be used to expand ``X-Label:'' fields in the
3223 index, and Mutt-ng's pattern-matcher can match regular expressions to
3224 ``X-Label:'' fields with the ``~y'' selector.  ``X-Label:'' is not a
3225 standard message header field, but it can easily be inserted by procmail
3226 and other mail filtering agents.
3227
3228 Lastly, Mutt-ng has the ability to <ref id="sort" name="sort"> the mailbox into
3229 <ref id="threads" name="threads">.  A thread is a group of messages which all relate to the same
3230 subject.  This is usually organized into a tree-like structure where a
3231 message and all of its replies are represented graphically.  If you've ever
3232 used a threaded news client, this is the same concept.  It makes dealing
3233 with large volume mailing lists easier because you can easily delete
3234 uninteresting threads and quickly find topics of value.
3235
3236 <!--}}}--> 
3237
3238 <sect>Editing threads <!--{{{--> 
3239 <p>
3240 Mutt-ng has the ability to dynamically restructure threads that are broken
3241 either by misconfigured software or bad behavior from some
3242 correspondents. This allows to clean your mailboxes formats) from these
3243 annoyances which make it hard to follow a discussion.
3244
3245 <sect1>Linking threads
3246 <p>
3247
3248 Some mailers tend to "forget" to correctly set the "In-Reply-To:" and
3249 "References:" headers when replying to a message. This results in broken
3250 discussions because Mutt-ng has not enough information to guess the correct
3251 threading.
3252 You can fix this by tagging the reply, then moving to the parent message
3253 and using the ``link-threads'' function (bound to & by default). The
3254 reply will then be connected to this "parent" message.
3255
3256 You can also connect multiple children at once, tagging them and using the
3257 tag-prefix command (';') or the auto_tag option.
3258
3259 <sect1>Breaking threads
3260 <p>
3261
3262 On mailing lists, some people are in the bad habit of starting a new
3263 discussion by hitting "reply" to any message from the list and changing
3264 the subject to a totally unrelated one.
3265 You can fix such threads by using the ``break-thread'' function (bound
3266 by default to #), which will turn the subthread starting from the
3267 current message into a whole different thread.
3268
3269 <!--}}}--> 
3270
3271 <sect>Delivery Status Notification (DSN) Support <!--{{{--> 
3272 <p>
3273
3274 RFC1894 defines a set of MIME content types for relaying information
3275 about the status of electronic mail messages.  These can be thought of as
3276 ``return receipts.'' Berkeley sendmail 8.8.x currently has some command
3277 line options in which the mail client can make requests as to what type
3278 of status messages should be returned.
3279
3280 To support this, there are two variables. <ref id="dsn_notify"
3281 name="&dollar;dsn&lowbar;notify"> is used to request receipts for
3282 different results (such as failed message, message delivered, etc.).
3283 <ref id="dsn_return" name="&dollar;dsn&lowbar;return"> requests how much
3284 of your message should be returned with the receipt (headers or full
3285 message).  Refer to the man page on sendmail for more details on DSN.
3286
3287 <!--}}}--> 
3288
3289 <sect>POP3 Support (OPTIONAL) <!--{{{--> 
3290 <p>
3291
3292 If Mutt-ng was compiled with POP3 support (by running the <em/configure/
3293 script with the <em/--enable-pop/ flag), it has the ability to work
3294 with mailboxes located on a remote POP3 server and fetch mail for local
3295 browsing.
3296
3297 You can access the remote POP3 mailbox by selecting the folder
3298 <tt>pop://popserver/</tt>.
3299
3300 You can select an alternative port by specifying it with the server, i.e.:
3301 <tt>pop://popserver:port/</tt>.
3302
3303 You can also specify different username for each folder, i.e.:
3304 <tt>pop://username@popserver[:port]/</tt>.
3305
3306 Polling for new mail is more expensive over POP3 than locally. For this
3307 reason the frequency at which Mutt-ng will check for mail remotely can be
3308 controlled by the
3309 <ref id="pop_mail_check" name="&dollar;pop&lowbar;mail&lowbar;check">
3310 variable, which defaults to every 60 seconds.
3311
3312 If Mutt-ng was compiled with SSL support (by running the <em/configure/
3313 script with the <em/--with-ssl/ flag), connections to POP3 servers
3314 can be encrypted. This naturally requires that the server supports
3315 SSL encrypted connections. To access a folder with POP3/SSL, you should
3316 use pops: prefix, ie:
3317 <tt>pops://[username@]popserver[:port]/</tt>.
3318
3319 Another way to access your POP3 mail is the <em/fetch-mail/ function
3320 (default: G).  It allows to connect to <ref id="pop_host"
3321 name="pop&lowbar;host">, fetch all your new mail and place it in the
3322 local <ref id="spoolfile" name="spoolfile">.  After this
3323 point, Mutt-ng runs exactly as if the mail had always been local.
3324
3325 <bf/Note:/ If you only need to fetch all messages to local mailbox
3326 you should consider using a specialized program, such as <htmlurl
3327 url="http://www.ccil.org/~esr/fetchmail" name="fetchmail">
3328
3329 <!--}}}--> 
3330
3331 <sect>IMAP Support (OPTIONAL) <!--{{{--> 
3332 <p>
3333
3334 If Mutt-ng was compiled with IMAP support (by running the <em/configure/
3335 script with the <em/--enable-imap/ flag), it has the ability to work
3336 with folders located on a remote IMAP server.
3337
3338 You can access the remote inbox by selecting the folder
3339 <tt>imap://imapserver/INBOX</tt>, where <tt/imapserver/ is the name of the
3340 IMAP server and <tt/INBOX/ is the special name for your spool mailbox on
3341 the IMAP server. If you want to access another mail folder at the IMAP
3342 server, you should use <tt>imap://imapserver/path/to/folder</tt> where
3343 <tt>path/to/folder</tt> is the path of the folder you want to access.
3344
3345 You can select an alternative port by specifying it with the server, i.e.:
3346 <tt>imap://imapserver:port/INBOX</tt>.
3347
3348 You can also specify different username for each folder, i.e.:
3349 <tt>imap://username@imapserver[:port]/INBOX</tt>.
3350
3351 If Mutt-ng was compiled with SSL support (by running the <em/configure/
3352 script with the <em/--with-ssl/ flag), connections to IMAP servers
3353 can be encrypted. This naturally requires that the server supports
3354 SSL encrypted connections. To access a folder with IMAP/SSL, you should
3355 use <tt>imaps://[username@]imapserver[:port]/path/to/folder</tt> as your 
3356 folder path.
3357
3358 Pine-compatible notation is also supported, i.e.
3359 <tt>{[username@]imapserver[:port][/ssl]}path/to/folder</tt>
3360
3361 Note that not all servers use / as the hierarchy separator.  Mutt-ng should
3362 correctly notice which separator is being used by the server and convert
3363 paths accordingly.
3364
3365 When browsing folders on an IMAP server, you can toggle whether to look
3366 at only the folders you are subscribed to, or all folders with the
3367 <em/toggle-subscribed/ command.  See also the 
3368 <ref id="imap_list_subscribed"
3369 name="&dollar;imap&lowbar;list&lowbar;subscribed"> variable.
3370
3371 Polling for new mail on an IMAP server can cause noticeable delays. So, you'll
3372 want to carefully tune the
3373 <ref id="imap_mail_check" name="&dollar;imap&lowbar;mail&lowbar;check">
3374 and
3375 <ref id="timeout" name="&dollar;timeout">
3376 variables.
3377
3378 Note that if you are using mbox as the mail store on UW servers prior to
3379 v12.250, the server has been reported to disconnect a client if another client
3380 selects the same folder.
3381
3382 <sect1>The Folder Browser
3383 <p>
3384
3385 As of version 1.2, mutt supports browsing mailboxes on an IMAP
3386 server. This is mostly the same as the local file browser, with the
3387 following differences:
3388 <itemize>
3389 <item>Instead of file permissions, mutt displays the string "IMAP",
3390   possibly followed by the symbol "+", indicating
3391   that the entry contains both messages and subfolders. On
3392   Cyrus-like servers folders will often contain both messages and
3393   subfolders. 
3394 <item>For the case where an entry can contain both messages and
3395   subfolders, the selection key (bound to <tt>enter</tt> by default)
3396   will choose to descend into the subfolder view. If you wish to view
3397   the messages in that folder, you must use <tt>view-file</tt> instead
3398   (bound to <tt>space</tt> by default).
3399 <item>You can create, delete and rename mailboxes with the
3400   <tt>create-mailbox</tt>, <tt>delete-mailbox</tt>, and
3401   <tt>rename-mailbox</tt> commands (default bindings: <tt>C</tt>,
3402   <tt>d</tt> and <tt>r</tt>, respectively). You may also
3403   <tt>subscribe</tt> and <tt>unsubscribe</tt> to mailboxes (normally
3404   these are bound to <tt>s</tt> and <tt>u</tt>, respectively).
3405 </itemize>
3406
3407 <sect1>Authentication
3408 <p>
3409
3410 Mutt-ng supports four authentication methods with IMAP servers: SASL,
3411 GSSAPI, CRAM-MD5, and LOGIN (there is a patch by Grant Edwards to add
3412 NTLM authentication for you poor exchange users out there, but it has
3413 yet to be integrated into the main tree). There is also support for
3414 the pseudo-protocol ANONYMOUS, which allows you to log in to a public
3415 IMAP server without having an account. To use ANONYMOUS, simply make
3416 your username blank or "anonymous".
3417 <p>
3418 SASL is a special super-authenticator, which selects among several protocols
3419 (including GSSAPI, CRAM-MD5, ANONYMOUS, and DIGEST-MD5) the most secure
3420 method available on your host and the server. Using some of these methods
3421 (including DIGEST-MD5 and possibly GSSAPI), your entire session will be
3422 encrypted and invisible to those teeming network snoops. It is the best
3423 option if you have it. To use it, you must have the Cyrus SASL library
3424 installed on your system and compile mutt with the <em/--with-sasl/ flag.
3425 <p>
3426 Mutt-ng will try whichever methods are compiled in and available on the server,
3427 in the following order: SASL, ANONYMOUS, GSSAPI, CRAM-MD5, LOGIN.
3428
3429 There are a few variables which control authentication: 
3430 <itemize>
3431 <item><ref id="imap_user" name="&dollar;imap&lowbar;user"> - controls
3432   the username under which you request authentication on the IMAP server,
3433   for all authenticators. This is overridden by an explicit username in
3434   the mailbox path (i.e. by using a mailbox name of the form
3435   <tt/{user@host}/).
3436 <item><ref id="imap_pass" name="&dollar;imap&lowbar;pass"> - a
3437   password which you may preset, used by all authentication methods where
3438   a password is needed.
3439 <item><ref id="imap_authenticators"
3440   name="&dollar;imap&lowbar;authenticators"> - a colon-delimited list of IMAP
3441   authentication methods to try, in the order you wish to try them. If
3442   specified, this overrides mutt's default (attempt everything, in the order
3443   listed above).
3444 </itemize>
3445
3446 <!--}}}--> 
3447
3448 <sect>NNTP Support (OPTIONAL)<label id="reading_news"> <!--{{{--> 
3449
3450 <p>If compiled with ``--enable-nntp'' option, Mutt-ng can read news from
3451 a newsserver via NNTP.  You can open a newsgroup with the
3452 ``change-newsgroup'' function from the index/pager which is by default
3453 bound to <tt/i/.
3454
3455 <p>The Default newsserver can be obtained from the
3456 <tt/&dollar;NNTPSERVER/ environment variable. Like other news readers,
3457 info about subscribed newsgroups is saved in a file as specified by the
3458 <ref id="nntp_newsrc" name="&dollar;nntp&lowbar;newsrc"> variable.
3459 Article headers are cached and can be loaded from a file when a
3460 newsgroup is entered instead loading from newsserver; currently, this
3461 caching mechanism still is different from the header caching for
3462 maildir/IMAP.
3463
3464 <sect1>Again: Scoring <!--{{{--> 
3465
3466   <p>Especially for Usenet, people often ask for advanced filtering
3467   and scoring functionality. Of course, mutt-ng has scoring and
3468   allows a killfile, too. How to use a killfile has been discussed
3469   in <ref id="score-command" name="Message scoring">.
3470
3471   <p>What has not been discusses in detail is mutt-ng's built-in
3472   realname filter. For may newsreaders including those for
3473   ``advanced users'' like <em/slrn/ or <em/tin/, there are frequent
3474   request for such functionality. The solutions offered often are
3475   complicated regular expressions.
3476
3477   <p>In mutt-ng this is as easy as
3478
3479   <verb>
3480 score ~* =42
3481   </verb>
3482
3483   <p>This tells mutt-ng to apply a score of 42 to all messages whose
3484   sender specified a valid realname and a valid email address. Using
3485
3486   <verb>
3487 score !~* =42
3488   </verb>
3489
3490   <p>on the contrary applies a score of 42 to all messages <em/not/
3491   matching those criteria which are very strict:
3492
3493   <itemize>
3494
3495     <item>Email addresses must be valid according to RFC 2822, see
3496     <htmlurl url="ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt"
3497     name="&lt;ftp://ftp.rfc-editor.org/in-notes/rfc2822.txt&gt;">
3498
3499     <item>the name must consist of at least 2 fields whereby a field
3500     must not end in a dot. This means that ``Joe User'' and ``Joe A.
3501     User'' are valid while ``J. User'' and ``J. A. User'' aren't.
3502
3503     <item>it's assumed that users are interested in reading their
3504     own mail and mail from people who they have defined an alias for
3505     so that those 2 groups of messages are excluded from the strict
3506     rules.
3507
3508   </itemize>
3509
3510   <!--}}}--> 
3511
3512 <!--}}}--> 
3513
3514 <sect>Managing multiple IMAP/POP/NNTP accounts (OPTIONAL)<label id="account-hook"> <!--{{{--> 
3515 <p>
3516
3517 If you happen to have accounts on multiple IMAP and/or POP servers,
3518 you may find managing all the authentication settings inconvenient and
3519 error-prone.  The account-hook command may help. This hook works like
3520 folder-hook but is invoked whenever you access a remote mailbox
3521 (including inside the folder browser), not just when you open the
3522 mailbox.
3523 <p>
3524 Some examples:
3525
3526 <tscreen><verb>
3527 account-hook . 'unset imap_user; unset imap_pass; unset tunnel'
3528 account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo'
3529 account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'
3530 </verb></tscreen>
3531
3532 <!--}}}--> 
3533
3534 <sect>Start a WWW Browser on URLs (EXTERNAL)<label id="urlview"> <!--{{{--> 
3535 <p>
3536 If a message contains URLs (<em/unified resource locator/ = address in the
3537 WWW space like <em>http://www.mutt.org/</em>), it is efficient to get
3538 a menu with all the URLs and start a WWW browser on one of them.  This
3539 functionality is provided by the external urlview program which can be
3540 retrieved at <htmlurl url="ftp://ftp.mutt.org/mutt/contrib/"
3541 name="ftp://ftp.mutt.org/mutt/contrib/"> and the configuration commands:
3542 <tscreen><verb>
3543 macro index \cb |urlview\n
3544 macro pager \cb |urlview\n
3545 </verb></tscreen>
3546
3547 <!--}}}--> 
3548
3549 <sect>Compressed folders Support (OPTIONAL) <!--{{{--> 
3550 <p>
3551
3552 If Mutt-ng was compiled with compressed folders support (by running the
3553 <em/configure/ script with the <em/--enable-compressed/ flag), Mutt
3554 can open folders stored in an arbitrary format, provided that the user
3555 has a script to convert from/to this format to one of the accepted.
3556
3557 The most common use is to open compressed archived folders e.g. with
3558 gzip.
3559
3560 In addition, the user can provide a script that gets a folder in an
3561 accepted format and appends its context to the folder in the
3562 user-defined format, which may be faster than converting the entire
3563 folder to the accepted format, appending to it and converting back to
3564 the user-defined format.
3565
3566 There are three hooks defined (<ref id="open-hook" name="open-hook">,
3567 <ref id="close-hook" name="close-hook"> and <ref id="append-hook"
3568 name="append-hook">) which define commands to uncompress and compress
3569 a folder and to append messages to an existing compressed folder 
3570 respectively.
3571
3572 For example:
3573
3574 <tscreen><verb>
3575 open-hook \\.gz$ "gzip -cd %f > %t" 
3576 close-hook \\.gz$ "gzip -c %t > %f"
3577 append-hook \\.gz$ "gzip -c %t >> %f" 
3578 </verb></tscreen>
3579
3580 You do not have to specify all of the commands. If you omit <ref
3581 id="append-hook" name="append-hook">, the folder will be open and
3582 closed again each time you will add to it. If you omit <ref
3583 id="close-hook" name="close-hook"> (or give empty command) , the
3584 folder will be open in the  mode. If you specify <ref
3585 id="append-hook" name="append-hook"> though you'll be able to append
3586 to the folder.
3587
3588 Note that Mutt-ng will only try to use hooks if the file is not in one of
3589 the accepted formats. In particular, if the file is empty, mutt
3590 supposes it is not compressed. This is important because it allows the
3591 use of programs that do not have well defined extensions. Just use
3592 &dquot;.&dquot; as a regexp. But this may be surprising if your
3593 compressing script produces empty files. In this situation, unset <ref
3594 id="save_empty" name="&dollar;save&lowbar;empty">, so that the compressed file
3595 will be removed if you delete all of the messages.
3596
3597 <sect1>Open a compressed mailbox for reading<label id="open-hook">
3598 <p>
3599 Usage: <tt/open-hook/ <em/regexp/ &dquot;<em/command/&dquot;
3600
3601 The <em/command/ is the command that can be used for opening the
3602 folders whose names match <em/regexp/.
3603
3604 The <em/command/ string is the printf-like format string, and it
3605 should accept two parameters: &percnt;f, which is replaced with the
3606 (compressed) folder name, and &percnt;t which is replaced with the
3607 name of the temporary folder to which to write.
3608
3609 &percnt;f and &percnt;t can be repeated any number of times in the
3610 command string, and all of the entries are replaced with the
3611 appropriate folder name. In addition, &percnt;&percnt; is replaced by
3612 &percnt;, as in printf, and any other &percnt;anything is left as is.
3613
3614 The <em/command/ should <bf/not/ remove the original compressed file.
3615 The <em/command/ should return non-zero exit status if it fails, so
3616 mutt knows something's wrong.
3617
3618 Example:
3619
3620 <tscreen><verb>
3621 open-hook \\.gz$ "gzip -cd %f > %t" 
3622 </verb></tscreen>
3623
3624 If the <em/command/ is empty, this operation is disabled for this file
3625 type.
3626
3627 <sect1>Write a compressed mailbox<label id="close-hook">
3628 <p>
3629 Usage: <tt/close-hook/ <em/regexp/ &dquot;<em/command/&dquot;
3630
3631 This is used to close the folder that was open with the <ref id="open-hook" 
3632 name="open-hook"> command after some changes were made to it.
3633
3634 The <em/command/ string is the command that can be used for closing the
3635 folders whose names match <em/regexp/. It has the same format as in 
3636 the <ref id="open-hook" name="open-hook"> command. Temporary folder
3637 in this case is the folder previously produced by the <<ref id="open-hook"
3638 name="open-hook"> command.
3639
3640 The <em/command/ should <bf/not/ remove the decompressed file. The
3641 <em/command/ should return non-zero exit status if it fails, so mutt
3642 knows something's wrong.
3643
3644 Example:
3645
3646 <tscreen><verb>
3647 close-hook \\.gz$ "gzip -c %t > %f"
3648 </verb></tscreen>
3649
3650 If the <em/command/ is empty, this operation is disabled for this file
3651 type, and the file can only be open in the readonly mode.
3652
3653 <ref id="close-hook" name ="close-hook"> is not called when you exit
3654 from the folder if the folder was not changed.
3655
3656 <sect1>Append a message to a compressed mailbox<label id="append-hook">
3657 <p>
3658 Usage: <tt/append-hook/ <em/regexp/ &dquot;<em/command/&dquot;
3659
3660 This command is used for saving to an existing compressed folder.
3661 The <em/command/ is the command that can be used for appending to the
3662 folders whose names match <em/regexp/. It has the same format as in 
3663  the <ref id="open-hook" name="open-hook"> command.
3664 The temporary folder in this case contains the messages that are being
3665 appended. 
3666
3667 The <em/command/ should <bf/not/ remove the decompressed file. The
3668 <em/command/ should return non-zero exit status if it fails, so mutt
3669 knows something's wrong.
3670
3671 Example:
3672
3673 <tscreen><verb>
3674 append-hook \\.gz$ "gzip -c %t >> %f" 
3675 </verb></tscreen>
3676
3677 When <ref id="append-hook" name="append-hook"> is used, the folder is
3678 not opened, which saves time, but this means that we can not find out
3679 what the folder type is. Thus the default (<ref id="mbox_type"
3680 name="&dollar;mbox&lowbar;type">) type is always supposed (i.e.
3681 this is the format used for the temporary folder).
3682
3683 If the file does not exist when you save to it, <ref id="close-hook"
3684 name="close-hook"> is called, and not <ref id="append-hook"
3685 name="append-hook">. <ref id="append-hook" name="append-hook"> is only
3686 for appending to existing folders.
3687
3688 If the <em/command/ is empty, this operation is disabled for this file
3689 type. In this case, the folder will be open and closed again (using
3690 <ref id="open-hook" name="open-hook"> and <ref id="close-hook" 
3691 name="close-hook">respectively) each time you will add to it.
3692
3693 <sect1>Encrypted folders
3694 <p>
3695 The compressed folders support can also be used to handle encrypted
3696 folders. If you want to encrypt a folder with PGP, you may want to use
3697 the following hooks:
3698
3699 <tscreen><verb>
3700 open-hook  \\.pgp$ "pgp -f < %f > %t"
3701 close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
3702 </verb></tscreen>
3703
3704 Please note, that PGP does not support appending to an encrypted
3705 folder, so there is no append-hook defined.
3706
3707 <bf/Note:/ the folder is temporary stored decrypted in the /tmp
3708 directory, where it can be read by your system administrator. So think
3709 about the security aspects of this.
3710
3711 <!--}}}--> 
3712
3713 <!--}}}--> 
3714
3715 <chapt>Mutt-ng's MIME Support <!--{{{--> 
3716 <p>
3717 Quite a bit of effort has been made to make Mutt-ng the premier text-mode
3718 MIME MUA.  Every effort has been made to provide the functionality that
3719 the discerning MIME user requires, and the conformance to the standards
3720 wherever possible.  When configuring Mutt-ng for MIME, there are two extra
3721 types of configuration files which Mutt-ng uses.  One is the
3722 <tt/mime.types/ file, which contains the mapping of file extensions to 
3723 IANA MIME types.  The other is the <tt/mailcap/ file, which specifies
3724 the external commands to use for handling specific MIME types.
3725
3726 <sect>Using MIME in Mutt <!--{{{--> 
3727 <p>
3728 There are three areas/menus in Mutt-ng which deal with MIME, they are the
3729 pager (while viewing a message), the attachment menu and the compose
3730 menu.
3731
3732 <sect1>Viewing MIME messages in the pager
3733 <p>
3734 When you select a message from the index and view it in the pager, Mutt
3735 decodes the message to a text representation.  Mutt-ng internally supports
3736 a number of MIME types, including <tt>text/plain, text/enriched,
3737 message/rfc822, and message/news</tt>.  In addition, the export
3738 controlled version of Mutt-ng recognizes a variety of PGP MIME types,
3739 including PGP/MIME and application/pgp.
3740
3741 Mutt-ng will denote attachments with a couple lines describing them.
3742 These lines are of the form:
3743 <tscreen><verb>
3744 [-- Attachment #1: Description --]
3745 [-- Type: text/plain, Encoding: 7bit, Size: 10000 --]
3746 </verb></tscreen>
3747 Where the <tt/Description/ is the description or filename given for the
3748 attachment, and the <tt/Encoding/ is one of
3749 <tt>7bit/8bit/quoted-printable/base64/binary</tt>.
3750
3751 If Mutt-ng cannot deal with a MIME type, it will display a message like:
3752 <tscreen><verb>
3753 [-- image/gif is unsupported (use 'v' to view this part) --]
3754 </verb></tscreen>
3755
3756 <sect1>The Attachment Menu<label id="attach_menu">
3757 <p>
3758 The default binding for <tt/view-attachments/ is `v', which displays the
3759 attachment menu for a message.  The attachment menu displays a list of
3760 the attachments in a message.  From the attachment menu, you can save,
3761 print, pipe, delete, and view attachments.  You can apply these
3762 operations to a group of attachments at once, by tagging the attachments
3763 and by using the ``tag-prefix'' operator.  You can also reply to the
3764 current message from this menu, and only the current attachment (or the
3765 attachments tagged) will be quoted in your reply.  You can view
3766 attachments as text, or view them using the mailcap viewer definition.
3767
3768 Finally, you can apply the usual message-related functions (like 
3769 <ref id="resend-message" name="resend-message">, and the reply
3770 and forward functions) to attachments of type <tt>message/rfc822</tt>.
3771
3772 See the help on the attachment menu for more information.
3773
3774 <sect1>The Compose Menu<label id="compose_menu">
3775 <p>
3776 The compose menu is the menu you see before you send a message.  It
3777 allows you to edit the recipient list, the subject, and other aspects
3778 of your message.  It also contains a list of the attachments of your
3779 message, including the main body.  From this menu, you can print, copy,
3780 filter, pipe, edit, compose, review, and rename an attachment or a
3781 list of tagged attachments.  You can also modifying the attachment
3782 information, notably the type, encoding and description.
3783
3784 Attachments appear as follows:
3785 <verb>
3786 -   1 [text/plain, 7bit, 1K]             /tmp/mutt-euler-8082-0 <no description>
3787     2 [applica/x-gunzip, base64, 422K]   ~/src/mutt-0.85.tar.gz <no description>
3788 </verb>
3789
3790 The '-' denotes that Mutt-ng will delete the file after sending (or
3791 postponing, or canceling) the message.  It can be toggled with the
3792 <tt/toggle-unlink/ command (default: u).  The next field is the MIME
3793 content-type, and can be changed with the <tt/edit-type/ command
3794 (default: ^T).  The next field is the encoding for the attachment,
3795 which allows a binary message to be encoded for transmission on 7bit
3796 links.  It can be changed with the <tt/edit-encoding/ command
3797 (default: ^E).  The next field is the size of the attachment,
3798 rounded to kilobytes or megabytes.  The next field is the filename,
3799 which can be changed with the <tt/rename-file/ command (default: R).
3800 The final field is the description of the attachment, and can be
3801 changed with the <tt/edit-description/ command (default: d).
3802
3803 <!--}}}--> 
3804
3805 <sect>MIME Type configuration with <tt/mime.types/ <!--{{{--> 
3806 <p>
3807 When you add an attachment to your mail message, Mutt-ng searches your
3808 personal mime.types file at <tt>&dollar;{HOME}/.mime.types</tt>, and then
3809 the system mime.types file at <tt>/usr/local/share/mutt/mime.types</tt> or
3810 <tt>/etc/mime.types</tt>
3811
3812 The mime.types file consist of lines containing a MIME type and a space
3813 separated list of extensions.  For example:
3814 <tscreen><verb>
3815 application/postscript          ps eps
3816 application/pgp                 pgp
3817 audio/x-aiff                    aif aifc aiff
3818 </verb></tscreen>
3819 A sample <tt/mime.types/ file comes with the Mutt-ng distribution, and
3820 should contain most of the MIME types you are likely to use.  
3821
3822 If Mutt-ng can not determine the mime type by the extension of the file you
3823 attach, it will look at the file.  If the file is free of binary
3824 information, Mutt-ng will assume that the file is plain text, and mark it
3825 as <tt>text/plain</tt>.  If the file contains binary information, then Mutt-ng will
3826 mark it as <tt>application/octet-stream</tt>.  You can change the MIME
3827 type that Mutt-ng assigns to an attachment by using the <tt/edit-type/
3828 command from the compose menu (default: ^T). The MIME type is actually a
3829 major mime type followed by the sub-type, separated by a '/'. 6 major
3830 types: application, text, image, video, audio, and model have been approved
3831 after various internet discussions. Mutt-ng recognises all of these if the 
3832 appropriate entry is found in the mime.types file. It also recognises other
3833 major mime types, such as the chemical type that is widely used in the 
3834 molecular modelling community to pass molecular data in various forms to 
3835 various molecular viewers. Non-recognised mime types should only be used 
3836 if the recipient of the message is likely to be expecting such attachments.
3837
3838 <!--}}}--> 
3839
3840 <sect>MIME Viewer configuration with <tt/mailcap/ <!--{{{--> 
3841 <p>
3842 Mutt-ng supports RFC 1524 MIME Configuration, in particular the Unix
3843 specific format specified in Appendix A of RFC 1524.  This file format
3844 is commonly referred to as the mailcap format.  Many MIME compliant
3845 programs utilize the mailcap format, allowing you to specify handling
3846 for all MIME types in one place for all programs.  Programs known to
3847 use this format include Netscape, XMosaic, lynx and metamail.
3848
3849 In order to handle various MIME types that Mutt-ng can not handle
3850 internally, Mutt-ng parses a series of external configuration files to
3851 find an external handler.  The default search string for these files
3852 is a colon delimited list set to
3853 <tscreen><verb>
3854 ${HOME}/.mailcap:/usr/local/share/mutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap
3855 </verb></tscreen>
3856 where <tt/&dollar;HOME/ is your home directory.
3857
3858 In particular, the metamail distribution will install a mailcap file,
3859 usually as <tt>/usr/local/etc/mailcap</tt>, which contains some baseline
3860 entries.
3861
3862 <sect1>The Basics of the mailcap file
3863 <p>
3864 A mailcap file consists of a series of lines which are comments, blank,
3865 or definitions.
3866
3867 A comment line consists of a &num; character followed by anything you want.
3868
3869 A blank line is blank.
3870
3871 A definition line consists of a content type, a view command, and any
3872 number of optional fields.  Each field of a definition line is divided
3873 by a semicolon ';' character.
3874
3875 The content type is specified in the MIME standard type/subtype method.
3876 For example,
3877 <tt>text/plain, text/html, image/gif, </tt>
3878 etc.  In addition, the mailcap format includes two formats for
3879 wildcards, one using the special '*' subtype, the other is the implicit
3880 wild, where you only include the major type.  For example, <tt>image/*</tt>, or
3881 <tt>video,</tt> will match all image types and video types,
3882 respectively.
3883
3884 The view command is a Unix command for viewing the type specified. There
3885 are two different types of commands supported. The default is to send
3886 the body of the MIME message to the command on stdin. You can change
3887 this behavior by using &percnt;s as a parameter to your view command.
3888 This will cause Mutt-ng to save the body of the MIME message to a temporary
3889 file, and then call the view command with the &percnt;s replaced by
3890 the name of the temporary file. In both cases, Mutt-ng will turn over the
3891 terminal to the view program until the program quits, at which time Mutt
3892 will remove the temporary file if it exists.
3893
3894 So, in the simplest form, you can send a text/plain message to the
3895 external pager more on stdin:
3896 <tscreen><verb>
3897 text/plain; more
3898 </verb></tscreen>
3899 Or, you could send the message as a file:
3900 <tscreen><verb>
3901 text/plain; more %s
3902 </verb></tscreen>
3903 Perhaps you would like to use lynx to interactively view a text/html 
3904 message:
3905 <tscreen><verb>
3906 text/html; lynx %s
3907 </verb></tscreen>
3908 In this case, lynx does not support viewing a file from stdin, so you
3909 must use the &percnt;s syntax.
3910 <bf/Note:/ <em>Some older versions of lynx contain a bug where they
3911 will check the mailcap file for a viewer for text/html.  They will find
3912 the line which calls lynx, and run it.  This causes lynx to continuously
3913 spawn itself to view the object.</em>
3914
3915 On the other hand, maybe you don't want to use lynx interactively, you
3916 just want to have it convert the text/html to text/plain, then you can
3917 use:
3918 <tscreen><verb>
3919 text/html; lynx -dump %s | more
3920 </verb></tscreen>
3921
3922 Perhaps you wish to use lynx to view text/html files, and a pager on
3923 all other text formats, then you would use the following:
3924 <tscreen><verb>
3925 text/html; lynx %s
3926 text/*; more
3927 </verb></tscreen>
3928 This is the simplest form of a mailcap file.
3929
3930 <sect1>Secure use of mailcap
3931 <p>
3932 The interpretation of shell meta-characters embedded in MIME parameters
3933 can lead to security problems in general.  Mutt-ng tries to quote parameters
3934 in expansion of %s syntaxes properly, and avoids risky characters by
3935 substituting them, see the <ref id="mailcap_sanitize"
3936 name="mailcap&lowbar;sanitize"> variable.
3937
3938 Although mutt's procedures to invoke programs with mailcap seem to be
3939 safe, there are other applications parsing mailcap, maybe taking less care
3940 of it.  Therefore you should pay attention to the following rules:
3941
3942 <em/Keep the %-expandos away from shell quoting./
3943 Don't quote them with single or double quotes.  Mutt-ng does this for
3944 you, the right way, as should any other program which interprets
3945 mailcap.  Don't put them into backtick expansions.  Be highly careful
3946 with eval statements, and avoid them if possible at all.  Trying to fix
3947 broken behaviour with quotes introduces new leaks - there is no
3948 alternative to correct quoting in the first place.
3949
3950 If you have to use the %-expandos' values in context where you need
3951 quoting or backtick expansions, put that value into a shell variable
3952 and reference the shell variable where necessary, as in the following
3953 example (using <tt/&dollar;charset/ inside the backtick expansion is safe,
3954 since it is not itself subject to any further expansion):
3955
3956 <tscreen><verb>
3957 text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \
3958         && test "`echo $charset | tr '[A-Z]' '[a-z]'`" != iso-8859-1
3959 </verb></tscreen>
3960
3961 <sect1>Advanced mailcap Usage
3962 <p>
3963
3964 <sect2>Optional Fields
3965 <p>
3966 In addition to the required content-type and view command fields, you
3967 can add semi-colon ';' separated fields to set flags and other options.
3968 Mutt-ng recognizes the following optional fields:
3969 <descrip>
3970 <tag/copiousoutput/
3971 This flag tells Mutt-ng that the command passes possibly large amounts of
3972 text on stdout.  This causes Mutt-ng to invoke a pager (either the internal
3973 pager or the external pager defined by the pager variable) on the output
3974 of the view command.  Without this flag, Mutt-ng assumes that the command
3975 is interactive.  One could use this to replace the pipe to <tt>more</tt>
3976 in the <tt>lynx -dump</tt> example in the Basic section:
3977 <tscreen><verb>
3978 text/html; lynx -dump %s ; copiousoutput
3979 </verb></tscreen>
3980 This will cause lynx to format the text/html output as text/plain
3981 and Mutt-ng will use your standard pager to display the results.
3982 <tag/needsterminal/
3983 Mutt-ng uses this flag when viewing attachments with <ref id="auto_view"
3984 name="autoview">, in order to decide whether it should honor the setting
3985 of the <ref id="wait_key" name="&dollar;wait&lowbar;key"> variable or
3986 not.  When an attachment is viewed using an interactive program, and the
3987 corresponding mailcap entry has a <em/needsterminal/ flag, Mutt-ng will use
3988 <ref id="wait_key" name="&dollar;wait&lowbar;key"> and the exit status
3989 of the program to decide if it will ask you to press a key after the
3990 external program has exited.  In all other situations it will not prompt
3991 you for a key.
3992 <tag>compose=&lt;command&gt;</tag>
3993 This flag specifies the command to use to create a new attachment of a
3994 specific MIME type.  Mutt-ng supports this from the compose menu.
3995 <tag>composetyped=&lt;command&gt;</tag>
3996 This flag specifies the command to use to create a new attachment of a
3997 specific MIME type.  This command differs from the compose command in
3998 that mutt will expect standard MIME headers on the data.  This can be
3999 used to specify parameters, filename, description, etc. for a new
4000 attachment.   Mutt-ng supports this from the compose menu.
4001 <tag>print=&lt;command&gt;</tag>
4002 This flag specifies the command to use to print a specific MIME type.
4003 Mutt-ng supports this from the attachment and compose menus.
4004 <tag>edit=&lt;command&gt;</tag>
4005 This flag specifies the command to use to edit a specific MIME type.  
4006 Mutt-ng supports this from the compose menu, and also uses it to compose
4007 new attachments.  Mutt-ng will default to the defined editor for text
4008 attachments.
4009 <tag>nametemplate=&lt;template&gt;</tag>
4010 This field specifies the format for the file denoted by &percnt;s in the
4011 command fields.  Certain programs will require a certain file extension,
4012 for instance, to correctly view a file.  For instance, lynx will only
4013 interpret a file as <tt>text/html</tt> if the file ends in <tt/.html/.
4014 So, you would specify lynx as a <tt>text/html</tt> viewer with a line in
4015 the mailcap file like:
4016 <tscreen><verb>
4017 text/html; lynx %s; nametemplate=%s.html
4018 </verb></tscreen>
4019 <tag>test=&lt;command&gt;</tag>
4020 This field specifies a command to run to test whether this mailcap
4021 entry should be used.  The command is defined with the command expansion
4022 rules defined in the next section.  If the command returns 0, then the
4023 test passed, and Mutt-ng uses this entry.  If the command returns non-zero,
4024 then the test failed, and Mutt-ng continues searching for the right entry.
4025 <bf/Note:/ <em>the content-type must match before Mutt-ng performs the test.</em>
4026 For example:
4027 <tscreen><verb>
4028 text/html; netscape -remote 'openURL(%s)' ; test=RunningX
4029 text/html; lynx %s
4030 </verb></tscreen>
4031 In this example, Mutt-ng will run the program RunningX which will return 0
4032 if the X Window manager is running, and non-zero if it isn't.  If
4033 RunningX returns 0, then Mutt-ng will call netscape to display the
4034 text/html object.  If RunningX doesn't return 0, then Mutt-ng will go on
4035 to the next entry and use lynx to display the text/html object.
4036 </descrip>
4037
4038 <sect2>Search Order
4039 <p>
4040 When searching for an entry in the mailcap file, Mutt-ng will search for
4041 the most useful entry for its purpose.  For instance, if you are
4042 attempting to print an <tt>image/gif</tt>, and you have the following
4043 entries in your mailcap file, Mutt-ng will search for an entry with the
4044 print command:
4045 <tscreen><verb>
4046 image/*;        xv %s
4047 image/gif;      ; print= anytopnm %s | pnmtops | lpr; \
4048                 nametemplate=%s.gif
4049 </verb></tscreen>
4050 Mutt-ng will skip the <tt>image/*</tt> entry and use the <tt>image/gif</tt>
4051 entry with the print command.
4052
4053 In addition, you can use this with <ref id="auto_view" name="Autoview"> 
4054 to denote two commands for viewing an attachment, one to be viewed
4055 automatically, the other to be viewed interactively from the attachment
4056 menu.  In addition, you can then use the test feature to determine which
4057 viewer to use interactively depending on your environment.
4058 <tscreen><verb>
4059 text/html;      netscape -remote 'openURL(%s)' ; test=RunningX
4060 text/html;      lynx %s; nametemplate=%s.html
4061 text/html;      lynx -dump %s; nametemplate=%s.html; copiousoutput
4062 </verb></tscreen>
4063 For <ref id="auto_view" name="Autoview">, Mutt-ng will choose the third
4064 entry because of the copiousoutput tag.  For interactive viewing, Mutt
4065 will run the program RunningX to determine if it should use the first
4066 entry.  If the program returns non-zero, Mutt-ng will use the second entry
4067 for interactive viewing.
4068
4069 <sect2>Command Expansion
4070 <p>
4071 The various commands defined in the mailcap files are passed to the
4072 <tt>/bin/sh</tt> shell using the system() function.  Before the
4073 command is passed to <tt>/bin/sh -c</tt>, it is parsed to expand
4074 various special parameters with information from Mutt-ng.  The keywords
4075 Mutt-ng expands are:
4076 <descrip>
4077 <tag/&percnt;s/
4078 As seen in the basic mailcap section, this variable is expanded
4079 to a filename specified by the calling program.  This file contains
4080 the body of the message to view/print/edit or where the composing
4081 program should place the results of composition.  In addition, the
4082 use of this keyword causes Mutt-ng to not pass the body of the message
4083 to the view/print/edit program on stdin.
4084 <tag/&percnt;t/
4085 Mutt-ng will expand &percnt;t to the text representation of the content
4086 type of the message in the same form as the first parameter of the
4087 mailcap definition line, ie <tt>text/html</tt> or
4088 <tt>image/gif</tt>.
4089 <tag>&percnt;{&lt;parameter&gt;}</tag>
4090 Mutt-ng will expand this to the value of the specified parameter
4091 from the Content-Type: line of the mail message.  For instance, if
4092 Your mail message contains:
4093 <tscreen><verb>
4094 Content-Type: text/plain; charset=iso-8859-1
4095 </verb></tscreen>
4096 then Mutt-ng will expand &percnt;{charset} to iso-8859-1.  The default metamail
4097 mailcap file uses this feature to test the charset to spawn an xterm
4098 using the right charset to view the message.
4099 <tag>&bsol;&percnt;</tag>
4100 This will be replaced by a &percnt;
4101 </descrip>
4102 Mutt-ng does not currently support the &percnt;F and &percnt;n keywords
4103 specified in RFC 1524.  The main purpose of these parameters is for
4104 multipart messages, which is handled internally by Mutt-ng.
4105
4106 <sect1>Example mailcap files
4107 <p>
4108 This mailcap file is fairly simple and standard:
4109 <code>
4110 # I'm always running X :)
4111 video/*;        xanim %s > /dev/null
4112 image/*;        xv %s > /dev/null
4113
4114 # I'm always running netscape (if my computer had more memory, maybe)
4115 text/html;      netscape -remote 'openURL(%s)'
4116 </code>
4117
4118 This mailcap file shows quite a number of examples:
4119
4120 <code>
4121 # Use xanim to view all videos   Xanim produces a header on startup,
4122 # send that to /dev/null so I don't see it
4123 video/*;        xanim %s > /dev/null
4124
4125 # Send html to a running netscape by remote
4126 text/html;      netscape -remote 'openURL(%s)'; test=RunningNetscape
4127
4128 # If I'm not running netscape but I am running X, start netscape on the
4129 # object
4130 text/html;      netscape %s; test=RunningX
4131
4132 # Else use lynx to view it as text
4133 text/html;      lynx %s
4134
4135 # This version would convert the text/html to text/plain
4136 text/html;      lynx -dump %s; copiousoutput
4137
4138 # I use enscript to print text in two columns to a page
4139 text/*;         more %s; print=enscript -2Gr %s
4140
4141 # Netscape adds a flag to tell itself to view jpegs internally
4142 image/jpeg;xv %s; x-mozilla-flags=internal
4143
4144 # Use xv to view images if I'm running X
4145 # In addition, this uses the \ to extend the line and set my editor
4146 # for images
4147 image/*;xv %s; test=RunningX; \
4148         edit=xpaint %s
4149
4150 # Convert images to text using the netpbm tools
4151 image/*;  (anytopnm %s | pnmscale -xysize 80 46 | ppmtopgm | pgmtopbm |
4152 pbmtoascii -1x2 ) 2>&1 ; copiousoutput
4153
4154 # Send excel spreadsheets to my NT box
4155 application/ms-excel; open.pl %s
4156 </code>
4157
4158 <!--}}}--> 
4159
4160 <sect>MIME Autoview<label id="auto_view"> <!--{{{--> 
4161 <p>
4162 In addition to explicitly telling Mutt-ng to view an attachment with the
4163 MIME viewer defined in the mailcap file, Mutt-ng has support for
4164 automatically viewing MIME attachments while in the pager.
4165
4166 To work, you must define a viewer in the mailcap file which uses the 
4167 <tt/copiousoutput/ option to denote that it is non-interactive.
4168 Usually, you also use the entry to convert the attachment to a text
4169 representation which you can view in the pager.
4170
4171 You then use the <tt/auto&lowbar;view/ muttrc command to list the
4172 content-types that you wish to view automatically.
4173
4174 For instance, if you set auto&lowbar;view to:
4175 <tscreen><verb>
4176 auto_view text/html application/x-gunzip application/postscript image/gif application/x-tar-gz
4177 </verb></tscreen>
4178
4179 Mutt-ng could use the following mailcap entries to automatically view
4180 attachments of these types.
4181 <tscreen><verb>
4182 text/html;      lynx -dump %s; copiousoutput; nametemplate=%s.html
4183 image/*;        anytopnm %s | pnmscale -xsize 80 -ysize 50 | ppmtopgm | pgmtopbm | pbmtoascii ; copiousoutput
4184 application/x-gunzip;   gzcat; copiousoutput
4185 application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput
4186 application/postscript; ps2ascii %s; copiousoutput
4187 </verb></tscreen>
4188
4189 ``unauto_view'' can be used to remove previous entries from the autoview list.
4190 This can be used with message-hook to autoview messages based on size, etc.
4191 ``unauto_view *'' will remove all previous entries.
4192
4193 <!--}}}--> 
4194
4195 <sect>MIME Multipart/Alternative<label id="alternative_order"> <!--{{{--> 
4196 <p>
4197 Mutt-ng has some heuristics for determining which attachment of a
4198 multipart/alternative type to display.  First, mutt will check the 
4199 alternative&lowbar;order list to determine if one of the available types
4200 is preferred.  The alternative&lowbar;order list consists of a number of
4201 MIME types in order, including support for implicit and explicit
4202 wildcards, for example:
4203 <tscreen><verb>
4204 alternative_order text/enriched text/plain text application/postscript image/*
4205 </verb></tscreen>
4206
4207 Next, mutt will check if any of the types have a defined 
4208 <ref id="auto_view" name="auto&lowbar;view">, and use that.  Failing
4209 that, Mutt-ng will look for any text type.  As a last attempt, mutt will
4210 look for any type it knows how to handle.
4211
4212 To remove a MIME type from the <tt/alternative_order/ list, use the
4213 <tt/unalternative_order/ command.
4214
4215 <!--}}}--> 
4216
4217 <sect>MIME Lookup<label id="mime_lookup"> <!--{{{--> 
4218 <p>
4219 Mutt-ng's mime&lowbar;lookup list specifies a list of mime-types that should not
4220 be treated according to their mailcap entry.  This option is designed to
4221 deal with binary types such as application/octet-stream.  When an attachment's
4222 mime-type is listed in mime&lowbar;lookup, then the extension of the filename will
4223 be compared to the list of extensions in the mime.types file.  The mime-type
4224 associated with this extension will then be used to process the attachment
4225 according to the rules in the mailcap file and according to any other configuration
4226 options (such as auto&lowbar;view) specified.  Common usage would be:
4227 <tscreen><verb>
4228 mime_lookup application/octet-stream application/X-Lotus-Manuscript
4229 </verb></tscreen>
4230
4231 In addition, the unmime&lowbar;lookup command may be used to disable this feature
4232 for any particular mime-type if it had been set, for example, in a global
4233 muttrc.
4234
4235 <!--}}}--> 
4236
4237 <!--}}}--> 
4238
4239 <chapt>Reference <!--{{{--> 
4240
4241 <sect>Command line options<label id="commandline"> <!--{{{--> 
4242 <p>
4243 Running <tt/mutt/ with no arguments will make Mutt-ng attempt to read your spool
4244 mailbox.  However, it is possible to read other mailboxes and
4245 to send messages from the command line as well.
4246
4247 <tscreen><verb>
4248 -A      expand an alias
4249 -a      attach a file to a message
4250 -b      specify a blind carbon-copy (BCC) address
4251 -c      specify a carbon-copy (Cc) address
4252 -D      print the value of all variables on stdout
4253 -e      specify a config command to be run after initialization files are read
4254 -f      specify a mailbox to load
4255 -F      specify an alternate file to read initialization commands
4256 -h      print help on command line options
4257 -H      specify a draft file from which to read a header and body
4258 -i      specify a file to include in a message composition
4259 -m      specify a default mailbox type
4260 -n      do not read the system Muttngrc
4261 -p      recall a postponed message
4262 -Q      query a configuration variable
4263 -R      open mailbox in read-only mode
4264 -s      specify a subject (enclose in quotes if it contains spaces)
4265 -v      show version number and compile-time definitions
4266 -x      simulate the mailx(1) compose mode
4267 -y      show a menu containing the files specified by the mailboxes command
4268 -z      exit immediately if there are no messages in the mailbox
4269 -Z      open the first folder with new message,exit immediately if none
4270 </verb></tscreen>
4271
4272 To read messages in a mailbox
4273
4274 <tt/mutt/ &lsqb; -nz &rsqb; &lsqb; -F <em/muttrc/ &rsqb; &lsqb; -m <em/type/ &rsqb; &lsqb; -f <em/mailbox/ &rsqb; 
4275
4276 To compose a new message
4277
4278 <tt/mutt/ &lsqb; -n &rsqb; &lsqb; -F <em/muttrc/ &rsqb; &lsqb; -a <em/file/ &rsqb; &lsqb; -c <em/address/ &rsqb; &lsqb; -i <em/filename/ &rsqb; &lsqb; -s <em/subject/ &rsqb; <em/address/ &lsqb; <em/address/ ... &rsqb; 
4279
4280 Mutt-ng also supports a ``batch'' mode to send prepared messages.  Simply redirect
4281 input from the file you wish to send.  For example,
4282
4283 <tt>mutt -s &dquot;data set for run &num;2&dquot; professor@bigschool.edu
4284 &lt; &tilde;/run2.dat</tt>
4285
4286 This command will send a message to ``professor@bigschool.edu'' with a subject
4287 of ``data set for run &num;2''.  In the body of the message will be the contents
4288 of the file ``&tilde;/run2.dat''.
4289
4290 <!--}}}--> 
4291
4292 <sect>Patterns<label id="patterns"> <!--{{{--> 
4293
4294 <p>
4295 <tscreen><verb>
4296 ~A              all messages
4297 ~b EXPR         messages which contain EXPR in the message body
4298 ~B EXPR         messages which contain EXPR in the whole message
4299 ~c USER         messages carbon-copied to USER
4300 ~C EXPR         message is either to: or cc: EXPR
4301 ~D              deleted messages
4302 ~d [MIN]-[MAX]  messages with ``date-sent'' in a Date range
4303 ~E              expired messages
4304 ~e EXPR         message which contains EXPR in the ``Sender'' field
4305 ~F              flagged messages
4306 ~f USER         messages originating from USER
4307 ~g              cryptographically signed messages
4308 ~G              cryptographically encrypted messages
4309 ~H EXPR         messages with a spam attribute matching EXPR
4310 ~h EXPR         messages which contain EXPR in the message header
4311 ~k              message contains PGP key material
4312 ~i ID           message which match ID in the ``Message-ID'' field
4313 ~L EXPR         message is either originated or received by EXPR
4314 ~l              message is addressed to a known mailing list
4315 ~m [MIN]-[MAX]  message in the range MIN to MAX *)
4316 ~n [MIN]-[MAX]  messages with a score in the range MIN to MAX *)
4317 ~N              new messages
4318 ~O              old messages
4319 ~p              message is addressed to you (consults alternates)
4320 ~P              message is from you (consults alternates)
4321 ~Q              messages which have been replied to
4322 ~R              read messages
4323 ~r [MIN]-[MAX]  messages with ``date-received'' in a Date range
4324 ~S              superseded messages
4325 ~s SUBJECT      messages having SUBJECT in the ``Subject'' field.
4326 ~T              tagged messages
4327 ~t USER         messages addressed to USER
4328 ~U              unread messages
4329 ~v              message is part of a collapsed thread.
4330 ~V              cryptographically verified messages
4331 ~w EXPR         messages which contain EXPR in the `Newsgroups' field
4332                 (if compiled with NNTP support)
4333 ~x EXPR         messages which contain EXPR in the `References' field
4334 ~y EXPR         messages which contain EXPR in the `X-Label' field
4335 ~z [MIN]-[MAX]  messages with a size in the range MIN to MAX *)
4336 ~=              duplicated messages (see $duplicate_threads)
4337 ~$              unreferenced messages (requires threaded view)
4338 ~*              ``From'' contains realname and (syntactically) valid
4339                 address (excluded are addresses matching against
4340                 alternates or any alias)
4341 </verb></tscreen>
4342
4343 Where EXPR, USER, ID, and SUBJECT are 
4344 <ref id="regexp" name="regular expressions">.  Special attention has to be
4345 made when using regular expressions inside of patterns.  Specifically,
4346 Mutt-ng's parser for these patterns will strip one level of backslash (\),
4347 which is normally used for quoting.  If it is your intention to use a
4348 backslash in the regular expression, you will need to use two backslashes
4349 instead (\\).
4350
4351 *) The forms <tt/&lt;&lsqb;MAX&rsqb;/, <tt/&gt;&lsqb;MIN&rsqb;/,
4352 <tt/&lsqb;MIN&rsqb;-/ and <tt/-&lsqb;MAX&rsqb;/
4353 are allowed, too.
4354
4355 <!--}}}--> 
4356
4357 <sect>Configuration Commands<label id="commands"> <!--{{{--> 
4358 <p>
4359 The following are the commands understood by mutt.
4360
4361 <itemize>
4362 <item>
4363 <tt><ref id="account-hook" name="account-hook"></tt> <em/pattern/ <em/command/
4364 <item>
4365 <tt><ref id="alias" name="alias"></tt> <em/key/ <em/address/ &lsqb; , <em/address/, ... &rsqb;
4366 <item>
4367 <tt><ref id="alias" name="unalias"></tt> &lsqb; * | <em/key/ ... &rsqb;
4368 <item>
4369 <tt><ref id="alternates" name="alternates"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb;
4370 <item>
4371 <tt><ref id="alternates" name="unalternates"></tt> &lsqb; * | <em/regexp/ ... &rsqb;
4372 <item>
4373 <tt><ref id="alternative_order" name="alternative&lowbar;order"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
4374 <item>
4375 <tt><ref id="alternative_order" name="unalternative&lowbar;order"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
4376 <item>
4377 <tt><ref id="append-hook" name="append-hook"></tt> <em/regexp/ <em/command/
4378 <item>
4379 <tt><ref id="auto_view" name="auto&lowbar;view"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
4380 <item>
4381 <tt><ref id="auto_view" name="unauto&lowbar;view"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
4382 <item>
4383 <tt><ref id="bind" name="bind"></tt> <em/map/ <em/key/ <em/function/
4384 <item>
4385 <tt><ref id="charset-hook" name="charset-hook"></tt> <em/alias/ <em/charset/
4386 <item>
4387 <tt><ref id="close-hook" name="close-hook"></tt> <em/regexp/ <em/command/
4388 <item>
4389 <tt><ref id="color" name="color"></tt> <em/object/ <em/foreground/ <em/background/ &lsqb; <em/regexp/ &rsqb;
4390 <item>
4391 <tt><ref id="color" name="uncolor"></tt> <em/index/ <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
4392 <item>
4393 <tt><ref id="exec" name="exec"></tt> <em/function/ &lsqb; <em/function/ ... &rsqb;
4394 <item>
4395 <tt><ref id="fcc-hook" name="fcc-hook"></tt> <em/pattern/ <em/mailbox/
4396 <item>
4397 <tt><ref id="fcc-save-hook" name="fcc-save-hook"></tt> <em/pattern/ <em/mailbox/
4398 <item>
4399 <tt><ref id="folder-hook" name="folder-hook"></tt> <em/pattern/ <em/command/
4400 <item>
4401 <tt><ref id="hdr_order" name="hdr&lowbar;order"></tt> <em/header/ &lsqb; <em/header/ ... &rsqb;
4402 <item>
4403 <tt><ref id="hdr_order" name="unhdr&lowbar;order"></tt> <em/header/ &lsqb; <em/header/ ... &rsqb;
4404 <item>
4405 <tt><ref id="charset-hook" name="iconv-hook"></tt> <em/charset/ <em/local-charset/
4406 <item>
4407 <tt><ref id="ignore" name="ignore"></tt> <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
4408 <item>
4409 <tt><ref id="ignore" name="unignore"></tt> <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
4410 <item>
4411 <tt><ref id="lists" name="lists"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb; 
4412 <item>
4413 <tt><ref id="lists" name="unlists"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb; 
4414 <item>
4415 <tt><ref id="macro" name="macro"></tt> <em/menu/ <em/key/ <em/sequence/ &lsqb; <em/description/ &rsqb; 
4416 <item>
4417 <tt><ref id="mailboxes" name="mailboxes"></tt> <em/filename/ &lsqb; <em/filename/ ... &rsqb;
4418 <item>
4419 <tt><ref id="mbox-hook" name="mbox-hook"></tt> <em/pattern/ <em/mailbox/
4420 <item>
4421 <tt><ref id="message-hook" name="message-hook"></tt> <em/pattern/ <em/command/
4422 <item>
4423 <tt><ref id="mime_lookup" name="mime&lowbar;lookup"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
4424 <item>
4425 <tt><ref id="mime_lookup" name="unmime&lowbar;lookup"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
4426 <item>
4427 <tt><ref id="color" name="mono"></tt> <em/object attribute/ &lsqb; <em/regexp/ &rsqb;
4428 <item>
4429 <tt><ref id="color" name="unmono"></tt> <em/index/ <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
4430 <item>
4431 <tt><ref id="my_hdr" name="my&lowbar;hdr"></tt> <em/string/
4432 <item>
4433 <tt><ref id="my_hdr" name="unmy&lowbar;hdr"></tt> <em/field/ &lsqb; <em/field/ ... &rsqb;
4434 <item>
4435 <tt><ref id="open-hook" name="open-hook"></tt> <em/regexp/ <em/command/
4436 <item>
4437 <tt><ref id="crypt-hook" name="crypt-hook"></tt> <em/pattern/ <em/key-id/
4438 <item>
4439 <tt><ref id="push" name="push"></tt> <em/string/
4440 <item>
4441 <tt><ref id="set" name="reset"></tt> <em/variable/ &lsqb;<em/variable/ ... &rsqb;
4442 <item>
4443 <tt><ref id="save-hook" name="save-hook"></tt> <em/regexp/ <em/filename/
4444 <item>
4445 <tt><ref id="score-command" name="score"></tt> <em/pattern/ <em/value/
4446 <item>
4447 <tt><ref id="score-command" name="unscore"></tt> <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
4448 <item>
4449 <tt><ref id="send-hook" name="send-hook"></tt> <em/regexp/ <em/command/
4450 <item>
4451 <tt><ref id="reply-hook" name="reply-hook"></tt> <em/regexp/ <em/command/
4452 <item>
4453 <tt><ref id="set" name="set"></tt> &lsqb;no|inv&rsqb;<em/variable/&lsqb;=<em/value/&rsqb; &lsqb; <em/variable/ ... &rsqb;
4454 <item>
4455 <tt><ref id="set" name="unset"></tt> <em/variable/ &lsqb;<em/variable/ ... &rsqb;
4456 <item>
4457 <tt><ref id="source" name="source"></tt> <em/filename/
4458 <item>
4459 <tt><ref id="spam" name="spam"></tt> <em/pattern/ <em/format/
4460 <item>
4461 <tt><ref id="spam" name="nospam"></tt> <em/pattern/
4462 <item>
4463 <tt><ref id="lists" name="subscribe"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb; 
4464 <item>
4465 <tt><ref id="lists" name="unsubscribe"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb; 
4466 <item>
4467 <tt><ref id="set" name="toggle"></tt> <em/variable/ &lsqb;<em/variable/ ... &rsqb;
4468 <item>
4469 <tt><ref id="unhook" name="unhook"></tt> <em/hook-type/
4470 </itemize>
4471
4472 <sect>Configuration variables<label id="variables">
4473 <p>
4474