You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by tonjg <to...@freeuk.com> on 2010/01/17 19:57:55 UTC

is bayes enabled by default?

I have sa version 3.2.5
my autolearn setting always shows as 'no'. Will this eventually come on by
itself or do I need to turn it on?
thanks for any advice.
-- 
View this message in context: http://old.nabble.com/is-bayes-enabled-by-default--tp27201682p27201682.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: is bayes enabled by default?

Posted by Jason Bertoch <ja...@i6ix.com>.
On 1/18/2010 1:33 PM, tonjg wrote:
> 
> Bowie Bailey wrote:
>> So you have to make
>> sure that when you are testing or learning, you use the same user that
>> is used in production.
> 
> thanks for your response. The only config for my SA is a global one. I'm the
> only user so all the settings I've tinkered with are system wide ones. I'm
> assuming bayes is working the same way...
> 
> the command you gave - pamassassin -D --lint - did produce a long output and
> in it I saw 'loading Mail Spamassassin plugin bayes...'
> 

Since you're using MIMEDefang, which normally runs as the 'defang' user, 
you want to run your tests as the 'defang' user.  From the MIMEDefang FAQ:

su defang -s /bin/bash -c 'spamassassin -x -p /etc/mail/sa-mimedefang.cf 
-D --lint'

Also, you'll want to make sure that your Bayes directory is writable by 
the 'defang' user.  Your debug output showed that, although the Bayes 
plugin was loading, it couldn't write to the bayes directory.

[29394] dbg: plugin: loading Mail::SpamAssassin::Plugin::Bayes from @INC
[29394] dbg: bayes: no dbs present, cannot tie DB R/O:



/Jason

Re: is bayes enabled by default?

Posted by tonjg <to...@freeuk.com>.

Bowie Bailey wrote:
> So you have to make
> sure that when you are testing or learning, you use the same user that
> is used in production.

thanks for your response. The only config for my SA is a global one. I'm the
only user so all the settings I've tinkered with are system wide ones. I'm
assuming bayes is working the same way...

the command you gave - pamassassin -D --lint - did produce a long output and
in it I saw 'loading Mail Spamassassin plugin bayes...'

-- 
View this message in context: http://old.nabble.com/is-bayes-enabled-by-default--tp27201682p27214842.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: is bayes enabled by default?

Posted by Bowie Bailey <Bo...@BUC.com>.
tonjg wrote:
> Benny Pedersen wrote:
>   
>> ls -l /root/.spamassassin
>>     
>
> this command gives:
> total 0
>   

So there are no files in that directory.  Are you going to be running SA
as root on a general basis?  If so, you need to make sure you have
permission to write in that directory.  Otherwise, you should re-run
"spamassassin -D --lint" as the user that SA usually uses.

This is a common error with new SA admins.  The directory used by
default for Bayes (and AWL), is set on a per-user.  So you have to make
sure that when you are testing or learning, you use the same user that
is used in production.  Depending on your configuration, this may be a
static user, or it may change depending on the delivery address of each
email.

-- 
Bowie

Re: is bayes enabled by default?

Posted by Benny Pedersen <me...@junc.org>.
On Sun 17 Jan 2010 11:43:19 PM CET, tonjg wrote

>> ls -l /root/.spamassassin

would just liked to permissions on this dir

try delete it and see what happends

> this command gives:
> total 0

sa-learn --ham --showdots <msg
sa-learn --dump magic

sa-learn --spam --showdots <msg
sa-learn --dump magic

does it show changes in magic ?

-- 
xpoint http://www.unicom.com/pw/reply-to-harmful.html


Re: is bayes enabled by default?

Posted by tonjg <to...@freeuk.com>.

Benny Pedersen wrote:
> 
> ls -l /root/.spamassassin

this command gives:
total 0

-- 
View this message in context: http://old.nabble.com/is-bayes-enabled-by-default--tp27201682p27203728.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: is bayes enabled by default?

