On Thu, 17 Dec 2009, Khanh Truong wrote:

I created a sample message, then tell spamassassin to learn it as spam with the command
#sa-learn --spam spamtest.txt

then I tried the command
#spamc < spamtest.txt

but spamassassin still scored it as non-spam. Am I doing something
wrong? Please help!

Training a message as spam does not guarantee the next time the exact same message is seen that it will be scored as spam. It's not a "poison pill" tool.

Training a message as spam tells SA that messages that look similar to the trained messages will be scored "more spammy" than they otherwise would be. This may push the overall score past a threshold.

Three things you need to look at:

(1) Have you trained enough spam _and_ ham messages to give the bayes database enough to work with to make decisions? Run "sa-learn --dump magic" and verify that you have at least 200 spam _and_ 200 ham tokens.

(2) What was the bayes score on the message the first time you passed it through SA for scoring, _before_ using it for training?

(3) What was the bayes score on the message when you passed it through SA for scoring _after_ training?

--
 John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
 jhar...@impsec.org    FALaholic #11174     pgpk -a jhar...@impsec.org
 key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  "Bother," said Pooh as he struggled with /etc/sendmail.cf, "it never
  does quite what I want. I wish Christopher Robin was here."
                                           -- Peter da Silva in a.s.r
-----------------------------------------------------------------------
 8 days until Christmas

Reply via email to