darxus at chaosreigns
Oct 23, 2011, 6:23 PM
Views: 479
Permalink

Re: Getting started with Bayesian filtering
[In reply to]


On 10/23, Marios Titas wrote: > my $spamassassin=Mail::SpamAssassin>new({ > require_rules => 1, I have no experience using SA this way. I'd start with trying to get it to work with the default configuration, from the command line, not through this API. > rules_filename => "$ENV{HOME}/.spamassassin/user_prefs", First thing I'd try is just commenting out that line. I bet it'll work. > score BAYES_05 9 It looks like you're not loading the full default ruleset, which is probably good. But it looks like then you're not defining the BAYES rules, which you need  just setting that one score for an undefined rule. I bet if you ran spamassassin lint with those same settings (rules_filename, etc.), it would complain about you setting a score for an undefined rule. Grep the default rules for BAYES: body BAYES_00 eval:check_bayes('0.00', '0.01') body BAYES_05 eval:check_bayes('0.01', '0.05') body BAYES_20 eval:check_bayes('0.05', '0.20') body BAYES_40 eval:check_bayes('0.20', '0.40') body BAYES_50 eval:check_bayes('0.40', '0.60') body BAYES_60 eval:check_bayes('0.60', '0.80') body BAYES_80 eval:check_bayes('0.80', '0.95') body BAYES_95 eval:check_bayes('0.95', '0.99') body BAYES_99 eval:check_bayes('0.99', '1.00') tflags BAYES_00 nice learn tflags BAYES_05 nice learn tflags BAYES_20 nice learn tflags BAYES_40 nice learn tflags BAYES_50 learn tflags BAYES_60 learn tflags BAYES_80 learn tflags BAYES_95 learn tflags BAYES_99 learn score BAYES_00 0 0 1.5 1.9 score BAYES_05 0 0 0.3 0.5 score BAYES_20 0 0 0.001 0.001 score BAYES_40 0 0 0.001 0.001 score BAYES_50 0 0 2.0 0.8 score BAYES_60 0 0 2.5 1.5 score BAYES_80 0 0 2.7 2.0 score BAYES_95 0 0 3.2 3.0 score BAYES_99 0 0 3.8 3.5 priority BAYES_99 400 I wonder what "priority" does. You probably don't want the "learn" flags. Oh, hah, none of the BAYES scores are high enough to go above your required_score of 5. So you'll probably want to set your required_score to something within the range of scores defined there, or change the scores. > Could someone give me any pointers on how to make this work? All I > want is to be able to use Bayesian filtering and Bayesian filtering I'd probably try a dedicated bayesian filter, maybe spamprobe. Although there might not be a reason not to use SA. Especially if you like that API. If you get this working, I'd appreciate it if you documented it on the SA wiki.  "When we remember we are all mad, the mysteries of life disappear and life stands explained."  Mark Twain http://www.ChaosReigns.com