Posted by Benny Pedersen <me...@junc.org>.
On Sun 17 Jan 2010 10:33:24 PM CET, tonjg wrote
> [29394] dbg: plugin: loading Mail::SpamAssassin::Plugin::Bayes from @INC

bayes plugin is loaded

> [29394] dbg: bayes: no dbs present, cannot tie DB R/O:
> /root/.spamassassin/bayes_toks

is BerkelayDB working in generic on this computer ?

is perl DB-file installed ?

ls -l /root/.spamassassin

> I'm not sure from this output if bayes is enabled or disabled by default.

it is loaded, but it might not work, permission denied to write


-- 
xpoint http://www.unicom.com/pw/reply-to-harmful.html


Re: is bayes enabled by default?

Posted by tonjg <to...@freeuk.com>.

Benny Pedersen wrote:
> 
> spamassassin 2>&1 -D --lint | less

thanks for this command. It produced quite a long output but some of the
lines were confusing. Regarding bayes I found:
[29394] dbg: plugin: loading Mail::SpamAssassin::Plugin::Bayes from @INC
[29394] dbg: bayes: no dbs present, cannot tie DB R/O:
/root/.spamassassin/bayes_toks
I'm not sure from this output if bayes is enabled or disabled by default.

-- 
View this message in context: http://old.nabble.com/is-bayes-enabled-by-default--tp27201682p27203064.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


lint unresolved dependencies (was: is bayes enabled by default?)

Posted by Charles Gregory <cg...@hwcn.org>.
On Sun, 17 Jan 2010, Benny Pedersen wrote:
: spamassassin 2>&1 -D --lint | less
: is this line not a FAQ by now ?

I just tried this, for curiosity's sake, and was surprised to discover
that a couple of my meta rules had simple typos that showed up like this 
in the 'debug' output (3.2.5):

[28424] dbg: rules: meta test LOC_RULE2 has undefined dependency 'LOCRULE1'

...the 'bug' being nothing more than a missing underscore in 'LOC_RULE1'.

But this does NOT appear on the standard (without -D) --lint output?

Is this by desgin? A bug? I notice some default rules also have this 
dependency issue. So I'm not sure I would want --lint to 'fail' on this,
but still it surprised me to see an obvious syntax error 'overlooked' by
the basic --lint without any hint it was happening....
 
Thoughts?

- Charles

Re: is bayes enabled by default?

Posted by Benny Pedersen <me...@junc.org>.
On Sun 17 Jan 2010 10:05:13 PM CET, tonjg wrote
> so if there is no 'use_bayes' entry in local.cf does that mean bayes is
> disabled by default?

spamassassin 2>&1 -D --lint | less

is this line not a FAQ by now ?

-- 
xpoint http://www.unicom.com/pw/reply-to-harmful.html


Re: is bayes enabled by default?

Posted by tonjg <to...@freeuk.com>.

Daryl C. W. O'Shea wrote:
> 
> No, bayes is enabled by default provided that you have any required
> modules installed.

ok thanks for your feedback Daryl, I think I do have the required modules
installed. 

-- 
View this message in context: http://old.nabble.com/is-bayes-enabled-by-default--tp27201682p27203128.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: is bayes enabled by default?

Posted by "Daryl C. W. O'Shea" <sp...@dostech.ca>.
On 17/01/2010 4:05 PM, tonjg wrote:
> 
> Herbert J. Skuhra wrote:
>> You can set use_bayes and bayes_auto_learn to 1 in your local.cf.
> 
> so if there is no 'use_bayes' entry in local.cf does that mean bayes is
> disabled by default?

No, bayes is enabled by default provided that you have any required
modules installed.

