SA Bugzilla – Bug 1591
use_bayes 0 doesn't stop tie()
Last modified: 2003-03-16 22:19:54 UTC
Simple bug - the use_bayes conf item doesn't turn off SpamAssassin's attempts to tie to the bayes database. The flag is only checked later. A fix would probably be to check this flag in is_available(). (also note a new Component of "Bayes" in bugzilla wouldn't go amiss)
yes, it should be in is_available as well. I'll poke around and see what I can find.
Yep, Matt's right on. I poked around figuing there was probably some other areas that needed a check added, but scan() seemed to be it. So I added that line and did some other cleanup as well:is_available() got renamed to is_scan_available since it's less of a "is bayes available at all" check and is really just used to determine if we can scan with bayes.due to the above, the top of scan() had a few lines removed which checked (again) whether or not there are enough tokens ...I'll attach the patch shortly.
Created attachment 712 [details] suggested patch
reassigning to malte
Created attachment 735 [details] new suggested patch, fixes fatal flaw in previous patch
definitely use the second patch ... In 2.5x there is no $self->{conf} in Bayes, but the is_scan_available code was looking for it so Bayes is always disabled. oops!
I can't okay this patch because I don't know the code. Especially the hunk -835,15 +838,6 looks dubious to me: where does that warning go?
Subject: Re: [SAdev] use_bayes 0 doesn't stop tie() On Sat, Mar 15, 2003 at 09:08:43AM -0800, bugzilla-daemon@hughes-family.org wrote: > I can't okay this patch because I don't know the code. Especially the hunk > -835,15 +838,6 looks dubious to me: where does that warning go? That's done in is_scan_available() which is added via the patch section above "-826,8 +828,9".
OKAY, I should have used the source before ;)
applied to 2.5x branch. closing ticket. :)