BOGOUTIL(1)
π BOGOUTIL(1) β the bogofilter bestie manual π
okay so bestie, you're reading the BOGOUTIL(1) page from the Bogofilter Reference Manual and honestly? she's a whole vibe. let's get into it. π¦
β¨ NAME β¨
bogoutil β dumps, loads, and maintains bogofilter database files. that's the job. she does it. π
πΈ SYNOPSIS πΈ
bogoutil {-h | -V}
bogoutil [options] {-d file | -H file | -l file | -m file | -w file |
-p file}
bogoutil {-r file | -R file}
bogoutil {--db-print-leafpage-count file | --db-print-pagesize file |
--db-verify file | --db-checkpoint directory [flag...] |
--db-list-logfiles directory | --db-prune directory |
--db-recover directory | --db-recover-harder directory |
--db-remove-environment directory}
where options is
bogoutil [-v] [-n] [-C] [-D] [-a age] [-c count] [-s min,max] [-y date]
[-I file] [-O file] [-x flags] [--config-file file]
π DESCRIPTION π
so bogoutil is part of the bogofilter Bayesian spam filter package. iconic family, love that for her. β¨
what does she actually do? she dumps and loads bogofilter's Berkeley DB databases to and from text files, she does database maintenance functions, and she displays the values for specific words. main character energy fr fr. π
π OPTIONS π
-d fileβ prints the contents of the database file to stdout. dump it, bestie. π€-H fileβ prints a histogram of the database file to stdout. the output is similar tobogofilter -vv. and then β plot twist β hapaxes (tokens which were only seen once) and pure tokens (tokens which were encountered only in ham or only in spam) get counted. π-l fileβ loads the data from stdin into the database file. if the database file already exists, the stdin data gets merged into it, with counts added up. no cap. π«Ά-mβ tellsbogoutilto 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. she's doing a lil spring clean. π§Ή-w fileβ displays token information from the database file. the option takes an argument, which is either the name of the wordlist (usuallywordlist.db) or the name of the directory containing it. tokens can be listed on the command line or piped tobogoutil. when there are extra arguments on the command line,bogoutilwill use them as the tokens to lookup. if there are no extra arguments,bogoutilwill read tokens from stdin. π-p fileβ displays the database information for one or more tokens. the display includes a probability column with the token's spam score (computed using bogofilter's default values). option-ptakes the same arguments as option-w. β¨-r fileβ recalculate the ROBX value and print it as a six-digit fraction. math slay. π’-R fileβ does the same as-r, but saves the result in the training database without printing it. silent but deadly (affectionate). π-I fileβ read its input from file rather than stdin.-O fileβ write its output to file rather than stdout.-vβ produces verbose output on stderr. primarily useful for debugging. she's yapping (helpfully). π£οΈ-Cβ inhibits reading configuration files and letsbogoutilgo with the defaults. default queen. π--config-file fileβ tellsbogoutilto read file instead of the standard configuration file.-Dβ redirects debug output to stdout (it usually goes to stderr).-x flagsβ sets debugging flags.-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 when used with-mor-l, but not with-d. β οΈ-a ageβ indicates an acceptable token age, with older ones being discarded. the age can be a date (in formYYYYMMMDD) or a day count, i.e. discard tokens older than age days.-c valueβ indicates that tokens with counts less than or equal to value are to be discarded.-s min,maxβ used to discard tokens based on their size, i.e. length. all tokens shorter than min or longer than max will be discarded.-y dateβ specifies the date to give to tokens that don't have dates. the format isYYYYMMDD.-hβ prints the help message and exits. π-Vβ prints the version number and exits. π
π ENVIRONMENT MAINTENANCE π
--db-checkpoint dirβ causesbogoutilto flush the buffer caches and checkpoint the database environment. πΎ--db-list-logfiles dirβ causesbogoutilto 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 addallto list all log files (inactive and active). you can addabsoluteto switch the listing to absolute paths. π--db-prune dirβ causesbogoutilto checkpoint the database environment and remove inactive log files. bye bye clutter. π§--db-recover dirβ 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. π--db-recover-harder dirβ 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. π₯--db-remove-environment directoryβ has no short option equivalent. it runs recovery in the given directory and then removes the database environment. use this before upgrading to a new Berkeley DB version if the new version to be installed requires a log file format update. β οΈ--db-print-leafpage-count fileβ prints the number of leaf pages in the database file file as a decimal number, orUNKNOWNif the database does not support querying this figure.--db-print-pagesize fileβ prints the size of a database page in file as a decimal number, orUNKNOWNfor databases with variable page size or databases that do not allow a query of the database page size.--db-verify fileβ requests thatbogofilterverifies the database file. it prints only errors, unless in verbose mode.
π 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. periodt. β¨
β RETURN VALUES β
0for successful operation. π1for most errors.3for I/O or other errors. error3usually 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[1].
π SEE ALSO π
bogofilter(1), bogolexer(1), bogotune(1), bogoupgrade(1)
π NOTES π
- the bogofilter project page β
http://bogofilter.sourceforge.net/
and that's the whole page bestie!! this one's from the Bogofilter crew, dated 05/19/2019, and it's the BOGOUTIL(1) manual β so go dump, load, and maintain those databases. you got this. π
β¨π¦π
π¦ where this page comes from
- alpine 3.24: bogofilter-doc 1.2.5-r4 Β· GPL-2.0-or-later
- arch rolling: bogofilter-db 1.2.5-12 Β· GPL-2.0-or-later
- arch rolling: bogofilter-kyotocabinet 1.2.5-12 Β· GPL-2.0-or-later
- arch rolling: bogofilter-lmdb 1.2.5-12 Β· GPL-2.0-or-later
- arch rolling: bogofilter-sqlite 1.2.5-12 Β· GPL-2.0-or-later
- centos-stream 9: bogofilter 1.2.5-8.el9 Β· GPLv2
- debian bookworm: bogofilter-common 1.2.5-1+b2 Β· GPL-2.0-or-later
- debian trixie: bogofilter-common 1.2.5-1+b4 Β· GPL-2.0-or-later
- epel 10: bogofilter 1.2.5-19.el10_1 Β· GPL-2.0-only
- fedora 43: bogofilter 1.2.5-20.fc43 Β· GPL-2.0-only
- fedora 44: bogofilter 1.2.5-22.fc44 Β· GPL-2.0-only
- nixos 26.05: bogofilter-db 1.2.5
- nixos 26.05: bogofilter-sqlite 1.2.5
- nixpkgs unstable: bogofilter-db 1.2.5
- nixpkgs unstable: bogofilter-sqlite 1.2.5
- ubuntu jammy: bogofilter-common 1.2.5-1build2 Β· GPL-2.0-or-later
- ubuntu noble: bogofilter-common 1.2.5-1build4 Β· GPL-2.0-or-later
- ubuntu questing: bogofilter-common 1.2.5-1build5
- ubuntu resolute: bogofilter-common 1.2.5-1build6 Β· GPL-2.0-or-later
- ubuntu stonking: bogofilter-common 1.2.5-1build6 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms