<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>bogoutil</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="bogoutil.1"></a><div class="titlepage"></div><div class="refnamediv"><a name="name"></a><h2>Name</h2><p>bogoutil — Dumps, loads, and maintains
<span class="application">bogofilter</span> database files</p></div><div class="refsynopsisdiv"><a name="synopsis"></a><h2>Synopsis</h2><div class="cmdsynopsis"><p><code class="command">bogoutil</code> { -h | -V }</p></div><div class="cmdsynopsis"><p><code class="command">bogoutil</code> [options] { -d <em class="replaceable"><code>file</code></em> | -H <em class="replaceable"><code>file</code></em> | -l <em class="replaceable"><code>file</code></em> | -m <em class="replaceable"><code>file</code></em> | -w <em class="replaceable"><code>file</code></em> | -p <em class="replaceable"><code>file</code></em> }</p></div><div class="cmdsynopsis"><p><code class="command">bogoutil</code> { -r <em class="replaceable"><code>file</code></em> | -R <em class="replaceable"><code>file</code></em> }</p></div><div class="cmdsynopsis"><p><code class="command">bogoutil</code> { --db-print-leafpage-count <em class="replaceable"><code>file</code></em> | --db-print-pagesize <em class="replaceable"><code>file</code></em> | --db-verify <em class="replaceable"><code>file</code></em> | --db-checkpoint
<em class="replaceable"><code>directory</code></em> [flag...] | --db-list-logfiles <em class="replaceable"><code>directory</code></em> | --db-prune <em class="replaceable"><code>directory</code></em> | --db-recover <em class="replaceable"><code>directory</code></em> | --db-recover-harder <em class="replaceable"><code>directory</code></em> | --db-remove-environment <em class="replaceable"><code>directory</code></em> }</p></div><p>where <code class="option">options</code> is</p><div class="cmdsynopsis"><p><code class="command">bogoutil</code> [-v] [-n] [-C] [-D] [-a <em class="replaceable"><code>age</code></em>] [-c <em class="replaceable"><code>count</code></em>] [-s <em class="replaceable"><code>min,max</code></em>] [-y <em class="replaceable"><code>date</code></em>] [-I <em class="replaceable"><code>file</code></em>] [-O <em class="replaceable"><code>file</code></em>] [-x <em class="replaceable"><code>flags</code></em>] [--config-file <em class="replaceable"><code>file</code></em>]</p></div></div><div class="refsect1"><a name="description"></a><h2>DESCRIPTION</h2><p><span class="application">Bogoutil</span> is part of the
<span class="application">bogofilter</span> Bayesian spam filter package.</p><p>It is used to dump and load <span class="application">bogofilter</span>'s
Berkeley DB databases to and from text files, perform database maintenance
functions, and to display the values for specific words.</p></div><div class="refsect1"><a name="options"></a><h2>OPTIONS</h2><p>
The <code class="option">-d <em class="replaceable"><code>file</code></em></code>
option tells <span class="application">bogoutil</span> to print
the contents of the database file to <code class="option">stdout</code>.
</p><p>
The <code class="option">-H <em class="replaceable"><code>file</code></em></code>
option tells <span class="application">bogoutil</span> to print
a histogram of the database file to
<code class="option">stdout</code>. The output is similar to
<span class="application">bogofilter -vv</span>. Finally,
hapaxes (tokens which were only seen once) and pure tokens
(tokens which were encountered only in ham or only in
spam) are counted.
</p><p>
The <code class="option">-l <em class="replaceable"><code>file</code></em></code>
option tells <span class="application">bogoutil</span>
to load the data from <code class="option">stdin</code> into the database file.
If the database file exists, <code class="option">stdin</code> data is
merged into the database file, with counts added up.
</p><p>The <code class="option">-m</code> option tells <span class="application">bogoutil</span>
to perform maintenance functions on the specified database, i.e. discard tokens
that are older than desired, have counts that are too small, or sizes (lengths)
that are too long or too short.
</p><p>
The <code class="option">-w <em class="replaceable"><code>file</code></em></code>
option tells <span class="application">bogoutil</span> to
display token information from the database file. The option
takes an argument, which is either the name of the
wordlist (usually wordlist.db) or the name of the directory
containing it. Tokens can be listed on the command line
or piped to <span class="application">bogoutil</span>. When
there are extra arguments on the command line,
<span class="application">bogoutil</span> will use them as the
tokens to lookup. If there are no extra arguments,
<span class="application">bogoutil</span> will read tokens from
<code class="option">stdin</code>.
</p><p>
The <code class="option">-p <em class="replaceable"><code>file</code></em></code>
option tells <span class="application">bogoutil</span> to
display the database information for one or more tokens.
The display includes a probability column with the
token's spam score (computed using
<span class="application">bogofilter</span>'s default values).
Option <code class="option">-p</code> takes the same arguments as
option <code class="option">-w</code> .
</p><p>The <code class="option">-r <em class="replaceable"><code>file</code></em></code> option tells
<span class="application">bogoutil</span> to recalculate the ROBX
value and print it as a six-digit fraction.
</p><p>The <code class="option">-R <em class="replaceable"><code>file</code></em></code>
option does the same as <code class="option">-r</code>, but saves the
result in the training database without printing it.
</p><p>The <code class="option">-I <em class="replaceable"><code>file</code></em></code> option tells
<span class="application">bogoutil</span> to read its input from
<em class="replaceable"><code>file</code></em> rather than stdin.
</p><p>The <code class="option">-O <em class="replaceable"><code>file</code></em></code> option tells
<span class="application">bogoutil</span> to write its output to
<em class="replaceable"><code>file</code></em> rather than stdout.
</p><p>
The <code class="option">-v</code> option produces verbose output on <code class="option">stderr</code>.
This option is primarily useful for debugging.
</p><p>The <code class="option">-C</code> inhibits reading configuration
files and lets <span class="application">bogoutil</span> go with the defaults.</p><p>The <code class="option">--config-file
<em class="replaceable"><code>file</code></em></code> option tells
<span class="application">bogoutil</span> to read <em class="replaceable"><code>file</code></em>
instead of the standard configuration file.</p><p>The <code class="option">-D</code> redirects debug output to stdout (it
usually goes to stderr).</p><p>The <code class="option">-x <em class="replaceable"><code>flags</code></em></code>
option sets debugging flags.</p><p>
Option <code class="option">-n</code> stands for "replace non-ascii characters".
It will replace characters with the high bit (0x80) by question marks.
This can be useful if a word list has lots of unreadable tokens, for
example from Asian spam. The "bad" characters will be converted to
question marks and matching tokens will be combined when used with
<code class="option">-m</code> or <code class="option">-l</code>, but not with <code class="option">-d</code>.
</p><p>
Option <code class="option">-a age</code> indicates an acceptable token age, with older ones being discarded.
The age can be a date (in form YYYYMMMDD) or a day count, i.e. discard tokens older than
<code class="option">age</code> days.
</p><p>
Option <code class="option">-c value</code> indicates that tokens with counts less than or equal to <code class="option">value</code>
are to be discarded.
</p><p>
Option <code class="option">-s min,max</code> is used to discard tokens based on their size, i.e. length.
All tokens shorter than <code class="option">min</code> or longer than <code class="option">max</code> will be discarded.
</p><p>
Option <code class="option">-y date</code> is specifies the date to
give to tokens that don't have dates. The format is YYYYMMDD.
</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></div><div class="refsect1"><a name="environment_maintenance"></a><h2>ENVIRONMENT MAINTENANCE</h2><p>The <code class="option">--db-checkpoint <em class="replaceable"><code>dir</code></em></code>
option causes <span class="application">bogoutil</span> to flush the buffer
caches and checkpoint the database environment.</p><p>The <code class="option">--db-list-logfiles
<em class="replaceable"><code>dir</code></em></code>
option causes <span class="application">bogoutil</span> to list the log
files in the environment. Zero or more keywords can be added or
combined (separated by whitespace) to modify the behavior of this
mode. The default behavior is to list only inactive log
files with relative paths. You can add <code class="option">all</code>
to list all log files (inactive and active). You can add
<code class="option">absolute</code> to switch the listing to absolute
paths.
</p><p>The <code class="option">--db-prune <em class="replaceable"><code>dir</code></em></code>
option causes <span class="application">bogoutil</span> to checkpoint
the database environment and remove inactive log files.</p><p>The <code class="option">--db-recover <em class="replaceable"><code>dir</code></em></code>
option runs a regular database recovery
in the specified database directory. If that fails, it will retry
with a (usually slower) catastrophic database recovery. If
that fails, too, your database cannot be repaired and must
be rebuilt from scratch.
This is only supported when compiled with Berkeley DB
support with transactions enabled. Trying recovery with QDBM or SQLite3 support will
result in an error.</p><p>The <code class="option">--db-recover-harder <em class="replaceable"><code>dir</code></em></code>
option runs a catastrophic data
base recovery in the specified database directory. If that fails,
your database cannot be repaired and must be rebuilt from
scratch.
This is only supported when compiled with Berkeley DB
support with transactions enabled. Trying recovery with QDBM or SQLite3 support will
result in an error.</p><p>The <code class="option">--db-remove-environment
<em class="replaceable"><code>directory</code></em></code> option has
no short option equivalent. It runs recovery in the given
directory and then removes the database environment. Use
this <span class="emphasis"><em>before</em></span> upgrading to a new Berkeley
DB version if the new version to be installed requires a log
file format update.</p><p>The <code class="option">--db-print-leafpage-count
<em class="replaceable"><code>file</code></em></code> option prints
the number of leaf pages in the database file
<em class="replaceable"><code>file</code></em> as a decimal number, or
UNKNOWN if the database does not support querying this
figure.</p><p>The <code class="option">--db-print-pagesize
<em class="replaceable"><code>file</code></em></code> option prints
the size of a database page in
<em class="replaceable"><code>file</code></em> as a decimal number, or
UNKNOWN for databases with variable page size or databases
that do not allow a query of the database page size.</p><p>
The <code class="option">--db-verify <em class="replaceable"><code>file</code></em></code>
option requests that <span class="application">bogofilter</span> verifies
the database file. It prints only errors, unless in verbose mode.
</p></div><div class="refsect1"><a name="dataformat"></a><h2>DATA FORMAT</h2><p>
<span class="application">Bogoutil</span> reads and writes text files where each nonblank
line consists of a word, any amount of horizontal whitespace, a numeric word count,
more whitespace, and (optionally) a date in form YYYYMMDD.
Blank lines are skipped.
</p></div><div class="refsect1"><a name="returns"></a><h2>RETURN VALUES</h2><p>
0 for successful operation.
1 for most errors.
3 for I/O or other errors.
Error 3 usually means that something is seriously wrong with the database files.
</p></div><div class="refsect1"><a name="author"></a><h2>AUTHOR</h2><p>Gyepi Sam <code class="email"><<a class="email" href="mailto:gyepi@praxis-sw.com">gyepi@praxis-sw.com</a>></code>.</p><p>Matthias Andree <code class="email"><<a class="email" href="mailto:matthias.andree@gmx.de">matthias.andree@gmx.de</a>></code>.</p><p>David Relson <code class="email"><<a class="email" href="mailto:relson@osagesoftware.com">relson@osagesoftware.com</a>></code>.</p><p>
For updates, see <a class="ulink" href="http://bogofilter.sourceforge.net/" target="_top">
the bogofilter project page</a>.
</p></div><div class="refsect1"><a name="also"></a><h2>SEE ALSO </h2><p>bogofilter(1), bogolexer(1), bogotune(1), bogoupgrade(1)</p></div></div></body></html>