# Rspamd statistic setup # Pre-built files could be loaded from: # http://rspamd.com/rspamd_statistics/bayes.spam.sqlite # - and - # http://rspamd.com/rspamd_statistics/bayes.ham.sqlite classifier "bayes" { tokenizer { name = "osb"; } cache { path = "${DBDIR}/learn_cache.sqlite"; } min_tokens = 11; backend = "sqlite3"; languages_enabled = true; min_learns = 200; statfile { symbol = "BAYES_HAM"; path = "${DBDIR}/bayes.ham.sqlite"; spam = false; } statfile { symbol = "BAYES_SPAM"; path = "${DBDIR}/bayes.spam.sqlite"; spam = true; } learn_condition =<= 0.95 else cl = 'ham' in_class = prob <= 0.05 end if in_class then return false,string.format('already in class %s; probability %.2f%%', cl, math.abs((prob - 0.5) * 200.0)) end end end return true end EOD }