Rocco Rutte:
[apps/madmutt.git] / doc / manual.sgml.head
index 8ad8d3b..52f624e 100644 (file)
@@ -56,8 +56,8 @@ name="http://www.mutt.org/download.html">.
 <sect1>IRC
 <p>
 Visit channel <em/#mutt/ on <htmlurl
-url="http://www.openprojects.net" name="OpenProjects.Net
-(www.openprojects.net)"> to chat with other people interested in Mutt.
+url="http://www.freenode.net/" name="irc.freenode.net
+(www.freenode.net)"> to chat with other people interested in Mutt.
 
 <sect1>USENET
 <p>
@@ -411,7 +411,7 @@ you misspelled the passphrase.
 <p><bf/list-reply/<label id="list-reply"> (default: L)<newline>
 
 Reply to the current or tagged message(s) by extracting any addresses which
-match the addresses given by the <ref id="lists" name="lists or subscribe">
+match the regular expressions given by the <ref id="lists" name="lists or subscribe">
 commands, but also honor any <tt/Mail-Followup-To/ header(s) if the
 <ref id="honor_followup_to" name="&dollar;honor&lowbar;followup&lowbar;to">
 configuration variable is set.  Using this when replying to messages posted
@@ -568,7 +568,7 @@ Also see <ref id="edit_headers" name="edit&lowbar;headers">.
 <p>
 If you want to use PGP, you can specify 
 
-<tt/Pgp:/ &lsqb; <tt/E/ | <tt/S/ | <tt/S&lt;id/&gt; &rsqb; <newline>
+<tt/Pgp:/ &lsqb; <tt/E/ | <tt/S/ | <tt/S/<em/&lt;id&gt;/ &rsqb; <newline>
 
 ``E'' encrypts, ``S'' signs and
 ``S&lt;id&gt;'' signs with the given key, setting <ref
@@ -892,9 +892,11 @@ Usage: <tt/bind/ <em/map/ <em/key/ <em/function/
 This command allows you to change the default key bindings (operation
 invoked when pressing a key).
 
-<em/map/ specifies in which menu the binding belongs.  The currently
-defined maps are:
+<em/map/ specifies in which menu the binding belongs.  Multiple maps may
+be specified by separating them with commas (no additional whitespace is
+allowed). The currently defined maps are:
 
+<label id="maps">
 <descrip>
 <tag/generic/
 This is not a real menu, but is used as a fallback for all of the other
@@ -932,7 +934,7 @@ recalling a message the user was composing, but saved until later.
 control character, use the sequence <em/&bsol;Cx/, where <em/x/ is the
 letter of the control character (for example, to specify control-A use
 ``&bsol;Ca'').  Note that the case of <em/x/ as well as <em/&bsol;C/ is
-ignored, so that <em/&bsol;CA, &bsol;Ca, &bsol;cA/ and <em/&bsol;ca/ are all
+ignored, so that <em/&bsol;CA/, <em/&bsol;Ca/, <em/&bsol;cA/ and <em/&bsol;ca/ are all
 equivalent.  An alternative form is to specify the key as a three digit
 octal number prefixed with a ``&bsol;'' (for example <em/&bsol;177/ is
 equivalent to <em/&bsol;c?/).
@@ -1030,6 +1032,11 @@ you had typed <em/sequence/.  So if you have a common sequence of commands
 you type, you can create a macro to execute those commands with a single
 key.
 
+<em/menu/ is the <ref id="maps" name="map"> which the macro will be bound.
+Multiple maps may be specified by separating multiple menu arguments by
+commas. Whitespace may not be used in between the menu arguments and the
+commas separating them.
+
 <em/key/ and <em/sequence/ are expanded by the same rules as the <ref
 id="bind" name="key bindings">.  There are some additions however.  The
 first is that control characters in <em/sequence/ can also be specified
@@ -1186,7 +1193,7 @@ someone else.  For instance, when replying to a message that you
 sent to a different party, mutt will automatically suggest to send
 the response to the original message's recipients -- responding to
 yourself won't make much sense in many cases.  (See <ref
-id="reply_to" name="&dollar;reply_to">.)
+id="reply_to" name="&dollar;reply&lowbar;to">.)
 
 Many users receive e-mail under a number of different addresses. To
 fully use mutt's features here, the program must be able to
@@ -1195,8 +1202,18 @@ purpose of the <tt/alternates/ command: It takes a list of regular
 expressions, each of which can identify an address under which you
 receive e-mail.
 
