Re: bayes not active although enabled?
snowweb wrote: > > > I was wondering whether it was a user issue earlier, but I tried sa-learn > --username=user --dump magic and it seemed to give the same result as the > default user. I tried various different users (even made some up!) but it > didn't complain - still gave me the same dump. > > While writing this, I just checked messages on another domain/user and > found that bayes is working there! phew! That's a relief... it seems that > it is only on my domain that we have an issue. > > On Friday, due to a lack of understanding of how spamassassin works, I > renamed the following: > > /home/snowbnet/.spamassassin/bayes.mutex > /home/snowbnet/.spamassassin/bayes_journal > /home/snowbnet/.spamassassin/bayes_seen > /home/snowbnet/.spamassassin/bayes_toks > > I added .old to the end of each. > > Afterwards, spamassassin recreated them and I thought all was good, but > because bayes stopped working, I changed them back and removed the newly > created versions. In hind sight, I guess it just needed training. Anyway, > don't know if what I did is related to this problem. > > Also, I've just noticed that the bayes_journal has not been modified since > Saturday about the time I renamed stuff. > > To recap, update and summarize: Bayes is not being used for one domain on the server. For the others it is. Bayes is file based not mysql based. When I do "sa-learn --username=user --dump magic" I get the same result for whatever username I try, even if the user doesn't exist. "sa-learn --dump" tells me that both nspam & nham are >200 so it isn't waiting for training. I probably created the problem on Saturday when in ignorance, I decided that I would erase the bayes db and retrain it. I renamed the bayes_ files in /home/username/.spamassassin/ by adding .old. They were all automatically recreated but bayes no longer worked. Not understanding that perhaps they just needed training, I renamed them back and removed the new files. However, bayes did not resume working. I have since used "sa-learn --clear" and then retrained it with 200+ each of spam and ham but it still has not started working. I can't figure out whether on my system SA is using one bayes db for the whole system or one for each user or domain? However, the other domains seem to be working ok. In /etc/mail/spamassassin/ I have "use_bayes 1" Perhaps someone could spot something I've missed for me? Meanwhile, I'll go and study the wiki some more. Thanks. -- View this message in context: http://www.nabble.com/bayes-not-active-although-enabled--tp24663548p24672500.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
Re: bayes not active although enabled?
Jari Fredriksson wrote: > > > One can also use > > bayes_sql_override_username spam > > in local.cf, if the bayes is in a SQL database. I have that, and there > seems to be no difference if I use -u or not. > > I was wondering whether it was a user issue earlier, but I tried sa-learn --username=user --dump magic and it seemed to give the same result as the default user. I tried various different users (even made some up!) but it didn't complain - still gave me the same dump. While writing this, I just checked messages on another domain/user and found that bayes is working there! phew! That's a relief... it seems that it is only on my domain that we have an issue. On Friday, due to a lack of understanding of how spamassassin works, I renamed the following: /home/snowbnet/.spamassassin/bayes.mutex /home/snowbnet/.spamassassin/bayes_journal /home/snowbnet/.spamassassin/bayes_seen /home/snowbnet/.spamassassin/bayes_toks I added .old to the end of each. Afterwards, spamassassin recreated them and I though all was good, but because bayes stopped working, I changed them back and removed the newly created versions. In hind sight, I guess it just needed training. Anyway, don't know if what I did is related to this problem. Is the 'user', the email account user or the domain user? Also, I've just noticed that the bayes_journal has not been modified since Saturday about the time I renamed stuff. -- View this message in context: http://www.nabble.com/bayes-not-active-although-enabled--tp24663548p24668896.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
Re: bayes not active although enabled?
>> Benny Pedersen wrote: >>> >>> >>> On Sun, July 26, 2009 15:29, snowweb wrote: >>> 0.000 0258 0 non-token data: nspam 0.000 0160 0 non-token data: nham >>> >>> try to have them more or less equal to have good bayes >>> db >>> >>> so if less then 1000 in diff is fine >>> >>> if more then 1000 adjust learning scores >>> I see from that, that I've not trained as many HAM as I thought! OK, I'm off in search of some more HAM! Thanks guys. >>> >>> super you found the problem finaly >>> >>> -- >>> xpoint >>> >> >> Sorry, it hasn't solved it :( >> >> As you can see below, I now have more than 200 of both >> SPAM & HAM trained: >> >> [r...@s1 Maildir]# sa-learn --dump magic >> [1644] warn: FuzzyOcr: Cannot find executable for >> tesseract >> 0.000 0 3 0 non-token data: >> bayes db version >> 0.000 0278 0 non-token data: >> nspam >> 0.000 0221 0 non-token data: >> nham >> 0.000 0 34120 0 non-token data: >> ntokens >> 0.000 0 1245088823 0 non-token data: >> oldest atime >> 0.000 0 1248616170 0 non-token data: >> newest atime >> 0.000 0 1248620830 0 non-token data: >> last journal sync atime >> 0.000 0 0 0 non-token data: >> last expiry atime >> 0.000 0 0 0 non-token data: >> last expire atime delta >> 0.000 0 0 0 non-token data: >> last expire reduction count >> >> but here are the spam headers of a message, which show >> that bayes is not being used: >> >> X-Spam-Flag: NO >> X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) >> on s1.snowweb.info X-Spam-Level: ** >> X-Spam-Status: No, score=3.0 required=4.7 >> tests=RELAYCOUNTRY_US autolearn=no version=3.2.4 >> X-Spam-Report: >> * 3.0 RELAYCOUNTRY_US Relayed through United States >> of America >> * 0.0 HTML_MESSAGE BODY: HTML included in message >> X-Spam-Relay-Country: US US US US US US US US US >> >> This is not a random event. Bayes is not being used for >> any message. > > Which user you run the spam check with? sa-learn shows > root's magic. If use for example use user spam to check > the spam, you should call sa-learn as > > sa-learn -u spam --dump magic One can also use bayes_sql_override_username spam in local.cf, if the bayes is in a SQL database. I have that, and there seems to be no difference if I use -u or not.
Re: bayes not active although enabled?
> Benny Pedersen wrote: >> >> >> On Sun, July 26, 2009 15:29, snowweb wrote: >> >>> 0.000 0258 0 non-token data: >>> nspam >>> 0.000 0160 0 non-token data: >>> nham >> >> try to have them more or less equal to have good bayes db >> >> so if less then 1000 in diff is fine >> >> if more then 1000 adjust learning scores >> >>> I see from that, that I've not trained as many HAM as I >>> thought! OK, I'm off >>> in search of some more HAM! Thanks guys. >> >> super you found the problem finaly >> >> -- >> xpoint >> > > Sorry, it hasn't solved it :( > > As you can see below, I now have more than 200 of both > SPAM & HAM trained: > > [r...@s1 Maildir]# sa-learn --dump magic > [1644] warn: FuzzyOcr: Cannot find executable for > tesseract > 0.000 0 3 0 non-token data: > bayes db version > 0.000 0278 0 non-token data: > nspam > 0.000 0221 0 non-token data: > nham > 0.000 0 34120 0 non-token data: > ntokens > 0.000 0 1245088823 0 non-token data: > oldest atime > 0.000 0 1248616170 0 non-token data: > newest atime > 0.000 0 1248620830 0 non-token data: > last journal sync atime > 0.000 0 0 0 non-token data: > last expiry atime > 0.000 0 0 0 non-token data: > last expire atime delta > 0.000 0 0 0 non-token data: > last expire reduction count > > but here are the spam headers of a message, which show > that bayes is not being used: > > X-Spam-Flag: NO > X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) > on s1.snowweb.info X-Spam-Level: ** > X-Spam-Status: No, score=3.0 required=4.7 > tests=RELAYCOUNTRY_US autolearn=no version=3.2.4 > X-Spam-Report: > * 3.0 RELAYCOUNTRY_US Relayed through United States > of America > * 0.0 HTML_MESSAGE BODY: HTML included in message > X-Spam-Relay-Country: US US US US US US US US US > > This is not a random event. Bayes is not being used for > any message. Which user you run the spam check with? sa-learn shows root's magic. If use for example use user spam to check the spam, you should call sa-learn as sa-learn -u spam --dump magic
Re: bayes not active although enabled?
Benny Pedersen wrote: > > > On Sun, July 26, 2009 15:29, snowweb wrote: > >> 0.000 0258 0 non-token data: nspam >> 0.000 0160 0 non-token data: nham > > try to have them more or less equal to have good bayes db > > so if less then 1000 in diff is fine > > if more then 1000 adjust learning scores > >> I see from that, that I've not trained as many HAM as I thought! OK, I'm >> off >> in search of some more HAM! Thanks guys. > > super you found the problem finaly > > -- > xpoint > Sorry, it hasn't solved it :( As you can see below, I now have more than 200 of both SPAM & HAM trained: [r...@s1 Maildir]# sa-learn --dump magic [1644] warn: FuzzyOcr: Cannot find executable for tesseract 0.000 0 3 0 non-token data: bayes db version 0.000 0278 0 non-token data: nspam 0.000 0221 0 non-token data: nham 0.000 0 34120 0 non-token data: ntokens 0.000 0 1245088823 0 non-token data: oldest atime 0.000 0 1248616170 0 non-token data: newest atime 0.000 0 1248620830 0 non-token data: last journal sync atime 0.000 0 0 0 non-token data: last expiry atime 0.000 0 0 0 non-token data: last expire atime delta 0.000 0 0 0 non-token data: last expire reduction count but here are the spam headers of a message, which show that bayes is not being used: X-Spam-Flag: NO X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on s1.snowweb.info X-Spam-Level: ** X-Spam-Status: No, score=3.0 required=4.7 tests=RELAYCOUNTRY_US autolearn=no version=3.2.4 X-Spam-Report: * 3.0 RELAYCOUNTRY_US Relayed through United States of America * 0.0 HTML_MESSAGE BODY: HTML included in message X-Spam-Relay-Country: US US US US US US US US US This is not a random event. Bayes is not being used for any message. -- View this message in context: http://www.nabble.com/bayes-not-active-although-enabled--tp24663548p24667935.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
Re: bayes not active although enabled?
On Sun, July 26, 2009 15:29, snowweb wrote: > 0.000 0258 0 non-token data: nspam > 0.000 0160 0 non-token data: nham try to have them more or less equal to have good bayes db so if less then 1000 in diff is fine if more then 1000 adjust learning scores > I see from that, that I've not trained as many HAM as I thought! OK, I'm off > in search of some more HAM! Thanks guys. super you found the problem finaly -- xpoint
Re: bayes not active although enabled?
Benny Pedersen wrote: > > > On Sun, July 26, 2009 15:10, snowweb wrote: >> Sorry Benny, my message wasn't very clear (although your information was >> interesting). However, my main concern is that it is not using bayes to >> analyse the messages, let alone to learn from them. > > sa-learn --dump magic > >> I've now trained bayes with well over 200 mails, using sa-learn but I'm >> wondering if the parameters you mentions prevent it from learning even >> when >> using sa-learn since it still has not kicked in? > > there can be multiple tflags with noautolearn for the msg being tested, i > just want to be sure you see same problem if scores is > less then -0.1 or bigger then 12.1 > > -- > xpoint > I love you guys! You're spot on everytime... [r...@s1 Maildir]# sa-learn --dump magic [9647] warn: FuzzyOcr: Cannot find executable for tesseract 0.000 0 3 0 non-token data: bayes db version 0.000 0258 0 non-token data: nspam 0.000 0160 0 non-token data: nham 0.000 0 26027 0 non-token data: ntokens 0.000 0 1245088823 0 non-token data: oldest atime 0.000 0 1248611169 0 non-token data: newest atime 0.000 0 1248614005 0 non-token data: last journal sync atime 0.000 0 0 0 non-token data: last expiry atime 0.000 0 0 0 non-token data: last expire atime delta 0.000 0 0 0 non-token data: last expire reduction count I see from that, that I've not trained as many HAM as I thought! OK, I'm off in search of some more HAM! Thanks guys. -- View this message in context: http://www.nabble.com/bayes-not-active-although-enabled--tp24663548p24666952.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
Re: bayes not active although enabled?
On Sun, July 26, 2009 15:10, snowweb wrote: > Sorry Benny, my message wasn't very clear (although your information was > interesting). However, my main concern is that it is not using bayes to > analyse the messages, let alone to learn from them. sa-learn --dump magic > I've now trained bayes with well over 200 mails, using sa-learn but I'm > wondering if the parameters you mentions prevent it from learning even when > using sa-learn since it still has not kicked in? there can be multiple tflags with noautolearn for the msg being tested, i just want to be sure you see same problem if scores is less then -0.1 or bigger then 12.1 -- xpoint
Re: bayes not active although enabled?
Benny Pedersen wrote: > > > On Sun, July 26, 2009 04:43, snowweb wrote: >> >> In /etc/mail/spamassassin/local.cf >> >> bayes_auto_learn 1 >> >> But when I examine the message headers, >> >> X-Spam-Status: No, score=3.0 required=4.7 >> tests=ALL_TRUSTED,AWL,HTML_MESSAGE, >> MIME_HTML_ONLY,TVD_RCVD_IP autolearn=no version=3.2.4 >> >> Is there anywhere else that I need to switch this on? > > score 3.0 is inside default range for bayes learning as ham or spam, see > > perldoc Mail::SpamAssassin::Conf > > so bayes wont learn it, if it was -0.2 it will learn as ham, or 12.1 it > will learn as spam > > -- > xpoint > > Sorry Benny, my message wasn't very clear (although your information was interesting). However, my main concern is that it is not using bayes to analyse the messages, let alone to learn from them. I've now trained bayes with well over 200 mails, using sa-learn but I'm wondering if the parameters you mentions prevent it from learning even when using sa-learn since it still has not kicked in? -- View this message in context: http://www.nabble.com/bayes-not-active-although-enabled--tp24663548p24666833.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
Re: bayes not active although enabled?
On Sun, July 26, 2009 04:43, snowweb wrote: > > In /etc/mail/spamassassin/local.cf > > bayes_auto_learn 1 > > But when I examine the message headers, > > X-Spam-Status: No, score=3.0 required=4.7 > tests=ALL_TRUSTED,AWL,HTML_MESSAGE, > MIME_HTML_ONLY,TVD_RCVD_IP autolearn=no version=3.2.4 > > Is there anywhere else that I need to switch this on? score 3.0 is inside default range for bayes learning as ham or spam, see perldoc Mail::SpamAssassin::Conf so bayes wont learn it, if it was -0.2 it will learn as ham, or 12.1 it will learn as spam -- xpoint
Re: bayes not active although enabled?
snowweb wrote: > Sorry, got mixed up. In /etc/mail/spamassassin/local.cf > > use_bayes 1 > > Is there anywhere else that I need to switch this on since it does not > appear to be doing bayesian testing at all for any messages. > > check your sa-learn --dump magic SA won't activate bayes until it has learned at least 200 spam, and 200 nonspam messages. (under the general premise that until you have a decent amount of mail learned, the statistics are going to be a bit erratic and not worthwhile using)
Re: bayes not active although enabled?
Sorry, got mixed up. In /etc/mail/spamassassin/local.cf use_bayes 1 Is there anywhere else that I need to switch this on since it does not appear to be doing bayesian testing at all for any messages. -- View this message in context: http://www.nabble.com/bayes-not-active-although-enabled--tp24663548p24663913.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.
bayes not active although enabled?
In /etc/mail/spamassassin/local.cf bayes_auto_learn 1 But when I examine the message headers, X-Spam-Status: No, score=3.0 required=4.7 tests=ALL_TRUSTED,AWL,HTML_MESSAGE, MIME_HTML_ONLY,TVD_RCVD_IP autolearn=no version=3.2.4 Is there anywhere else that I need to switch this on? -- View this message in context: http://www.nabble.com/bayes-not-active-although-enabled--tp24663548p24663548.html Sent from the SpamAssassin - Users mailing list archive at Nabble.com.