BOGOUTIL(1)

πŸ“¦ version 1.2.4, in opensuse-leap 16.0

πŸ’… BOGOUTIL(1) β€” like, the whole manual, bestie 🫢

okay so this is the manual page for bogoutil, straight out of the Bogofilter Reference Manual β€” and yes she's giving main character energy, because she literally dumps, loads, and maintains bogofilter database files. no cap. πŸŽ€


✨ NAME ✨

bogoutil β€” dumps, loads, and maintains bogofilter database files. that's her whole job description and she ate. πŸ’β€β™€οΈ


🌸 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}

and 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]

like, that's the whole shape of her. iconic. ⭐


πŸ¦‹ DESCRIPTION πŸ¦‹

bogoutil is part of the bogofilter Bayesian spam filter package. she's on the team!!

she's the one you call to dump and load bogofilter's Berkeley DB databases to and from text files, to do database maintenance functions, and to display the values for specific words. basically she's the backstage crew that makes the whole spam-filtering show happen, and honestly? obsessed. πŸ’–


πŸ’œ OPTIONS πŸ’œ

okay this is the long part bestie, grab a snack. πŸ“

  • -d file β€” tells bogoutil to print the contents of the database file to stdout. like a show-and-tell, but for databases.
  • -H file β€” tells bogoutil to print a histogram of the database file to stdout. the output is similar to bogofilter -vv. and the finale: hapaxes (tokens which were only seen once) and pure tokens (tokens which were encountered only in ham or only in spam) are counted. so you get a little stats era. πŸ“Š
  • -l file β€” tells bogoutil to load the data from stdin into the database file. and if the database file already exists, stdin data is merged into the database file, with counts added up. merging!! she's so collaborative. 🫢
  • -m file β€” 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 literally decluttering your tokens. spring cleaning vibes. 🧹
  • -w file β€” tells bogoutil to display token information from the database file. this 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. very flexible queen. πŸ‘‘
  • -p file β€” tells bogoutil to display 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. so like, -w's sibling, but with extra math. πŸ”₯
  • -r file β€” tells bogoutil to recalculate the ROBX value and print it as a six-digit fraction. six digits!! precise!! ✨
  • -R file β€” does the same as -r, but saves the result in the training database without printing it. she's doing it silently. mysterious. πŸ™ˆ
  • -I file β€” tells bogoutil to read its input from file rather than stdin.
  • -O file β€” tells bogoutil to write its output to file rather than stdout.
  • -v β€” produces verbose output on stderr. this option is primarily useful for debugging. she's telling you everything, ngl. πŸ’€
  • -C β€” inhibits reading configuration files and lets bogoutil go with the defaults. raw dogging the defaults, no config. 😭
  • --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). just moving the gossip to a different group chat. πŸ’¬
  • -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. read that again bestie β€” 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. bye bye old tokens πŸ‘‹
  • -c value β€” indicates that tokens with counts less than or equal to value are to be discarded.
  • -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. goldilocks rules: not too short, not too long. 🐻
  • -y date β€” is specifies the date to give to tokens that don't have dates. the format is YYYYMMDD. (yes the original says "is specifies", we're keeping it, it's her little typo, it's canon. 🫢)
  • -h β€” prints the help message and exits. help is here!!
  • -V β€” prints the version number and exits. know your queen's version. πŸ’…

🌈 ENVIRONMENT MAINTENANCE 🌈

this whole section is about keeping the database environment happy and hydrated. 🧚

  • --db-checkpoint dir β€” causes bogoutil to flush the buffer caches and checkpoint the database environment. self-care for caches. πŸ’†β€β™€οΈ
  • --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. so: all and absolute, mix and match, separated by whitespace. iykyk. 🌸
  • --db-prune dir β€” causes bogoutil to checkpoint the database environment and remove inactive log files. cleanup era. 🧹✨
  • --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. from scratch, bestie, that's the end of the line. 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. (same deal as above β€” final boss energy.) 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. like, say goodbye properly before you upgrade. 🫑
  • --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. she's only speaking up if something's actually wrong. πŸ’…

πŸŽ€ 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. that's it, that's the format. simple, clean, slay. ✨


⭐ 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. seriously wrong. like, call someone wrong. 😭

πŸ’– 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 beauty comes to you from Bogofilter, dated 06/29/2013 β€” go forth and maintain those databases, you absolute icon. πŸŽ€βœ¨πŸ«Ά