-To remove a regular expression from this list, use the
-<tt/unalternates/ command.
+The <tt/unalternates/ command can be used to write exceptions to
+<tt/alternates/ patterns. If an address matches something in an
+<tt/alternates/ command, but you nonetheless do not think it is
+from you, you can list a more precise pattern under an <tt/unalternates/
+command.
+
+To remove a regular expression from the <tt/alternates/ list, use the
+<tt/unalternates/ command with exactly the same <em/regexp/.
+Likewise, if the <em/regexp/ for a <tt/alternates/ command matches
+an entry on the <tt/unalternates/ list, that <tt/unalternates/
+entry will be removed. If the <em/regexp/ for <tt/unalternates/
+is ``*'', <em/all entries/ on <tt/alternates/ will be removed.
 
 <sect1>Mailing lists<label id="lists">
 <p>
@@ -1215,7 +1232,7 @@ the Mail-Followup-To header is a non-standard extension which is not
 supported by all mail user agents.  Adding it is not bullet-proof against
 receiving personal CCs of list messages.  Also note that the generation
 of the Mail-Followup-To header is controlled by the <ref id="followup_to"
-name="&dollar;followup_to"> configuration variable.
+name="&dollar;followup&lowbar;to"> configuration variable.
 
 More precisely, Mutt maintains lists of patterns for the addresses
 of known and subscribed mailing lists.  Every subscribed mailing
@@ -1235,8 +1252,8 @@ mailing list, you could add ``lists mutt-users'' to your
 initialization file.  To tell mutt that you are subscribed to it,
 add ``subscribe mutt-users'' to your initialization file instead.
 If you also happen to get mail from someone whose address is
-<em/mutt-users@example.com/, you could use ``lists mutt-users@mutt.org'' 
-or ``subscribe mutt-users@mutt.org'' to
+<em/mutt-users@example.com/, you could use ``lists mutt-users@mutt&bsol;&bsol;.org'' 
+or ``subscribe mutt-users@mutt&bsol;&bsol;.org'' to
 match only mail from the actual list.
 
 The ``unlists'' command is used to remove a token from the list of
@@ -1379,7 +1396,7 @@ to <ref id="record" name="&dollar;record"> mailbox.
 
 See <ref id="pattern_hook" name="Message Matching in Hooks"> for information on the exact format of <em/pattern/.
 
