<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>bogofilter</title><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="refentry"><a name="bogofilter.1"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>bogofilter &#8212; fast Bayesian spam filter</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">bogofilter</code>  [ help options  |   classification options  |   registration options  |   parameter options  |   info options ] [general options] [config file options]</p></div><p>where</p><p><code class="option">help options</code> are:</p><div class="cmdsynopsis"><p>[-h] [--help] [-V] [-Q]</p></div><p><code class="option">classification options</code> are:</p><div class="cmdsynopsis"><p>[-p] [-e] [-t] [-T] [-u] [-H] [-M] [-b] [-B <em class="replaceable"><code>object ...</code></em>] [-R] [general options] [parameter options] [config file options]</p></div><p><code class="option">registration options</code> are:</p><div class="cmdsynopsis"><p>[ -s  |   -n ] [ -S  |   -N ] [general options]</p></div><p><code class="option">general options</code> are:</p><div class="cmdsynopsis"><p>[-c <em class="replaceable"><code>filename</code></em>] [-C] [-d <em class="replaceable"><code>dir</code></em>] [-k <em class="replaceable"><code>cachesize</code></em>] [-l] [-L <em class="replaceable"><code>tag</code></em>] [-I <em class="replaceable"><code>filename</code></em>] [-O <em class="replaceable"><code>filename</code></em>]</p></div><p><code class="option">parameter options</code> are:</p><div class="cmdsynopsis"><p>[-E <em class="replaceable"><code>value[<span class="optional">,value</span>]</code></em>] [-m <em class="replaceable"><code>value[<span class="optional">,value</span>][<span class="optional">,value</span>]</code></em>] [-o <em class="replaceable"><code>value[<span class="optional">,value</span>]</code></em>]</p></div><p><code class="option">info options</code> are:</p><div class="cmdsynopsis"><p>[-v] [-y <em class="replaceable"><code>date</code></em>] [-D] [-x <em class="replaceable"><code>flags</code></em>]</p></div><p><code class="option">config file options</code> are:</p><div class="cmdsynopsis"><p>[--<em class="replaceable"><code>option=value</code></em>]</p></div><p>Note:  Use <span class="command"><strong>bogofilter --help</strong></span> to display
    the complete list of options.</p></div><div class="refsect1"><a name="description"></a><h2>DESCRIPTION</h2><p><span class="application">Bogofilter</span> is a Bayesian spam filter.
In its normal mode of operation, it takes an email message or other
text on standard input, does a statistical check against lists of
"good" and "bad" words, and returns a status code indicating whether
or not the message is spam.  <span class="application">Bogofilter</span> is
designed with a fast algorithm, uses the Berkeley DB for fast startup
and lookups, coded directly in C, and tuned for speed, so it can be
used for production by sites that process a lot of mail.</p></div><div class="refsect1"><a name="theory"></a><h2>THEORY OF OPERATION</h2><p><span class="application">Bogofilter</span> treats its input as a bag
of tokens.  Each token is checked against a wordlist, which maintains
counts of the numbers of times it has occurred in non-spam and spam
mails.  These numbers are used to compute an estimate of the
probability that a message in which the token occurs is spam.  Those are
combined to indicate whether the message is spam or ham.</p><p>While this method sounds crude compared to the more usual
pattern-matching approach, it turns out to be extremely effective.
Paul Graham's paper <a class="ulink" href="http://www.paulgraham.com/spam.html" target="_top">
A Plan For Spam</a> is recommended reading.</p><p>This program substantially improves on Paul's proposal by doing
smarter lexical analysis.  <span class="application">Bogofilter</span> does
proper MIME decoding and a reasonable HTML parsing.  Special kinds of
tokens like hostnames and IP addresses are retained as recognition
features rather than broken up.  Various kinds of MTA cruft such as
dates and message-IDs are ignored so as not to bloat the wordlist.
Tokens found in various header fields are marked appropriately.</p><p>Another improvement is that this program offers Gary Robinson's
suggested modifications to the calculations (see the parameters robx
and robs below).  These modifications are described in Robinson's
paper <a class="ulink" href="http://radio-weblogs.com/0101454/stories/2002/09/16/spamDetection.html" target="_top">Spam
Detection</a>.</p><p>Since then, Robinson (see his Linux Journal article <a class="ulink" href="http://www.linuxjournal.com/article/6467" target="_top">A Statistical
Approach to the Spam Problem</a>) and others have realized that
the calculation can be further optimized using Fisher's method.
<a class="ulink" href="http://www.garyrobinson.net/2004/04/improved%5fchi.html" target="_top">Another
improvement</a> compensates for token redundancy by applying separate
effective size factors (ESF) to spam and nonspam probability calculations.
</p><p>In short, this is how it works: The estimates for the spam
probabilities of the individual tokens are combined using the "inverse
chi-square function".  Its value indicates how badly the null
hypothesis that the message is just a random collection of independent
words with probabilities given by our previous estimates fails.  This
function is very sensitive to small probabilities (hammish words), but
not to high probabilities (spammish words); so the value only
indicates strong hammish signs in a message. Now using inverse
probabilities for the tokens, the same computation is done again,
giving an indicator that a message looks strongly spammish.  Finally,
those two indicators are subtracted (and scaled into a 0-1-interval).
This combined indicator (bogosity) is close to 0 if the signs for a
hammish message are stronger than for a spammish message and close to
1 if the situation is the other way round.  If signs for both are
equally strong, the value will be near 0.5.  Since those message don't
give a clear indication there is a tristate mode in
<span class="application">bogofilter</span> to mark those messages as
unsure, while the clear messages are marked as spam or ham,
respectively.  In two-state mode, every message is marked as either
spam or ham.</p><p>Various parameters influence these calculations, the most
important are:</p><p>robx: the score given to a token which has not seen before.
robx is the probability that the token is spammish.</p><p>robs: a weight on robx which moves the probability of a little seen
token towards robx.</p><p>min-dev: a minimum distance from .5 for tokens to use in the
calculation.  Only tokens farther away from 0.5 than this value are
used.</p><p>spam-cutoff: messages with scores greater than or equal to will
be marked as spam.</p><p>ham-cutoff: If zero or spam-cutoff, all messages with values
strictly below spam-cutoff are marked as ham, all others as spam
(two-state).  Else values less than or equal to ham-cutoff are marked
as ham, messages with values strictly between ham-cutoff and
spam-cutoff are marked as unsure; the rest as spam (tristate)</p><p>sp-esf: the effective size factor (ESF) for spam.</p><p>ns-esf: the ESF for nonspam.  These ESF values default to 1.0,
which is the same as not using ESF in the calculation.  Values suitable
to a user's email population can be determined with the aid of the
<span class="application">bogotune</span> program.</p></div><div class="refsect1"><a name="options"></a><h2>OPTIONS</h2><p>HELP OPTIONS</p><p>The <code class="option">-h</code> option prints the help message and exits.</p><p>The <code class="option">-V</code> option prints the version number and
exits.</p><p>The <code class="option">-Q</code> (query) option prints
<span class="application">bogofilter</span>'s configuration, i.e. registration
parameters, parsing options, <span class="application">bogofilter</span>
directory, etc.</p><p>CLASSIFICATION OPTIONS</p><p>The <code class="option">-p</code> (passthrough) option outputs the message
with an X-Bogosity line at the end of the message header.  This
requires keeping the entire message in memory when it's read from
stdin (or from a pipe or socket).  If the message is read from a file
that can be rewound, <span class="application">bogofilter</span> will read it
a second time.</p><p>The <code class="option">-e</code> (embed) option tells
<span class="application">bogofilter</span> to exit with code 0 if the
message can be classified, i.e. if there is not an error.  Normally
<span class="application">bogofilter</span> uses different codes for spam, ham,
and unsure classifications, but this simplifies using
<span class="application">bogofilter</span> with
<span class="application">procmail</span> or
<span class="application">maildrop</span>.</p><p>The <code class="option">-t</code> (terse) option tells
<span class="application">bogofilter</span> to print an abbreviated
spamicity message containing 1 letter and the score.  Spam is
indicated with "Y", ham by "N", and unsure by "U".  Note: the
formatting can be customized using the config file.</p><p>The <code class="option">-T</code> provides an invariant terse mode for
scripts to use.  <span class="application">bogofilter</span> will print an
abbreviated spamicity message containing 1 letter and the score.  Spam
is indicated with "S", ham by "H", and unsure by "U".</p><p>The <code class="option">-TT</code> provides an invariant terse mode for
scripts to use.  <span class="application">Bogofilter</span> prints only the
score and displays it to 16 significant digits.</p><p>The <code class="option">-u</code> option tells
<span class="application">bogofilter</span> to register the message's text
after classifying it as spam or non-spam.  A spam message will be
registered on the spamlist and a non-spam message on the goodlist.  If
the classification is "unsure", the message will not be registered.
Effectively this option runs <span class="application">bogofilter</span>
with the <code class="option">-s</code> or <code class="option">-n</code> flag, as
appropriate.  Caution is urged in the use of this capability, as any
classification errors <span class="application">bogofilter</span> may make
will be preserved and will accumulate until manually corrected with
the <code class="option">-Sn</code> and <code class="option">-Ns</code> option
combinations.  Note this option causes the database to be opened for
write access, which can entail massive slowdowns through
lock contention and synchronous I/O operations.</p><p>The <code class="option">-H</code> option tells
<span class="application">bogofilter</span> to not tag tokens from the
header. This option is for testing, you should not use it in normal
operation.</p><p>The <code class="option">-M</code> option tells
<span class="application">bogofilter</span> to process its input as a mbox
formatted file.  If the <code class="option">-v</code> or <code class="option">-t</code>
option is also given, a spamicity line will be printed for each
message.</p><p>The <code class="option">-b</code> (streaming bulk mode) option tells
<span class="application">bogofilter</span> to classify multiple objects
whose names are read from stdin.  If the <code class="option">-v</code> or
<code class="option">-t</code> option is also given,
<span class="application">bogofilter</span> will print a line giving file
name and classification information for each file.  This is an alternative to 
<code class="option">-B</code> which lists objects on the command line.</p><p>An object in this context shall be a maildir (autodetected), or
if it's not a maildir, a single mail unless <code class="option">-M</code> is
given - in that case it's processed as mbox.  (The Content-Length:
header is not taken into account currently.)</p><p>When reading mbox format, <span class="application">bogofilter</span>
relies on the empty line after a mail.  If needed,
<span class="command"><strong>formail -es</strong></span> will ensure this is the case.</p><p>The <code class="option">-B <em class="replaceable"><code>object ...</code></em></code>
(bulk mode) option tells <span class="application">bogofilter</span> to
classify multiple objects named on the command line.  The objects may
be filenames (for single messages), mailboxes (files with multiple
messages), or directories (of maildir and MH format).  If the
<code class="option">-v</code> or <code class="option">-t</code> option is also given,
<span class="application">bogofilter</span> will print a line giving file
name and classification information for each file.  This is an alternative to 
<code class="option">-b</code> which lists objects on stdin.</p><p>The <code class="option">-R</code> option tells
<span class="application">bogofilter</span> to output an R data frame in
text form on the standard output.  See the section on integration with
R, below, for further detail.</p><p>REGISTRATION OPTIONS</p><p>The <code class="option">-s</code> option tells
<span class="application">bogofilter</span> to register the text presented
as spam.  The database is created if absent.</p><p>The <code class="option">-n</code> option tells
<span class="application">bogofilter</span> to register the text presented
as non-spam.</p><p><span class="application">Bogofilter</span> doesn't detect if a message
registered twice.  If you do this by accident, the token counts will off by 1
from what you really want and the corresponding spam scores will be slightly
off.  Given a large number of tokens and messages in the wordlist, this
doesn't matter.  The problem <span class="emphasis"><em>can</em></span> be corrected by using
the <code class="option">-S</code> option or the <code class="option">-N</code> option.</p><p>The <code class="option">-S</code> option tells <span class="application">bogofilter</span>
to undo a prior registration of the same message as spam.  If a message was
incorrectly entered as spam by <code class="option">-s</code> or <code class="option">-u</code>
and you want to remove it and enter it as non-spam, use <code class="option">-Sn</code>.
If <code class="option">-S</code> is used for a message that wasn't registered as spam,
the counts will still be decremented.</p><p>The <code class="option">-N</code> option tells <span class="application">bogofilter</span>
to undo a prior registration of the same message as non-spam.  If a message was
incorrectly entered as non-spam by <code class="option">-n</code> or <code class="option">-u</code>
and you want to remove it and enter it as spam, then use <code class="option">-Ns</code>.
If <code class="option">-N</code> is used for a message that wasn't registered as non-spam,
the counts will still be decremented.</p><p>GENERAL OPTIONS</p><p>The <code class="option">-c <em class="replaceable"><code>filename</code></em></code>
option tells <span class="application">bogofilter</span> to read the config
file named.</p><p>The <code class="option">-C</code> option prevents
<span class="application">bogofilter</span> from reading configuration
files.</p><p>The <code class="option">-d <em class="replaceable"><code>dir</code></em></code> option
allows you to set the directory for the database.  See the ENVIRONMENT
section for other directory setting options.</p><p>The <code class="option">-k <em class="replaceable"><code>cachesize</code></em></code> option
sets the cache size for the BerkeleyDB subsystem, in units of 1 MiB (1,048,576
bytes).  Properly sizing the cache improves
<span class="application">bogofilter</span>'s performance.  The recommended
size is one third of the size of the database file.  You can run the
<span class="application">bogotune</span> script (in the tuning directory) to
determine the recommended size.</p><p>The <code class="option">-l</code> option writes an informational line to
the system log each time <span class="application">bogofilter</span> is run.
The information logged depends on how
<span class="application">bogofilter</span> is run.</p><p>The <code class="option">-L <em class="replaceable"><code>tag</code></em></code> option
configures a tag which can be included in the information being logged
by the <code class="option">-l</code> option, but it requires a custom format
that includes the %l string for now.  This option implies
<code class="option">-l</code>.</p><p>The <code class="option">-I <em class="replaceable"><code>filename</code></em></code>
option tells <span class="application">bogofilter</span> to read its input
from the specified file, rather than from
<code class="option">stdin</code>.</p><p>The <code class="option">-O <em class="replaceable"><code>filename</code></em></code> option
tells <span class="application">bogofilter</span> where to write its output in
passthrough mode.  Note that this only works when -p is explicitly given.</p><p>PARAMETER OPTIONS</p><p>The <code class="option">-E
      <em class="replaceable"><code>value[<span class="optional">,value</span>]</code></em></code>
      option allows setting the sp-esf value and the ns-esf value.
      With two values, both sp-esf and ns-esf are set.  If only one
      value is given, parameters are set as described in the note
      below.</p><p>The <code class="option">-m
      <em class="replaceable"><code>value[<span class="optional">,value</span>][<span class="optional">,value</span>]</code></em></code>
      option allows setting the min-dev value and, optionally, the
      robs and robx values.  With three values, min-dev, robs, and
      robx are all set.  If fewer values are given, parameters are set
      as described in the note below.</p><p>The <code class="option">-o
      <em class="replaceable"><code>value[<span class="optional">,value</span>]</code></em></code>
      option allows setting the spam-cutoff ham-cutoff values.  With
      two values, both spam-cutoff and ham-cutoff are set.  If only
      one value is given, parameters are set as described in the note
      below.</p><p>Note: All of these options allow fewer values to be provided.
     Values can be skipped by using just the comma delimiter, in which
     case the corresponding parameter(s) won't be changed.  If only
     the first value is provided, then only the first parameter is
     set.  Trailing values can be skipped, in which case the
     corresponding parameters won't be changed.  Within the parameter
     list, spaces are not allowed after commas.</p><p>INFO OPTIONS</p><p>The <code class="option">-v</code> option produces a report to standard
