RSPAMD_STATS(8)

πŸ“¦
version 3.12.1 Β· 2 versions
, in debian trixie

πŸ’– RSPAMD_STATS πŸ’–

okay bestie, welcome to rspamd_stats, section 8 of the manual pages, and she is the girl for snooping on your Rspamd rules by reading log files. iykyk.


✨ NAME ✨

rspamd_stats β€” analyze Rspamd rules by parsing log files πŸ•΅οΈβ™€οΈ


πŸ¦‹ SYNOPSIS πŸ¦‹

rspamd_stats [options] [–symbol=SYM1 [–symbol=SYM2...]] [–log file]

🌸 DESCRIPTION 🌸

so basically rspamd_stats will read the log file you hand it (or standard input if you're feeling mysterious) and then it serves you statistics for the symbols you asked about. it's giving data. it's giving receipts. πŸ’…

Symbol: BAYES_SPAM (weight 3.763) (381985 hits, 26.827%)
Ham hits: 184557 (48.315%), total ham: 1095487 (ham with BAYES_SPAM: 16.847%)
Spam hits: 15134 (3.962%), total spam: 16688 (spam with BAYES_SPAM: 90.688%)
Junk hits: 182294 (47.723%), total junk: 311699 (junk with BAYES_SPAM: 58.484%)
Spam changes (ham/junk -> spam): 7026 (1.839%), total percentage (changes / spam hits): 42.102%
Junk changes (ham -> junk): 95192 (24.920%), total percentage (changes / junk hits): 30.540%

and here's what all those little attributes actually mean, bestie, because i know you were about to ask πŸ‘‡

  • Weight β€” the average score for a symbol 🎯
  • Total hits β€” the total number of hits, plus the percentage of symbol hits divided by the total number of messages
  • HAM hits β€” gives you the following info about HAM messages with the specified symbol (left to right, no skipping):
    1. total symbol hits: how many messages have this symbol AND are HAM
    2. ham percentage: number of symbol hits divided by the overall HAM messages count
    3. total ham hits: the overall number of HAM messages
    4. ham with symbol percentage: percentage of the number of hits with the specified symbol in HAM messages, divided by the total number of HAM messages
  • SPAM hits β€” gives you info about SPAM messages β€” same as the previous one but for the SPAM class πŸ—‘οΈ
  • Junk hits β€” gives you info about Junk messages β€” same as the previous one but for the JUNK class
  • Spam changes β€” shows you data about how many messages switched their class because of the specific symbol weight
  • Junk changes β€” shows you data about how many messages switched their class because of the specific symbol weight

✨ OPTIONS ✨

  • --log β€” specifies the log file or directory to read data from. if you give it a directory, rspamd_stats analyses the files in that directory including known compressed file types πŸ—œοΈ. the number of log files can be limited with the --num-logs and --exclude-logs options. this assumes that files in the log directory have a newsyslog(8)- or logrotate(8)-like name format with numeric indexes. files without indexes (generally it's merely one file) are considered the most recent, and files with lower indexes are considered newer.
  • --reject-score β€” specifies the reject (spam) threshold 🚫
  • --junk-score β€” specifies the junk (add header or rewrite subject) threshold
  • --alpha-score β€” specifies the minimum score for a symbol to be considered by this script
  • --symbol β€” add a symbol or pattern (pcre format) to analyze πŸ”
  • --num-logs β€” if set, limits the number of analyzed logfiles in the directory to the specified value
  • --exclude-logs β€” number of latest logs to exclude (0 by default)
  • --correlations β€” additionally print the correlation rate for each symbol displayed. this routine calculates merely paired correlations between symbols πŸ”—
  • --search-pattern β€” do not process input unless finding the specified regular expression. useful to skip logs to a certain position ⏭️
  • --exclude β€” exclude log lines if certain symbols are fired (e.g. GTUBE). you may specify this option multiple times to skip multiple symbols
  • --start β€” select log entries after this time. format: β€œYYYY-MM-DD HH:MM:SS” (can be truncated to any desired accuracy). if used with --end, select entries between –start and --end. the omitted date defaults to the current date if you supply the time ⏰
  • --end β€” select log entries before this time. format: β€œYYYY-MM-DD HH:MM:SS” (can be truncated to any desired accuracy). if used with --start, select entries between --start and --end. the omitted date defaults to the current date if you supply the time
  • --help β€” print a brief help message and exits
  • --man β€” prints the manual page and exits πŸ“–

πŸ‘‘ AUTHORS πŸ‘‘

Vsevolod Stakhov.


no cap, that's the whole thing. go read your logs, bestie 🫢

mwah πŸ’‹ β€” this was RSPAMD_STATS(8) from March 5, 2018, and that's the vibe check, periodt βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from