-Example: <tt/fcc-hook aol.com&dollar; +spammers/
+Example: <tt/fcc-hook &lsqb;@.&rsqb;aol&bsol;&bsol;.com&dollar; +spammers/
 
 The above will save a copy of all messages going to the aol.com domain to
 the `+spammers' mailbox by default.  Also see the <ref id="fcc-save-hook" 
@@ -1393,10 +1410,11 @@ Usage: <tt/fcc-save-hook/ &lsqb;!&rsqb;<em/pattern/ <em/mailbox/
 This command is a shortcut, equivalent to doing both a <ref id="fcc-hook" name="fcc-hook">
 and a <ref id="save-hook" name="save-hook"> with its arguments.
 
-<sect1>Change settings based upon message recipients<label id="send-hook"><label id="reply-hook">
+<sect1>Change settings based upon message recipients<label id="send-hook"><label id="reply-hook"><label id="send2-hook">
 <p>
 Usage: <tt/reply-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/<newline>
-Usage: <tt/send-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/
+Usage: <tt/send-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/<newline>
+Usage: <tt/send2-hook/ &lsqb;!&rsqb;<em/pattern/ <em/command/
 
 These commands can be used to execute arbitrary configuration commands based
 upon recipients of the message.  <em/pattern/ is a regular expression
@@ -1409,7 +1427,14 @@ matched against all messages, both <em/new/ and <em/replies/.  <bf/Note:/
 <tt/reply-hook/s are matched <bf/before/ the <tt/send-hook/, <bf/regardless/
 of the order specified in the users's configuration file.
 
-For each type of <tt/send-hook/ or <tt/reply-hook/, When multiple matches
+<tt/send2-hook/ is matched every time a message is changed, either
+by editing it, or by using the compose menu to change its recipients
+or subject.  <tt/send2-hook/ is executed after <tt/send-hook/, and
+can, e.g., be used to set parameters such as the <ref id="sendmail"
+name="&dollar;sendmail"> variable depending on the message's sender
+address.
+
+For each type of <tt/send-hook/ or <tt/reply-hook/, when multiple matches
 occur, commands are executed in the order they are specified in the muttrc
 (for that type of hook).
 
@@ -1503,6 +1528,106 @@ specify the same pattern specified in the <tt/score/ command for it to be
 removed.  The pattern ``*'' is a special token which means to clear the list
 of all score entries.
 
+<sect1>Spam detection<label id="spam">
+<p>
+Usage: <tt/spam/ <em/pattern/ <em/format/<newline>
+Usage: <tt/nospam/ <em/pattern/
+
+Mutt has generalized support for external spam-scoring filters.
+By defining your spam patterns with the <tt/spam/ and <tt/nospam/
+commands, you can <em/limit/, <em/search/, and <em/sort/ your
+mail based on its spam attributes, as determined by the external
+filter. You also can display the spam attributes in your index
+display using the <tt/%H/ selector in the <ref id="index_format"
+name="&dollar;index&lowbar;format"> variable. (Tip: try <tt/%?H?[%H] ?/
+to display spam tags only when they are defined for a given message.)
+
+Your first step is to define your external filter's spam patterns using
+the <tt/spam/ command. <em/pattern/ should be a regular expression
+that matches a header in a mail message. If any message in the mailbox
+matches this regular expression, it will receive a ``spam tag'' or
+``spam attribute'' (unless it also matches a <tt/nospam/ pattern -- see
+below.) The appearance of this attribute is entirely up to you, and is
+governed by the <em/format/ parameter. <em/format/ can be any static
+text, but it also can include back-references from the <em/pattern/
+expression. (A regular expression ``back-reference'' refers to a
+sub-expression contained within parentheses.) <tt/%1/ is replaced with
+the first back-reference in the regex, <tt/%2/ with the second, etc.
+
+If you're using multiple spam filters, a message can have more than
+one spam-related header. You can define <tt/spam/ patterns for each
+filter you use. If a message matches two or more of these patterns, and
+the &dollar;spam&lowbar;separator variable is set to a string, then the
+message's spam tag will consist of all the <em/format/ strings joined
+together, with the value of &dollar;spam&lowbar;separator separating
+them.
+
+For example, suppose I use DCC, SpamAssassin, and PureMessage. I might
+define these spam settings:
+<tscreen><verb>
+spam "X-DCC-.*-Metrics:.*(....)=many"         "90+/DCC-%1"
+spam "X-Spam-Status: Yes"                     "90+/SA"
+spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM"
+set spam_separator=", "
+</verb></tscreen>
+
+If I then received a message that DCC registered with ``many'' hits
+under the ``Fuz2'' checksum, and that PureMessage registered with a
+97% probability of being spam, that message's spam tag would read
+<tt>90+/DCC-Fuz2, 97/PM</tt>. (The four characters before ``=many'' in a
+DCC report indicate the checksum used -- in this case, ``Fuz2''.)
+
+If the &dollar;spam&lowbar;separator variable is unset, then each
+spam pattern match supercedes the previous one. Instead of getting
+joined <em/format/ strings, you'll get only the last one to match.
+
+The spam tag is what will be displayed in the index when you use
+<tt/%H/ in the <tt/&dollar;index&lowbar;format/ variable. It's also the
+string that the <tt/~H/ pattern-matching expression matches against for
+<em/search/ and <em/limit/ functions. And it's what sorting by spam
+attribute will use as a sort key.
+
+That's a pretty complicated example, and most people's actual
+environments will have only one spam filter. The simpler your
+configuration, the more effective mutt can be, especially when it comes
+to sorting.
+
+Generally, when you sort by spam tag, mutt will sort <em/lexically/ --
+that is, by ordering strings alphnumerically. However, if a spam tag
+begins with a number, mutt will sort numerically first, and lexically
+only when two numbers are equal in value. (This is like UNIX's
+<tt/sort -n/.) A message with no spam attributes at all -- that is, one
+that didn't match <em/any/ of your <tt/spam/ patterns -- is sorted at
+lowest priority. Numbers are sorted next, beginning with 0 and ranging
+upward. Finally, non-numeric strings are sorted, with ``a'' taking lower
+priority than ``z''. Clearly, in general, sorting by spam tags is most
+effective when you can coerce your filter to give you a raw number. But
+in case you can't, mutt can still do something useful.
+
+The <tt/nospam/ command can be used to write exceptions to <tt/spam/
+patterns. If a header pattern matches something in a <tt/spam/ command,
+but you nonetheless do not want it to receive a spam tag, you can list a
+more precise pattern under a <tt/nospam/ command.
+
+If the <em/pattern/ given to <tt/nospam/ is exactly the same as the
+<em/pattern/ on an existing <tt/spam/ list entry, the effect will be to
+remove the entry from the spam list, instead of adding an exception.
+Likewise, if the <em/pattern/ for a <tt/spam/ command matches an entry
+on the <tt/nospam/ list, that <tt/nospam/ entry will be removed. If the
+<em/pattern/ for <tt/nospam/ is ``*'', <em/all entries on both lists/
+will be removed. This might be the default action if you use <tt/spam/
+and <tt/nospam/ in conjunction with a <tt/folder-hook/.
+
+You can have as many <tt/spam/ or <tt/nospam/ commands as you like.
+You can even do your own primitive spam detection within mutt -- for
+example, if you consider all mail from <tt/MAILER-DAEMON/ to be spam,
+you can use a <tt/spam/ command like this:
+
+<tscreen><verb>
+spam "^From: .*MAILER-DAEMON"       "999"
+</verb></tscreen>
+
+
 <sect1>Setting variables<label id="set">
 <p>
 Usage: <tt/set/ &lsqb;no|inv&rsqb;<em/variable/&lsqb;=<em/value/&rsqb; &lsqb; <em/variable/ ... &rsqb;<newline>
@@ -1574,7 +1699,7 @@ path of your home directory.
 
 If the filename ends with a vertical bar (|), then <em/filename/ is
 considered to be an executable program from which to read input (eg.
-<tt/source ~/bin/myscript|/).
+<tt>source ~/bin/myscript|</tt>).
 
 <sect1>Removing hooks<label id="unhook">
 <p>
@@ -1770,6 +1895,7 @@ messages:
 ~f USER         messages originating from USER
 ~g              cryptographically signed messages
 ~G              cryptographically encrypted messages
+~H EXPR         messages with a spam attribute matching EXPR
 ~h EXPR         messages which contain EXPR in the message header
 ~k             message contains PGP key material
 ~i ID           message which match ID in the ``Message-ID'' field
@@ -1795,6 +1921,10 @@ messages:
 ~y EXPR         messages which contain EXPR in the `X-Label' field
 ~z [MIN]-[MAX]  messages with a size in the range MIN to MAX *)
 ~=             duplicated messages (see $duplicate_threads)
