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 to bogofilter -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 β€” tells 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. 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 (usually wordlist.db) or the name of the directory containing it. 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. πŸ”
  • -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 -p takes 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 lets bogoutil go with the defaults. default queen. πŸ‘‘
  • --config-file file β€” tells bogoutil to 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 -m or -l, but not with -d. ⚠️
  • -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.
  • -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 is YYYYMMDD.
  • -h β€” prints the help message and exits. πŸ†˜
  • -V β€” prints the version number and exits. πŸ“œ

🌈 ENVIRONMENT MAINTENANCE 🌈

  • --db-checkpoint dir β€” causes bogoutil to flush the buffer caches and checkpoint the database environment. πŸ’Ύ
  • --db-list-logfiles dir β€” causes bogoutil 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 all to list all log files (inactive and active). you can add absolute to switch the listing to absolute paths. πŸ“‚
  • --db-prune dir β€” causes bogoutil to 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, or UNKNOWN if 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, or UNKNOWN for databases with variable page size or databases that do not allow a query of the database page size.
  • --db-verify file β€” requests that bogofilter verifies 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 ⭐

  • 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. πŸ’€

🫢 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 πŸ“

  1. 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. πŸ’…βœ¨πŸ¦‹πŸ’–