You previously said you saw "autolearn no" presumably in your maillog.
This by itself tells you that bayes is being used.  "autolearn no" means
that the message that was scanned did not have a score in the autolearn
ranges (-0.1 or below and some higher spam value like 6.0 and above; I
can't remember what the minimum spam value is to autolearn).

Daryl


Re: is bayes enabled by default?

Posted by tonjg <to...@freeuk.com>.

Herbert J. Skuhra wrote:
> 
> You can set use_bayes and bayes_auto_learn to 1 in your local.cf.

so if there is no 'use_bayes' entry in local.cf does that mean bayes is
disabled by default?

-- 
View this message in context: http://old.nabble.com/is-bayes-enabled-by-default--tp27201682p27202796.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: is bayes enabled by default?

Posted by "Herbert J. Skuhra" <h....@gmail.com>.
At Sun, 17 Jan 2010 11:57:45 -0800 (PST),
tonjg wrote:
> 
> 
> 
> Herbert J. Skuhra wrote:
> > 
> > 
> > It would show disabled if use_bayes or use_bayes_autolearn is off.

Sorry, use_bayes_autolearn is wrong. :-) 
 
> thanks but in what file would it show this instruction?
> I looked in procmailrc, local.cf and 23_bayes.cf - couldn't find anything
> which told me whether bayes was enabled or disabled.

You can set use_bayes and bayes_auto_learn to 1 in your local.cf.

-Herbert


Re: is bayes enabled by default?

Posted by Kai Schaetzl <ma...@conactive.com>.
Maybe you should then try something that is easier?

Kai

-- 
Get your web at Conactive Internet Services: http://www.conactive.com




Re: is bayes enabled by default?

Posted by tonjg <to...@freeuk.com>.

Kai Schaetzl wrote:
> 
> Tonjg wrote on Sun, 17 Jan 2010 13:01:14 -0800 (PST):
> 
>> use_bayes ( 0 | 1 )  (default: 1)
>> which I think means that even if it's not present in local.cf it's
>> enabled,
>> correct me if I'm wrong.
> 
> correct. So, this link gave you the answer, right?
> But, as I wrote, if you don't add it it won't be there, no matter if
> default or 
> not. And there's an easy way to make sure it's on, no matter if you know
> what the 
> default status is: put it in.

if it's enabled by default I don't need to put it in.



>> http://spamassassin.apache.org/doc.html
>> >
>> http://wiki.apache.org/spamassassin/FrontPage?action=show&redirect=StartSeite
>> > http://wiki.apache.org/spamassassin/FrequentlyAskedQuestions
>> this three links contain nothing relevant to my original question but
>> thanks
>> anyway.
> 
> They do if you cared to research for yourself. Read up on Bayes. I gave
> you 
> links. If you can't find anything about Bayes there, then you are blind,
> there 
> are quite a few bits about it on the wiki and in the documentation. If you
> would 
> read up a bit about Bayes, then you would know how it works and when it
> kicks in. 
> From all the previous messages it's clear, that your are not doing much
> research, 
> but ask and ask until someone tells you what to do. e.g. you rely on
> others to 
> give you an answer that you could research yourself. Being a newbie is no
> excuse 
> for this behavior. If you keep going this way you will get less and less
> answers.

I get your point but I spend hours in front of this computer trying to
resolve problems and make progress. I can only read so many documents and
then my brain seizes up and I need to ask for some help. That's what forums
are for. I'm human, not a machine that can google for days on end, and often
it makes more sense just to ask someone than trawl through loads of
documents, Surely you can understand that.
-- 
View this message in context: http://old.nabble.com/is-bayes-enabled-by-default--tp27201682p27203259.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: is bayes enabled by default?

Posted by Kai Schaetzl <ma...@conactive.com>.
Tonjg wrote on Sun, 17 Jan 2010 13:01:14 -0800 (PST):

> use_bayes ( 0 | 1 )  (default: 1)
> which I think means that even if it's not present in local.cf it's enabled,
> correct me if I'm wrong.