output on <span class="application">bogofilter</span>'s analysis of the
input.  Each additional <code class="option">v</code> will increase the verbosity of
the output, up to a maximum of 4.  With <code class="option">-vv</code>, the report
lists the tokens with highest deviation from a mean of 0.5 association
with spam.</p><p>Option <code class="option">-y date</code> can be used to override the
current date when timestamping tokens.  A value of zero (0) turns off
timestamping.</p><p>The <code class="option">-D</code> option redirects debug output to
stdout.</p><p>The <code class="option">-x <em class="replaceable"><code>flags</code></em></code> option
allows setting of debug flags for printing debug information.  See
header file debug.h for the list of usable flags.</p><p>CONFIG FILE OPTIONS</p><p>Using GNU longopt <code class="option">--</code> syntax, a config file's
<code class="option"><em class="replaceable"><code>name=value</code></em></code> statement
becomes a command line's
<code class="option">--<em class="replaceable"><code>option=value</code></em></code>.  Use
command <span class="command"><strong>bogofilter --help</strong></span> for a list of options and
see <code class="filename">bogofilter.cf.example</code> for more info on
them. For example to change the X-Bogosity header to "X-Spam-Header", use:</p><p>
<code class="option"><em class="replaceable"><code>--spam-header-name=X-Spam-Header</code></em></code>
</p></div><div class="refsect1"><a name="environment"></a><h2>ENVIRONMENT</h2><p><span class="application">Bogofilter</span> uses a database directory,
which can be set in the config file.  If not set there,
<span class="application">bogofilter</span> will use the value of
<code class="envar">BOGOFILTER_DIR</code>.  Both can be overridden by the
<code class="option">-d <em class="replaceable"><code>dir</code></em></code> option.  If none of
that is available, <span class="application">bogofilter</span> will use directory
<code class="filename">$HOME/.bogofilter</code>.</p></div><div class="refsect1"><a name="configuration"></a><h2>CONFIGURATION</h2><p>The <span class="application">bogofilter</span> command line allows
setting of many options that determine how
<span class="application">bogofilter</span> operates.  File
<code class="filename">@sysconfdir@/bogofilter.cf</code> can be used to set
additional parameters that affect its operation.  File
<code class="filename">@sysconfdir@/bogofilter.cf.example</code> has samples of
all of the parameters.  Status and logging messages can be customized
for each site.</p></div><div class="refsect1"><a name="returns"></a><h2>RETURN VALUES</h2><p>0 for spam; 1 for non-spam; 2 for unsure ; 3 for I/O or other errors.</p><p>If both <code class="option">-p</code> and <code class="option">-e</code> are used, the
    return values are: 0 for spam or non-spam; 3 for I/O or other
    errors.</p><p>Error 3 usually means that the wordlist file
