Blame doc/bogoutil.xml

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