+~$             unreferenced messages (requires threaded view)
+~*             ``From'' contains realname and (syntactically) valid
+               address (excluded are addresses matching against
+               alternates or any alias)
 </verb></tscreen>
 
 Where EXPR, USER, ID, and SUBJECT are 
@@ -1871,8 +2001,9 @@ pattern language.  For example,
 ~f "me@(mutt\.org|cs\.hmc\.edu)"
 </verb></tscreen>
 
-Without the quotes, the parenthesis would truncate the regular expression
-to simply <em/me@/, which is probably not what you want.
+Without the quotes, the parenthesis wouldn't end.
+This would be seperated to two OR'd patterns: <em/&tilde;f me@(mutt\.org/
+and <em/cs\.hmc\.edu)/. They are never what you want.
 
 <sect2>Searching by Date
 <p>
@@ -1962,6 +2093,13 @@ manner.  If the <ref id="auto_tag" name="&dollar;auto&lowbar;tag">
 variable is set, the next operation applies to the tagged messages
 automatically, without requiring the ``tag-prefix''.
 
+In <ref id="macro" name="macros"> or <ref id="push" name="push"> commands,
+you can use the ``tag-prefix-cond'' operator.  If there are no tagged
+messages, mutt will "eat" the rest of the macro to abort it's execution.
+Mutt will stop "eating" the macro when it encounters the ``end-cond''
+operator;  after this operator the rest of the macro will be executed as
+normal.
+
 <sect1>Using Hooks<label id="hooks">
 <p>
 A <em/hook/ is a concept borrowed from the EMACS editor which allows you to
@@ -1990,7 +2128,7 @@ my_hdr directive:
 
 <tscreen><verb>
 send-hook . 'unmy_hdr From:'
-send-hook ~Cb@b.b my_hdr from: c@c.c
+send-hook ~C'^b@b\.b$' my_hdr from: c@c.c
 </verb></tscreen>
 
 <sect2>Message Matching in Hooks<label id="pattern_hook">
@@ -2026,6 +2164,41 @@ pattern is translated at the time the hook is declared, so the value of
 <ref id="default_hook" name="&dollar;default&lowbar;hook"> that is in effect
 at that time will be used.
 