<span class="application">bogofilter</span> wants to read at startup
is missing or the hard disk has filled up in <code class="option">-p</code> mode.</p></div><div class="refsect1"><a name="integration"></a><h2>INTEGRATION WITH OTHER TOOLS</h2><p>Use with procmail</p><p>The following recipe (a) spam-bins anything that
<span class="application">bogofilter</span> rates as spam, (b) registers the
words in messages rated as spam as such, and (c) registers the
words in messages rated as non-spam as such.  With
this in place, it will normally only be necessary for the user to
intervene (with <code class="option">-Ns</code> or <code class="option">-Sn</code>) when
<span class="application">bogofilter</span> miscategorizes something.</p><pre class="programlisting">
<em class="lineannotation"><span class="lineannotation">
# filter mail through bogofilter, tagging it as Ham, Spam, or Unsure,
# and updating the wordlist
</span></em>
:0fw
| bogofilter -u -e -p

<em class="lineannotation"><span class="lineannotation">
# if bogofilter failed, return the mail to the queue;
# the MTA will retry to deliver it later
# 75 is the value for EX_TEMPFAIL in /usr/include/sysexits.h
</span></em>
:0e
{ EXITCODE=75 HOST }

<em class="lineannotation"><span class="lineannotation">
# file the mail to <code class="filename">spam-bogofilter</code> if it's spam.
</span></em>
:0:
* ^X-Bogosity: Spam, tests=bogofilter
spam-bogofilter
<em class="lineannotation"><span class="lineannotation">
# file the mail to <code class="filename">unsure-bogofilter</code> 
# if it's neither ham nor spam.
</span></em>
:0:
* ^X-Bogosity: Unsure, tests=bogofilter
unsure-bogofilter

