Halid Faith wrote:
> 
> I use spamassassin3.1 with simscan1.2 on qmail.
> I want my mailserver to deny some messages which are spam using
> sa-learn. So I typed as below; 
> sa-learn --spam /path/badmails/
> 
> Learned tokens from 6 message(s) (6 message(s) examined)
> 
> Despite I learnt to my server as spam with the above way (sa-learn), 
> when I sent a spam message to the server, I got that email which I
> put in /path/badmails/. Here is  a part of the header in that email; 
> Return-Path: [EMAIL PROTECTED]
> Delivered-To: [EMAIL PROTECTED]
> X-Spam-DCC: sonic.net: snort.domain.net 1156; Body=1 Fuz1=1 Fuz2=1
> X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on
> snort.domain.net 
> X-Spam-Level: ***
> X-Spam-Status: No, score=3.7 required=10.0 tests=AWL,EXTRA_MPART_TYPE,
>  HTML_MESSAGE,INFO_TLD,RAZOR2_CF_RANGE_51_100,
>  RAZOR2_CF_RANGE_E8_51_100,RAZOR2_CHECK autolearn=no version=3.1.1
> X-Spam-Pyzor: Reported 0 times.
> 
> The server gave a score but it didn't reject that message.
> I think  my sa-learn doesn't seem to work.
> 
> my local.cf
>  rewrite_header Subject SPAMMSG
>  required_score 9.0
> add_header all DCC _DCCB_: _DCCR_
> use_razor2 1
> pyzor_path /usr/local/bin/pyzor
> pyzor_max 2
> use_pyzor 1
> add_header all Pyzor _PYZOR_
> use bayes 1
>  bayes_auto_learn 1
> use_dcc 1
> dcc_path /usr/local/bin/dccproc
> use_auto_whitelist 0
> 
> init.pre  is below
> loadplugin Mail::SpamAssassin::Plugin::DCC
> loadplugin Mail::SpamAssassin::Plugin::Pyzor
> loadplugin Mail::SpamAssassin::Plugin::Razor2
> loadplugin Mail::SpamAssassin::Plugin::Hashcash
> 
> How can I reject a mail with sa-learn ?
> Thanks

The Bayes database (which you are training with sa-learn) does not
reject messages, it only increases or decreases their score based on
certain tokens that are found in the message.

Bayes simply keeps track of which tokens (words mostly) are found in
spam and ham messages.  When SA checks a message, Bayes gives it a
score based on the tokens in the message that it has seen before.

For a bit more info, see here:
http://wiki.apache.org/spamassassin/BayesInSpamAssassin

Based on the fact that your X-Spam-Status header does not show
any Bayes score, you probably either have not yet learned enough
messages (200 ham and 200 spam) for the Bayes scoring to take effect,
or you are learning your messages to a different database than SA is
using.  When you run sa-learn, you must be logged in as the user whose
Bayes database you wish to train.

Also, your required score is a bit high.  Unless you have lots of
custom rules, there will be quite a bit of spam which will score less
than 10 points.  I have had good luck sticking with the default score
of 5.  Even with Razor2, DCC, and lots of SARE rule sets, I get almost
zero false positives.

-- 
Bowie

Reply via email to