Spamassassin
From Lolly's Wiki
Debugging
Razor2
In spamassassins local.cf:
razor_config /etc/spamassassin/Razor2/razor-agent.conf
The config /etc/spamassassin/Razor2/razor-agent.conf might be like this:
#
# Razor2 config file
#
# Autogenerated by Razor-Agents v2.82
# Tue Nov 28 13:36:10 2006
# Created with all default values
#
# see razor-agent.conf(5) man page
#
debuglevel = 4
identity = identity
ignorelist = 0
listfile_catalogue = servers.catalogue.lst
listfile_discovery = servers.discovery.lst
listfile_nomination = servers.nomination.lst
logfile = /var/log/razor-agent.log
logic_method = 4
min_cf = ac
razordiscovery = discovery.spamnet.com
rediscovery_wait = 3600
report_headers = 1
turn_off_discovery = 0
use_engines = 4,8
whitelist = razor-whitelist
razorhome = /etc/exim-local/Razor2
$ spamassassin --siteconfigpath=/etc/spamassassin -D razor2 < ~/sample-ham.txt 2>&1 | less
Dec 16 15:20:39.223 [26376] dbg: razor2: razor2 is available, version 2.86
Razor-Log: read_file: 16 items read from /etc/spamassassin/Razor2/razor-agent.conf
Razor-Log: Found razorhome: /etc/exim-local/Razor2
Dec 16 15:20:41.248733 check[26376]: [ 2] [bootup] Logging initiated LogDebugLevel=9 to stdout
Dec 16 15:20:41.248919 check[26376]: [ 5] computed razorhome=/etc/exim-local/Razor2, conf=/etc/spamassassin/Razor2/razor-agent.conf, ident=/etc/exim-local/Razor2/identity
Dec 16 15:20:41.248996 check[26376]: [ 8] Client supported_engines: 4 8
Dec 16 15:20:41.249307 check[26376]: [ 8] prep_mail done: mail 1 headers=3944, mime0=562
Dec 16 15:20:41.249571 check[26376]: [ 5] read_file: 1 items read from /etc/exim-local/Razor2/servers.discovery.lst
Dec 16 15:20:41.249819 check[26376]: [ 5] read_file: 4 items read from /etc/exim-local/Razor2/servers.nomination.lst
Dec 16 15:20:41.250038 check[26376]: [ 5] read_file: 3 items read from /etc/exim-local/Razor2/servers.catalogue.lst
Dec 16 15:20:41.250164 check[26376]: [ 9] Assigning defaults to n002.cloudmark.com
Dec 16 15:20:41.250212 check[26376]: [ 9] Assigning defaults to n004.cloudmark.com
Dec 16 15:20:41.250250 check[26376]: [ 9] Assigning defaults to n001.cloudmark.com
Dec 16 15:20:41.250286 check[26376]: [ 9] Assigning defaults to n003.cloudmark.com
Dec 16 15:20:41.250323 check[26376]: [ 9] Assigning defaults to c303.cloudmark.com
Dec 16 15:20:41.250361 check[26376]: [ 9] Assigning defaults to c301.cloudmark.com
Dec 16 15:20:41.250398 check[26376]: [ 9] Assigning defaults to c302.cloudmark.com
...
Bayes
$ spamassassin --siteconfigpath=/etc/spamassassin -D bayes < ~/sample-ham.txt 2>&1 | less
Dec 16 15:33:03.945 [3194] dbg: bayes: learner_new self=Mail::SpamAssassin::Plugin::Bayes=HASH(0x1b36a5eb0), bayes_store_module=Mail::SpamAssassin::BayesStore::SQL
Dec 16 15:33:03.976 [3194] dbg: bayes: using username: exim
Dec 16 15:33:03.976 [3194] dbg: bayes: learner_new: got store=Mail::SpamAssassin::BayesStore::SQL=HASH(0x1b4f9ab50)
Dec 16 15:33:04.001 [3194] dbg: bayes: database connection established
Dec 16 15:33:04.002 [3194] dbg: bayes: found bayes db version 3
Dec 16 15:33:04.003 [3194] dbg: bayes: Using userid: 666
Dec 16 15:33:04.183 [3194] dbg: bayes: corpus size: nspam = 345, nham = 925
Dec 16 15:33:04.184 [3194] dbg: bayes: tokenized body: 71 tokens
Dec 16 15:33:04.184 [3194] dbg: bayes: tokenized uri: 34 tokens
Dec 16 15:33:04.184 [3194] dbg: bayes: tokenized invisible: 0 tokens
...