# With this recipe, you can train bogofilter starting with an empty
# wordlist.  Be sure to check your unsure-folder regularly, take the
# messages out of it, classify them as ham (or spam), and use them to
# train bogofilter.

</pre><p>The following procmail rule will take mail on stdin and save
it to file <code class="filename">spam</code> if
<span class="application">bogofilter</span> thinks it's spam:
</p><pre class="programlisting">:0HB:
* ? bogofilter
spam
</pre><p>

and this similar rule will also register the tokens in the mail
according to the <span class="application">bogofilter</span> classification:

</p><pre class="programlisting">:0HB:
* ? bogofilter -u
spam
</pre><p>
</p><p>If <span class="application">bogofilter</span> fails (returning 3) the
message will be treated as non-spam.</p><p>This one is for <span class="application">maildrop</span>, it
    automatically defers the mail and retries later when the
    <span class="application">xfilter</span> command fails, use this in your
    <code class="filename">~/.mailfilter</code>:</p><pre class="programlisting">xfilter "bogofilter -u -e -p"
if (/^X-Bogosity: Spam, tests=bogofilter/)
{
  to "spam-bogofilter"
}
</pre><p>The following <code class="filename">.muttrc</code> lines will create
mutt macros for dispatching mail to
<span class="application">bogofilter</span>.</p><pre class="programlisting">macro index d "&lt;enter-command&gt;unset wait_key\n\
&lt;pipe-entry&gt;bogofilter -n\n\
&lt;enter-command&gt;set wait_key\n\
&lt;delete-message&gt;" "delete message as non-spam"
macro index \ed "&lt;enter-command&gt;unset wait_key\n\
&lt;pipe-entry&gt;bogofilter -s\n\
&lt;enter-command&gt;set wait_key\n\
&lt;delete-message&gt;" "delete message as spam"
</pre><p>Integration with Mail Transport Agent (MTA)</p><div class="procedure"><ol class="procedure" type="1"><li class="step"><p><span class="application">bogofilter</span> can also be integrated into an MTA
  to filter all incoming mail.  While the specific implementation is MTA dependent, the
  general steps are as follows:</p></li><li class="step"><p>Install <span class="application">bogofilter</span> on the mail server</p></li><li class="step"><p>Prime the <span class="application">bogofilter</span> databases with a spam
