You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "m.b" <mb...@f451.net> on 2009/04/20 14:47:08 UTC

Bayes filter not always triggered

Hello,

I have following problem:

>From time to time some messages are not check by bayes filter.

For example:
Apr 20 12:59:58 ......... spamd[10405]: spamd: result: Y 25 -
FH_HELO_ALMOST_IP,HELO_DYNAMIC_HCC,HTML_MESSAGE,RCVD_IN_XBL,RDNS_DYNAMIC,URIBL_AB_SURBL,URIBL_BLACK,URIBL_JP_SURBL,URIBL_OB_SURBL,URIBL_RHS_DOB,URIBL_SC_SURBL,URIBL_WS_SURBL
scantime=3.2,size=2745,user=(unknown),uid=104,required_score=5.0,rhost=........,raddr=..............,rport=57786,mid=<93...@netcomuk.co.uk>,autolearn=disabled

As you can see BAYES_.. is not present

For example during one hour of mail SA work I have:
2500 messages with bayes BAYES_\d\d marked
and 
400 without

If I run one of those 400 messages manually (from the same user SA is
running) It always get BAYES_ in result.

Do you have any suggestions why not every message is passing through BAYESS?
I thought it is was locking problem but I'am using flock (and no signs of
'open bayes database' errors).

My configuration.
use_bayes 1
use_bayes_rules 1
bayes_auto_learn 0

$ spamassassin --version
SpamAssassin version 3.2.4
  running on Perl version 5.8.8

Regards,
Mark 
-- 
View this message in context: http://www.nabble.com/Bayes-filter-not-always-triggered-tp23135995p23135995.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: Bayes filter not always triggered

Posted by Theo Van Dinter <fe...@apache.org>.
That depends how you have SA setup and how you call it, which you
haven't explained. :)

If you're running it in a site-wide setup, and always with the same
user (even if it doesn't exist on the server), then I'd recommend
running spamd in debug mode and see what it says.


On Mon, Apr 20, 2009 at 11:27 AM, m.b <mb...@f451.net> wrote:
> If user would be missing, it would always cause problems. But it works 75% of
> the time.
>
> Mark
>
>
> Theo Van Dinter-2 wrote:
>>
>> On Mon, Apr 20, 2009 at 8:47 AM, m.b <mb...@f451.net> wrote:
>>> scantime=3.2,size=2745,user=(unknown),uid=104,required_score=5.0,rhost=........,raddr=..............,rport=57786,mid=
>>>
>>> Do you have any suggestions why not every message is passing through
>>> BAYESS?
>>> I thought it is was locking problem but I'am using flock (and no signs of
>>> 'open bayes database' errors).
>>
>> My guess is that "user=(unknown)" is causing your issue.  Perhaps the
>> user that calls spamd doesn't exist on that server?
>>
>> Running spamd in debug mode would probably give you more information, fyi.

Re: Bayes filter not always triggered

Posted by "m.b" <mb...@f451.net>.
If user would be missing, it would always cause problems. But it works 75% of
the time.

Mark


Theo Van Dinter-2 wrote:
> 
> On Mon, Apr 20, 2009 at 8:47 AM, m.b <mb...@f451.net> wrote:
>> scantime=3.2,size=2745,user=(unknown),uid=104,required_score=5.0,rhost=........,raddr=..............,rport=57786,mid=
>>
>> Do you have any suggestions why not every message is passing through
>> BAYESS?
>> I thought it is was locking problem but I'am using flock (and no signs of
>> 'open bayes database' errors).
> 
> My guess is that "user=(unknown)" is causing your issue.  Perhaps the
> user that calls spamd doesn't exist on that server?
> 
> Running spamd in debug mode would probably give you more information, fyi.
> 
> 

-- 
View this message in context: http://www.nabble.com/Bayes-filter-not-always-triggered-tp23135995p23138936.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: Bayes filter not always triggered

Posted by Theo Van Dinter <fe...@apache.org>.
On Mon, Apr 20, 2009 at 8:47 AM, m.b <mb...@f451.net> wrote:
> scantime=3.2,size=2745,user=(unknown),uid=104,required_score=5.0,rhost=........,raddr=..............,rport=57786,mid=
>
> Do you have any suggestions why not every message is passing through BAYESS?
> I thought it is was locking problem but I'am using flock (and no signs of
> 'open bayes database' errors).

My guess is that "user=(unknown)" is causing your issue.  Perhaps the
user that calls spamd doesn't exist on that server?

Running spamd in debug mode would probably give you more information, fyi.

Re: Bayes filter not always triggered

Posted by Karsten Bräckelmann <gu...@rudersport.de>.
On Mon, 2009-04-20 at 05:47 -0700, an anonymous Nabble user wrote:
> As you can see BAYES_.. is not present
> 
> For example during one hour of mail SA work I have:
> 2500 messages with bayes BAYES_\d\d marked
> and 
> 400 without

Which BAYES_xx rules do you get?

Any chance you customized some Bayes scores in your local configuration,
and assigned it a score of 0?


-- 
char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}


Re: Bayes filter not always triggered

Posted by "m.b" <mb...@f451.net>.
Thank you for all you answers.

SA is setup as a demon.

I have managed to "solve" this problem after turning on debug mode for bayes
(-D bayes).

I was able to correlate that 10% of my messages not scanned by bayes are
connected with this error:
bayes: no dbs present, cannot tie DB R/O:
/var/spool/exim4/.spamassassin/bayes_toks

I don't know why exim4 home directory is used. SA is running on user spamd
with HOME=/home/spamassassin. The rest (90%) of messages are filtered just
fine:
bayes: tie-ing to DB file R/O /home/spamassassin/.spamassassin/bayes_toks
bayes: tie-ing to DB file R/O /home/spamassassin/.spamassassin/bayes_seen

SA is accepting messages only from remote mail system.

SA arguments:
/usr/local/bin/spamd --create-prefs -A ..... -i ....... -s mail
--helper-home-dir -u spamd -d --pidfile=/var/run/spamd.pid

--helper-home-dir - ?

I have solved this problem by creating link /var/spool/exim4/.spamassassin
-> /home/spamassassin/.spamassasin. I know it is ugly, but it works for me.

Regards,
Mark
-- 
View this message in context: http://www.nabble.com/Bayes-filter-not-always-triggered-tp23135995p23152591.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.