+ \e[1m3.24. Spam detection\e[0m
+
+ Usage: spam \e[4mpattern\e[24m \e[4mformat\e[0m
+ Usage: nospam \e[4mpattern\e[0m
+
+ Mutt has generalized support for external spam-scoring filters. By
+ defining your spam patterns with the spam and nospam commands, you can
+ \e[4mlimit\e[24m, \e[4msearch\e[24m, and \e[4msort\e[24m 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 %H selector in the
+ ``$index_format'' variable. (Tip: try %?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 spam command. \e[4mpattern\e[24m 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 nospam pattern -- see
+ below.) The appearance of this attribute is entirely up to you, and is
+ governed by the \e[4mformat\e[24m parameter. \e[4mformat\e[24m can be any static text, but
+ it also can include back-references from the \e[4mpattern\e[24m expression. (A
+ regular expression ``back-reference'' refers to a sub-expression
+ contained within parentheses.) %1 is replaced with the first back-
+ reference in the regex, %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 spam patterns for each filter
+ you use. If a message matches two or more of these patterns, and the
+ $spam_separator variable is set to a string, then the message's spam
+ tag will consist of all the \e[4mformat\e[24m strings joined together, with the
+ value of $spam_separator separating them.
+
+ For example, suppose I use DCC, SpamAssassin, and PureMessage. I might
+ define these spam settings:
+
+ 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=", "
+
+ 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
+ 90+/DCC-Fuz2, 97/PM. (The four characters before ``=many'' in a DCC
+ report indicate the checksum used -- in this case, ``Fuz2''.)
+
+ If the $spam_separator variable is unset, then each spam pattern match
+ supercedes the previous one. Instead of getting joined \e[4mformat\e[24m strings,
+ you'll get only the last one to match.
+
+ The spam tag is what will be displayed in the index when you use %H in
+ the $index_format variable. It's also the string that the ~H pattern-
+ matching expression matches against for \e[4msearch\e[24m and \e[4mlimit\e[24m 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 \e[4mlexically\e[24m -- 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 sort -n.) A
+ message with no spam attributes at all -- that is, one that didn't
+ match \e[4many\e[24m of your 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 nospam command can be used to write exceptions to spam patterns.
+ If a header pattern matches something in a spam command, but you
+ nonetheless do not want it to receive a spam tag, you can list a more
+ precise pattern under a nospam command.
+
+ If the \e[4mpattern\e[24m given to nospam is exactly the same as the \e[4mpattern\e[24m on
+ an existing spam list entry, the effect will be to remove the entry
+ from the spam list, instead of adding an exception. Likewise, if the
+ \e[4mpattern\e[24m for a spam command matches an entry on the nospam list, that
+ nospam entry will be removed. If the \e[4mpattern\e[24m for nospam is ``*'', \e[4mall\e[0m
+ \e[4mentries\e[24m \e[4mon\e[24m \e[4mboth\e[24m \e[4mlists\e[24m will be removed. This might be the default
+ action if you use spam and nospam in conjunction with a folder-hook.
+
+ You can have as many spam or nospam commands as you like. You can
+ even do your own primitive spam detection within mutt -- for example,
+ if you consider all mail from MAILER-DAEMON to be spam, you can use a
+ spam command like this:
+
+ spam "^From: .*MAILER-DAEMON" "999"
+
+ \e[1m3.25. Setting variables\e[0m
+
+ Usage: set [no|inv]\e[4mvariable\e[24m[=\e[4mvalue\e[24m] [ \e[4mvariable\e[24m ... ]
+ Usage: toggle \e[4mvariable\e[24m [\e[4mvariable\e[24m ... ]
+ Usage: unset \e[4mvariable\e[24m [\e[4mvariable\e[24m ... ]
+ Usage: reset \e[4mvariable\e[24m [\e[4mvariable\e[24m ... ]