and non-spam corpus.  Since <span class="application">bogofilter</span> will be
serving a larger community, it is important to prime it with a representative
set of messages.</p></li><li class="step"><p>Set up the MTA to invoke <span class="application">bogofilter</span> on each
   message.  While this is an MTA specific step, you'll probably need to use the
   <code class="option">-p</code>, <code class="option">-u</code>, and <code class="option">-e</code> options.</p></li><li class="step"><p>Set up a mechanism for users to register spam/non-spam messages,
 as well as to correct mis-classifications.
 The most generic solution is to set up alias email addresses to which
 users bounce messages.</p></li><li class="step"><p>See the <code class="filename">doc</code> and <code class="filename">contrib</code> directories
   for more information.</p></li></ol></div><p>Use of R to verify <span class="application">bogofilter</span>'s
calculations</p><p>The -R option tells <span class="application">bogofilter</span> to
generate an R data frame.  The data frame contains one row per token
analyzed.  Each such row contains the token, the sum of its database
"good" and "spam" counts, the "good" count divided by the number of
non-spam messages used to create the training database, the "spam"
count divided by the spam message count, Robinson's f(w) for the token,
the natural logs of (1 - f(w)) and f(w), and an indicator character (+
if the token's f(w) value exceeded the minimum deviation from 0.5, - if
it didn't).  There is one additional row at the end of the table that
contains a label in the token field, followed by the number of words
actually used (the ones with + indicators), Robinson's P, Q, S, s and x
values and the minimum deviation.</p><p>The R data frame can be saved to a file and later read
into an R session (see <a class="ulink" href="http://cran.r-project.org/" target="_top">the R
project website</a> for information about the mathematics package
R).  Provided with the <span class="application">bogofilter</span>
distribution is a simple R script (file bogo.R) that can be used to
verify <span class="application">bogofilter</span>'s calculations.
Instructions for its use are included in the script in the form of
comments.</p></div><div class="refsect1"><a name="logmessages"></a><h2>Log messages</h2><p><span class="application">Bogofilter</span> writes messages to the system log
    when the <code class="option">-l</code> option is used.  What is written depends on
    which other flags are used.</p><p>A classification run will generate (we are not showing the date
    and host part here):
    </p><pre class="screen">
bogofilter[1412]: X-Bogosity: Ham, spamicity=0.000227
bogofilter[1415]: X-Bogosity: Spam, spamicity=0.998918
</pre><p>Using <code class="option">-u</code> to classify a message and update a wordlist
    will produce (one a single line):
    </p><pre class="screen">
bogofilter[1426]: X-Bogosity: Spam, spamicity=0.998918,
  register -s, 329 words, 1 messages
    </pre><p>Registering words (<code class="option">-l</code> and <code class="option">-s</code>,
    <code class="option">-n</code>, <code class="option">-S</code>, or <code class="option">-N</code>) will produce:
    </p><pre class="screen">
bogofilter[1440]: register-n, 255 words, 1 messages
</pre><p>A registration run (using <code class="option">-s</code>, <code class="option">-n</code>,
    <code class="option">-N</code>, or <code class="option">-S</code>) will generate messages like:
</p><pre class="screen">
bogofilter[17330]: register-n, 574 words, 3 messages
bogofilter[6244]: register-s, 1273 words, 4 messages
</pre></div><div class="refsect1"><a name="files"></a><h2>FILES</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><code class="filename">@sysconfdir@/bogofilter.cf</code></span></dt><dd><p>System configuration file.</p></dd><dt><span class="term"><code class="filename">~/.bogofilter.cf</code></span></dt><dd><p>User configuration file.</p></dd><dt><span class="term"><code class="filename">~/.bogofilter/wordlist.db</code></span></dt><dd><p>Combined list of good and spam tokens.</p></dd></dl></div></div><div class="refsect1"><a name="author"></a><h2>AUTHOR</h2><div class="literallayout"><p><br>
Eric&nbsp;S.&nbsp;Raymond&nbsp;<code class="email">&lt;<a class="email" href="mailto:esr@thyrsus.com">esr@thyrsus.com</a>&gt;</code>.<br>
David&nbsp;Relson&nbsp;<code class="email">&lt;<a class="email" href="mailto:relson@osagesoftware.com">relson@osagesoftware.com</a>&gt;</code>.<br>
Matthias&nbsp;Andree&nbsp;<code class="email">&lt;<a class="email" href="mailto:matthias.andree@gmx.de">matthias.andree@gmx.de</a>&gt;</code>.<br>
Greg&nbsp;Louis&nbsp;<code class="email">&lt;<a class="email" href="mailto:glouis@dynamicro.on.ca">glouis@dynamicro.on.ca</a>&gt;</code>.<br>
</p></div><p>For updates, see the <a class="ulink" href="http://bogofilter.sourceforge.net/" target="_top">
    bogofilter project page</a>.</p></div><div class="refsect1"><a name="also"></a><h2>SEE ALSO </h2><p>bogolexer(1), bogotune(1), bogoupgrade(1), bogoutil(1)</p></div></div></body></html>