+<sect1>Usind the sidebar<label id="sidebar">
+<p>
+The sidebar allows you to use a mailbox listing which looks very
+similiar to the ones you can the in GUI mail clients.
+The sidebar lists all specified mailboxes, shows the number in each
+and highlights the ones with new email
+Use the following commands:
+<tscreen><verb>
+set sidebar_visible="yes"
+set sidebar_width=25
+</tscreen></verb>
+
+If you want to specify the mailboxes you can do so with:
+<tscreen><verb>
+set mbox='=INBOX'
+mailboxes INBOX \
+          MBOX1 \
+          MBOX2 \
+          ...
+</tscreen></verb>
+
+You can also specify the colors for mailboxes with new mails by using:
+<tscreen><verb>
+color sidebar_new red black
+</tscreen></verb>
+
+The available functions are:
+<tscreen><verb>
+sidebar-scroll-up      Scrolls the mailbox list up 1 page
+sidebar-scroll-down    Scrolls the mailbox list down 1 page
+sidebar-next           Hilights the next mailbox
+sidebar-previous       Hilights the previous mailbox
+sidebar-open           Opens the currently hilighted mailbox
+</tscreen></verb>
+
 <sect1>External Address Queries<label id="query">
 <p>
 Mutt supports connecting to external directory databases such as LDAP,
@@ -2056,7 +2229,7 @@ There are two mechanisms for accessing the query function of mutt.  One
 is to do a query from the index menu using the query function (default: Q).
 This will prompt for a query, then bring up the query menu which will
 list the matching responses.  From the query menu, you can select
-addresses to create aliases, or to mail.  You can tag multiple messages
+addresses to create aliases, or to mail.  You can tag multiple addresses
 to mail, start a new query, or have a new query appended to the current
 responses.
 
@@ -2184,10 +2357,11 @@ than the author of the message.  This can create problems when trying
 to reply directly to the author in private, since most mail clients
 will automatically reply to the address given in the ``Reply-To''
 field.  Mutt uses the <ref id="reply_to" name="&dollar;reply&lowbar;to">
-variable to help decide which address to use.  If set, you will be
+variable to help decide which address to use.  If set to <em/ask-yes/ or
+<em/ask-no/, you will be
 prompted as to whether or not you would like to use the address given in
 the ``Reply-To'' field, or reply directly to the address given in the
-``From'' field.  When unset, the ``Reply-To'' field will be used when
+``From'' field.  When set to <em/yes/, the ``Reply-To'' field will be used when
 present.
 
 The ``X-Label:'' header field can be used to further identify mailing
@@ -2208,8 +2382,43 @@ used a threaded news client, this is the same concept.  It makes dealing
 with large volume mailing lists easier because you can easily delete
 uninteresting threads and quickly find topics of value.
 