correct. So, this link gave you the answer, right?
But, as I wrote, if you don't add it it won't be there, no matter if default or 
not. And there's an easy way to make sure it's on, no matter if you know what the 
default status is: put it in.

> 
> http://spamassassin.apache.org/doc.html
> > http://wiki.apache.org/spamassassin/FrontPage?action=show&redirect=StartSeite
> > http://wiki.apache.org/spamassassin/FrequentlyAskedQuestions
> this three links contain nothing relevant to my original question but thanks
> anyway.

They do if you cared to research for yourself. Read up on Bayes. I gave you 
links. If you can't find anything about Bayes there, then you are blind, there 
are quite a few bits about it on the wiki and in the documentation. If you would 
read up a bit about Bayes, then you would know how it works and when it kicks in. 
>From all the previous messages it's clear, that your are not doing much research, 
but ask and ask until someone tells you what to do. e.g. you rely on others to 
give you an answer that you could research yourself. Being a newbie is no excuse 
for this behavior. If you keep going this way you will get less and less answers.

Kai

-- 
Get your web at Conactive Internet Services: http://www.conactive.com




Re: is bayes enabled by default?

Posted by tonjg <to...@freeuk.com>.

Kai Schaetzl wrote:
> 
> local.cf, if you don't put it in, it won't be there, of course.
that doesn't tell me if bayes is enabled or disabled by default.

Read the documentation:
> http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html
the above link shows:
use_bayes ( 0 | 1 )	 (default: 1)
which I think means that even if it's not present in local.cf it's enabled,
correct me if I'm wrong.

http://spamassassin.apache.org/doc.html
> http://wiki.apache.org/spamassassin/FrontPage?action=show&redirect=StartSeite
> http://wiki.apache.org/spamassassin/FrequentlyAskedQuestions
this three links contain nothing relevant to my original question but thanks
anyway.
-- 
View this message in context: http://old.nabble.com/is-bayes-enabled-by-default--tp27201682p27202772.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: is bayes enabled by default?

Posted by Kai Schaetzl <ma...@conactive.com>.
Tonjg wrote on Sun, 17 Jan 2010 11:57:45 -0800 (PST):

> thanks but in what file would it show this instruction?
> I looked in procmailrc, local.cf and 23_bayes.cf - couldn't find anything
> which told me whether bayes was enabled or disabled.

local.cf, if you don't put it in, it won't be there, of course. 
Read the documentation:
http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html
http://spamassassin.apache.org/doc.html
http://wiki.apache.org/spamassassin/FrontPage?action=show&redirect=StartSeite
http://wiki.apache.org/spamassassin/FrequentlyAskedQuestions


Kai

-- 
Get your web at Conactive Internet Services: http://www.conactive.com




Re: is bayes enabled by default?

Posted by tonjg <to...@freeuk.com>.

Herbert J. Skuhra wrote:
> 
> 
> It would show disabled if use_bayes or use_bayes_autolearn is off.

thanks but in what file would it show this instruction?
I looked in procmailrc, local.cf and 23_bayes.cf - couldn't find anything
which told me whether bayes was enabled or disabled.

-- 
View this message in context: http://old.nabble.com/is-bayes-enabled-by-default--tp27201682p27202175.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.


Re: is bayes enabled by default?

Posted by "Herbert J. Skuhra" <h....@gmail.com>.
At Sun, 17 Jan 2010 10:57:55 -0800 (PST),
tonjg wrote:
> 
> 
> I have sa version 3.2.5
> my autolearn setting always shows as 'no'. Will this eventually come on by
> itself or do I need to turn it on?
> thanks for any advice.

http://wiki.apache.org/spamassassin/AutolearningNotWorking

It would show disabled if use_bayes or use_bayes_autolearn is off.

Have you trained enough spam/ham messages?

Check bayes_min_ham_num/bayes_min_spam_num and
bayes_auto_learn_threshold_spam/bayes_auto_learn_threshold_nonspam.  

-Herbert