bogoutil 1
bogoutil Dumps, loads, and maintains bogofilter database files
`bogoutil` options -d -l -m -w -p file.db where `option` is -v -n -a age -c count -s min,max -y date `bogoutil` -R `bogoutil` -h -V

## DESCRIPTION

Bogoutil is part of the bogofilter Bayesian spam filter package.

It is used to dump and load bogofilter's Berkeley DB databases to and from text files, perform database maintenance functions, and to display the values for specific words.

## OPTIONS

The `-d` option tells bogoutil to print the contents of the specified database file to `stdout`.

The `-l` option tells bogoutil to load the data from `stdin` into the specified database file.

The `-m` option tell bogoutil 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.

The `-w` option tells bogoutil to display the value of one or more tokens in one or more databases. `-w` takes an argument, which is either the name of a wordlist or the name of a directory containing spamlist.db and goodlist.db. Tokens can be listed on the command line or piped to bogoutil. When there are extra arguments on the command line, bogoutil will use them as the tokens to lookup. If there are no extra arguments, bogoutil will read tokens from `stdin`. When `file.db` is the path to a database file, the tokens will be looked up in the database and the value for each token will be displayed. When `file.db` is a directory name, each token will be looked up in both spamlist.db and goodlist.db and the values will be displayed.

The `-p` option adds a column of probabilities to the output of the `-w` option.

The `-v` option produces verbose output on `stderr`. This option is primarily useful for debugging.

Option `-n` 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.

Option `-a age` 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 `age` days.

Option `-c min` indicates that tokens with counts less than `min` are to be discarded.

Option `-s min,max` is used to discard tokens based on their size, i.e. length. All tokens shorter than `min` or longer than `max` will be discarded.

Option `-y date` is specifies the date to give to tokens that don't have dates.

The `-h` option prints the help message and exits.

The `-V` option prints the version number and exits.

## DATA FORMAT

Bogoutil 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.

## RETURN VALUES

0 for successful operation. 1 for most errors. 2 for I/O or other errors. Error 2 usually means that something is seriously wrong with the database files.

## AUTHOR

Gyepi Sam gyepi@praxis-sw.com.

Matthias Andree matthias.andree@gmx.de.

David Relson relson@osagesoftware.com.

For updates, see the bogofilter project page.