+<sect1>Editing threads
+<p>
+Mutt has the ability to dynamically restructure threads that are broken
+either by misconfigured software or bad behaviour from some
+correspondents. This allows to clean your mailboxes formats) from these
+annoyances which make it hard to follow a discussion.
+
+If you want to use these functions with IMAP, you need to compile Mutt
+with the <em/--enable-imap-edit-threads/ configure flag.
+
+<sect2>Linking threads
+<p>
+
+Some mailers tend to "forget" to correctly set the "In-Reply-To:" and
+"References:" headers when replying to a message. This results in broken
+discussions because Mutt has not enough information to guess the correct
+threading.
+You can fix this by tagging the reply, then moving to the parent message
+and using the ``link-threads'' function (bound to & by default). The
+reply will then be connected to this "parent" message.
+
+You can also connect multiple childs at once, tagging them and using the
+tag-prefix command (';') or the auto_tag option.
+
+<sect2>Breaking threads
+<p>
+
+On mailing lists, some people are in the bad habit of starting a new
+discussion by hitting "reply" to any message from the list and changing
+the subject to a totally unrelated one.
+You can fix such threads by using the ``break-thread'' function (bound
+by default to #), which will turn the subthread starting from the
+current message into a whole different thread.
+
 <sect1>Delivery Status Notification (DSN) Support
 <p>
+
 RFC1894 defines a set of MIME content types for relaying information
 about the status of electronic mail messages.  These can be thought of as
 ``return receipts.'' Berkeley sendmail 8.8.x currently has some command
@@ -2243,7 +2452,7 @@ You can also specify different username for each folder, ie:
 Polling for new mail is more expensive over POP3 than locally. For this
 reason the frequency at which Mutt will check for mail remotely can be
 controlled by the
-<ref id="pop&lowbar;checkinterval" name="&dollar;pop&lowbar;checkinterval">
+<ref id="pop_checkinterval" name="&dollar;pop&lowbar;checkinterval">
 variable, which defaults to every 60 seconds.
 
 If Mutt was compiled with SSL support (by running the <em/configure/
@@ -2300,12 +2509,12 @@ paths accordingly.
 When browsing folders on an IMAP server, you can toggle whether to look
 at only the folders you are subscribed to, or all folders with the
 <em/toggle-subscribed/ command.  See also the 
-<ref id="imap&lowbar;list&lowbar;subscribed"
+<ref id="imap_list_subscribed"
 name="&dollar;imap&lowbar;list&lowbar;subscribed"> variable.
 
 Polling for new mail on an IMAP server can cause noticeable delays. So, you'll
 want to carefully tune the
-<ref id="mail&lowbar;check" name="&dollar;mail&lowbar;check">
+<ref id="mail_check" name="&dollar;mail&lowbar;check">
 and
 <ref id="timeout" name="&dollar;timeout">
 variables. Personally I use
@@ -2336,8 +2545,10 @@ following differences:
   will choose to descend into the subfolder view. If you wish to view
   the messages in that folder, you must use <tt>view-file</tt> instead
   (bound to <tt>space</tt> by default).
-<item>You can delete mailboxes with the <tt>delete-mailbox</tt>
-  command (bound to <tt>d</tt> by default. You may also
+<item>You can create, delete and rename mailboxes with the
+  <tt>create-mailbox</tt>, <tt>delete-mailbox</tt>, and
+  <tt>rename-mailbox</tt> commands (default bindings: <tt>C</tt>,
+  <tt>d</tt> and <tt>r</tt>, respectively). You may also
   <tt>subscribe</tt> and <tt>unsubscribe</tt> to mailboxes (normally
   these are bound to <tt>s</tt> and <tt>u</tt>, respectively).
 </itemize>
@@ -2366,15 +2577,15 @@ in the following order: SASL, ANONYMOUS, GSSAPI, CRAM-MD5, LOGIN.
 
 There are a few variables which control authentication: 
 <itemize>
-<item><ref id="imap&lowbar;user" name="&dollar;imap&lowbar;user"> - controls
+<item><ref id="imap_user" name="&dollar;imap&lowbar;user"> - controls
   the username under which you request authentication on the IMAP server,
   for all authenticators. This is overridden by an explicit username in
   the mailbox path (ie by using a mailbox name of the form
   <tt/{user@host}/).
-<item><ref id="imap&lowbar;pass" name="&dollar;imap&lowbar;pass"> - a
+<item><ref id="imap_pass" name="&dollar;imap&lowbar;pass"> - a
   password which you may preset, used by all authentication methods where
   a password is needed.
-<item><ref id="imap&lowbar;authenticators"
+<item><ref id="imap_authenticators"
   name="&dollar;imap&lowbar;authenticators"> - a colon-delimited list of IMAP
   authentication methods to try, in the order you wish to try them. If
   specified, this overrides mutt's default (attempt everything, in the order
@@ -2401,7 +2612,7 @@ account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'
 
 <sect1>Start a WWW Browser on URLs (EXTERNAL)<label id="urlview">
 <p>
-If a message contains URLs (<em/unified ressource locator/ = address in the
+If a message contains URLs (<em/unified resource locator/ = address in the
 WWW space like <em>http://www.mutt.org/</em>), it is efficient to get
 a menu with all the URLs and start a WWW browser on one of them.  This
 functionality is provided by the external urlview program which can be
@@ -2412,6 +2623,168 @@ macro index \cb |urlview\n
 macro pager \cb |urlview\n
 </verb></tscreen>
 
+<sect1>Compressed folders Support (OPTIONAL)
+<p>
+
+If Mutt was compiled with compressed folders support (by running the
+<em/configure/ script with the <em/--enable-compressed/ flag), Mutt
+can open folders stored in an arbitrary format, provided that the user
+has a script to convert from/to this format to one of the accepted.
+
+The most common use is to open compressed archived folders e.g. with
+gzip.
+
+In addition, the user can provide a script that gets a folder in an
+accepted format and appends its context to the folder in the
+user-defined format, which may be faster than converting the entire
+folder to the accepted format, appending to it and converting back to
+the user-defined format.
+
+There are three hooks defined (<ref id="open-hook" name="open-hook">,
+<ref id="close-hook" name="close-hook"> and <ref id="append-hook"
+name="append-hook">) which define commands to uncompress and compress
+a folder and to append messages to an existing compressed folder 
+respectively.
+
+For example:
+
+<tscreen><verb>
+open-hook \\.gz$ "gzip -cd %f > %t" 
+close-hook \\.gz$ "gzip -c %t > %f"
+append-hook \\.gz$ "gzip -c %t >> %f" 
+</verb></tscreen>
+
+You do not have to specify all of the commands. If you omit <ref
+id="append-hook" name="append-hook">, the folder will be open and
+closed again each time you will add to it. If you omit <ref
+id="close-hook" name="close-hook"> (or give empty command) , the
+folder will be open in the  mode. If you specify <ref
+id="append-hook" name="append-hook"> though you'll be able to append
+to the folder.
+
+Note that Mutt will only try to use hooks if the file is not in one of
+the accepted formats. In particular, if the file is empty, mutt
+supposes it is not compressed. This is important because it allows the
+use of programs that do not have well defined extensions. Just use
+&dquot;.&dquot; as a regexp. But this may be surprising if your
+compressing script produces empty files. In this situation, unset <ref
+id="save_empty" name="&dollar;save&lowbar;empty">, so that the compressed file
+will be removed if you delete all of the messages.
+
+<sect2>Open a compressed mailbox for reading<label id="open-hook">
+<p>
+Usage: <tt/open-hook/ <em/regexp/ &dquot;<em/command/&dquot;
+
+The <em/command/ is the command that can be used for opening the
+folders whose names match <em/regexp/.
+
+The <em/command/ string is the printf-like format string, and it
+should accept two parameters: &percnt;f, which is replaced with the
+(compressed) folder name, and &percnt;t which is replaced with the
+name of the temporary folder to which to write.
+
+&percnt;f and &percnt;t can be repeated any number of times in the
+command string, and all of the entries are replaced with the
+appropriate folder name. In addition, &percnt;&percnt; is replaced by
+&percnt;, as in printf, and any other &percnt;anything is left as is.
+
+The <em/command/ should <bf/not/ remove the original compressed file.
+The <em/command/ should return non-zero exit status if it fails, so
+mutt knows something's wrong.
+
+Example:
+
+<tscreen><verb>
+open-hook \\.gz$ "gzip -cd %f > %t" 
+</verb></tscreen>
+
+If the <em/command/ is empty, this operation is disabled for this file
+type.
+
+<sect2>Write a compressed mailbox<label id="close-hook">
+<p>
+Usage: <tt/close-hook/ <em/regexp/ &dquot;<em/command/&dquot;
+
+This is used to close the folder that was open with the <ref id="open-hook" 
+name="open-hook"> command after some changes were made to it.
+
+The <em/command/ string is the command that can be used for closing the
+folders whose names match <em/regexp/. It has the same format as in 
+the <ref id="open-hook" name="open-hook"> command. Temporary folder
+in this case is the folder previously produced by the <<ref id="open-hook"
+name="open-hook"> command.
+
+The <em/command/ should <bf/not/ remove the decompressed file. The
+<em/command/ should return non-zero exit status if it fails, so mutt
+knows something's wrong.
+
+Example:
+
+<tscreen><verb>
+close-hook \\.gz$ "gzip -c %t > %f"
+</verb></tscreen>
+
+If the <em/command/ is empty, this operation is disabled for this file
+type, and the file can only be open in the readonly mode.
+
+<ref id="close-hook" name ="close-hook"> is not called when you exit
+from the folder if the folder was not changed.
+
+<sect2>Append a message to a compressed mailbox<label id="append-hook">
+<p>
+Usage: <tt/append-hook/ <em/regexp/ &dquot;<em/command/&dquot;
+
+This command is used for saving to an existing compressed folder.
+The <em/command/ is the command that can be used for appending to the
+folders whose names match <em/regexp/. It has the same format as in 
+ the <ref id="open-hook" name="open-hook"> command.
+The temporary folder in this case contains the messages that are being
+appended. 
+
+The <em/command/ should <bf/not/ remove the decompressed file. The
+<em/command/ should return non-zero exit status if it fails, so mutt
+knows something's wrong.
+
+Example:
+
+<tscreen><verb>
+append-hook \\.gz$ "gzip -c %t >> %f" 
+</verb></tscreen>
+
+When <ref id="append-hook" name="append-hook"> is used, the folder is
+not opened, which saves time, but this means that we can not find out
+what the folder type is. Thus the default (<ref id="mbox_type"
+name="&dollar;mbox&lowbar;type">) type is always supposed (i.e.
+this is the format used for the temporary folder).
+
+If the file does not exist when you save to it, <ref id="close-hook"
+name="close-hook"> is called, and not <ref id="append-hook"
+name="append-hook">. <ref id="append-hook" name="append-hook"> is only
+for appending to existing folders.
+
+If the <em/command/ is empty, this operation is disabled for this file
+type. In this case, the folder will be open and closed again (using
+<ref id="open-hook" name="open-hook"> and <ref id="close-hook" 
+name="close-hook">respectively) each time you will add to it.
+
+<sect2>Encrypted folders
+<p>
+The compressed folders support can also be used to handle encrypted
+folders. If you want to encrypt a folder with PGP, you may want to use
+the following hooks:
+
+<tscreen><verb>
+open-hook  \\.pgp$ "pgp -f < %f > %t"
+close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
+</verb></tscreen>
+
+Please note, that PGP does not support appending to an encrypted
+folder, so there is no append-hook defined.
+
+<bf/Note:/ the folder is temporary stored decrypted in the /tmp
+directory, where it can be read by your system administrator. So think
+about the security aspects of this.
+
 <sect>Mutt's MIME Support
 <p>
 Quite a bit of effort has been made to make Mutt the premier text-mode
@@ -2915,7 +3288,7 @@ associated with this extension will then be used to process the attachment
 according to the rules in the mailcap file and according to any other configuration
 options (such as auto&lowbar;view) specified.  Common usage would be:
 <tscreen><verb>
-mime-lookup application/octet-stream application/X-Lotus-Manuscript
+mime_lookup application/octet-stream application/X-Lotus-Manuscript
 </verb></tscreen>
 
 In addition, the unmime&lowbar;lookup command may be used to disable this feature
@@ -2991,6 +3364,8 @@ The following are the commands understood by mutt.
 <item>
 <tt><ref id="alternative_order" name="unalternative&lowbar;order"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
 <item>
+<tt><ref id="append-hook" name="append-hook"></tt> <em/regexp/ <em/command/
+<item>
 <tt><ref id="auto_view" name="auto&lowbar;view"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
 <item>
 <tt><ref id="auto_view" name="unauto&lowbar;view"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
@@ -2999,6 +3374,8 @@ The following are the commands understood by mutt.
 <item>
 <tt><ref id="charset-hook" name="charset-hook"></tt> <em/alias/ <em/charset/
 <item>
+<tt><ref id="close-hook" name="close-hook"></tt> <em/regexp/ <em/command/
+<item>
 <tt><ref id="color" name="color"></tt> <em/object/ <em/foreground/ <em/background/ &lsqb; <em/regexp/ &rsqb;
 <item>
 <tt><ref id="color" name="uncolor"></tt> <em/index/ <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
@@ -3021,9 +3398,9 @@ The following are the commands understood by mutt.
 <item>
 <tt><ref id="ignore" name="unignore"></tt> <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
 <item>
-<tt><ref id="lists" name="lists"></tt> <em/address/ &lsqb; <em/address/ ... &rsqb; 
+<tt><ref id="lists" name="lists"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb; 
 <item>
-<tt><ref id="lists" name="unlists"></tt> <em/address/ &lsqb; <em/address/ ... &rsqb; 
+<tt><ref id="lists" name="unlists"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb; 
 <item>
 <tt><ref id="macro" name="macro"></tt> <em/menu/ <em/key/ <em/sequence/ &lsqb; <em/description/ &rsqb; 
 <item>
@@ -3045,6 +3422,8 @@ The following are the commands understood by mutt.
 <item>
 <tt><ref id="my_hdr" name="unmy&lowbar;hdr"></tt> <em/field/ &lsqb; <em/field/ ... &rsqb;
 <item>
+<tt><ref id="open-hook" name="open-hook"></tt> <em/regexp/ <em/command/
+<item>
 <tt><ref id="crypt-hook" name="crypt-hook"></tt> <em/pattern/ <em/key-id/
 <item>
 <tt><ref id="push" name="push"></tt> <em/string/
@@ -3059,15 +3438,21 @@ The following are the commands understood by mutt.
 <item>
 <tt><ref id="send-hook" name="send-hook"></tt> <em/regexp/ <em/command/
 <item>
+<tt><ref id="reply-hook" name="reply-hook"></tt> <em/regexp/ <em/command/
+<item>
 <tt><ref id="set" name="set"></tt> &lsqb;no|inv&rsqb;<em/variable/&lsqb;=<em/value/&rsqb; &lsqb; <em/variable/ ... &rsqb;
 <item>
 <tt><ref id="set" name="unset"></tt> <em/variable/ &lsqb;<em/variable/ ... &rsqb;
 <item>
 <tt><ref id="source" name="source"></tt> <em/filename/
 <item>
-<tt><ref id="lists" name="subscribe"></tt> <em/address/ &lsqb; <em/address/ ... &rsqb; 
+<tt><ref id="spam" name="spam"></tt> <em/pattern/ <em/format/
+<item>
+<tt><ref id="spam" name="nospam"></tt> <em/pattern/
+<item>
+<tt><ref id="lists" name="subscribe"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb; 
 <item>
-<tt><ref id="lists" name="unsubscribe"></tt> <em/address/ &lsqb; <em/address/ ... &rsqb; 
+<tt><ref id="lists" name="unsubscribe"></tt> <em/regexp/ &lsqb; <em/regexp/ ... &rsqb; 
 <item>
 <tt><ref id="set" name="toggle"></tt> <em/variable/ &lsqb;<em/variable/ ... &rsqb;
 <item>