Re: Bayes not running but no errors

2008-03-20 Thread Mitchell Hudson
I'm sorry I should have responded to you directly, I did try both, but 
encountered the same problem. It'll connect to the database and 
learn/store tokens, just won't compare against them.


Thanks again!

--Mitch

LEVEAU Stanislas wrote:
i think in your local.cf it s not 
Mail::SpamAssassin::BayesStore::*SQL * but 
Mail::SpamAssassin::BayesStore::*MySQL*

tries this

Mitchell Hudson a écrit :
Hmm... I was checking around and I found a bug with apache that might 
be related, but wanted to run it by here first:
The bug is here: 
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5728

and is related to spamd using -u in conjunction with -q and/or -Q

I'm calling spamd with this command:
/usr/bin/perl -T -w /hsphere/shared/bin/spamd --max-children=5 
--max-conn-per-child=5 --nouser-config --sql-config 
--username=vpopmail --socketpath=/var/hsphere/mail/spamd 
--socketowner=vpopmail --socketgroup=vchkpw --socketmode=770 
--syslog-socket=none


If that changes anything...

spamc -u [EMAIL PROTECTED] -q 32184 -Q 100000

Mitchell Hudson wrote:
I tried both just to be sure, but neither changed the messages when 
I did a --lint.


I noticed your dsn line was different than mine, so I tried changing 
it to localhost from :bayes_sql_dsn 
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
But then it just didn't connect to the database at all. I went 
through and made sure I had the perl modules installed, and I did 
install Mail::SpamAssassin::BayesStore::MySQL, but I already had 
Mail::SpamAssassin::BayesStore::SQL installed.


It seems to be connecting to the database great, it learns and I 
have a ton of tokens. But it's not pulling anything back out of the 
database ever. I grepped back through all of my sys logs to see if 
anything reported during all this testing but nothing showed up.


As always, thanks

Leveau Stanislas wrote:


My conf for an old mysql version

bayes_store_module  Mail::SpamAssassin::BayesStore::*SQL*
bayes_sql_dsn   DBI:mysql:spam:localhost

for a recent mysql version

bayes_store_module  Mail::SpamAssassin::BayesStore::*MySQL*
bayes_sql_dsn   DBI:mysql:spam:localhost


> Sure, I'll repaste the bayes portion, and include the rest of the 
file

> for good measure. Thanks again!
>
> # SpamAssassin config file for version 3.2x
> # Loading SpamAssassin User Preferences From An SQL Database
> user_scores_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> user_scores_sql_username  spamassassin
> user_scores_sql_password  ***
> # Using SpamAssassin Auto-Whitelists With An SQL Database
> use_auto_whitelist1
> auto_whitelist_factoryMail::SpamAssassin::SQLBasedAddrList
> user_awl_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> user_awl_sql_username spamassassin
> user_awl_sql_password ***
> user_awl_sql_tableawl
>
> # Using A SQL Database for Bayesian Storage Module
> use_bayes 1
> use_bayes_rules   1
> bayes_auto_learn  1
> bayes_store_moduleMail::SpamAssassin::BayesStore::SQL
> bayes_sql_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> bayes_sql_usernamespamassassin
> bayes_sql_password***
> bayes_min_ham_num 100
> bayes_min_spam_num100
> bayes_learn_during_report 1
> bayes_expiry_max_db_size  18
> bayes_auto_expire 0
> bayes_journal_max_size102400
> bayes_learn_to_journal0
> bayes_use_hapaxes 1
> bayes_sql_override_username  spamassassin
>
> add_header all BayesScore _BAYES_
> add_header all TokenSummary _TOKENSUMMARY_
> add_header all Bayestc _BAYESTC_
> add_header all Bayestcleanred  _BAYESTCLEARNED_
> add_header all bayestcspammy _BAYESTCSPAMMY_
> add_header all bayestchammy  _BAYESTCHAMMY_
> add_header all bayestop5hammytokens  _HAMMYTOKENS(5)_
> add_header all bayestop5spammytokens  _SPAMMYTOKENS(5)_
> score BODY_ENHANCEMENT 5.0
> score BODY_ENHANCEMENT2 5.0
> score DRUGS_ERECTILE 20.0
> score FB_CIALIS_LEO3 5.0
> score FRT_LEVITRA 5.0
> score FUZZY_CPILL 5.0
> score FUZZY_VPILL 5.0
> score SARE_ADULT2 5.0
> score SARE_SXLIFE 5.0
> score SARE_WEOFFER 5.0
> score FB_ADD_INCHES 5.0
> #score RCVD_IN_NJABL_DUL 2.9
> #score RAZOR2_CF_RANGE_51_100 1.5
> score DATE_IN_FUTURE_03_06 3.5
> score DATE_IN_FUTURE_06_12 2.5
> score  CHARSET_FARAWAY 6.0
> score  CHARSET_FARAWAY_HEADER 6.0
> # How many hits before a message is considered spam.
> required_score  5.00
> # Text to prepend to subject if rewrite_subject is used
> rewrite_header Subject  [SPAM]
> # Encapsulate spam in an attachment
> report_safe 0
&

Re: Bayes not running but no errors

2008-03-19 Thread Mitchell Hudson
Hmm... I was checking around and I found a bug with apache that might be 
related, but wanted to run it by here first:
The bug is here: 
https://issues.apache.org/SpamAssassin/show_bug.cgi?id=5728

and is related to spamd using -u in conjunction with -q and/or -Q

I'm calling spamd with this command:
/usr/bin/perl -T -w /hsphere/shared/bin/spamd --max-children=5 
--max-conn-per-child=5 --nouser-config --sql-config --username=vpopmail 
--socketpath=/var/hsphere/mail/spamd --socketowner=vpopmail 
--socketgroup=vchkpw --socketmode=770 --syslog-socket=none


If that changes anything...

spamc -u [EMAIL PROTECTED] -q 32184 -Q 100000

Mitchell Hudson wrote:
I tried both just to be sure, but neither changed the messages when I 
did a --lint.


I noticed your dsn line was different than mine, so I tried changing 
it to localhost from :bayes_sql_dsn 
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
But then it just didn't connect to the database at all. I went through 
and made sure I had the perl modules installed, and I did install 
Mail::SpamAssassin::BayesStore::MySQL, but I already had 
Mail::SpamAssassin::BayesStore::SQL installed.


It seems to be connecting to the database great, it learns and I have 
a ton of tokens. But it's not pulling anything back out of the 
database ever. I grepped back through all of my sys logs to see if 
anything reported during all this testing but nothing showed up.


As always, thanks

Leveau Stanislas wrote:


My conf for an old mysql version

bayes_store_module  Mail::SpamAssassin::BayesStore::*SQL*
bayes_sql_dsn   DBI:mysql:spam:localhost

for a recent mysql version

bayes_store_module  Mail::SpamAssassin::BayesStore::*MySQL*
bayes_sql_dsn   DBI:mysql:spam:localhost


> Sure, I'll repaste the bayes portion, and include the rest of the file
> for good measure. Thanks again!
>
> # SpamAssassin config file for version 3.2x
> # Loading SpamAssassin User Preferences From An SQL Database
> user_scores_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> user_scores_sql_username  spamassassin
> user_scores_sql_password  ***
> # Using SpamAssassin Auto-Whitelists With An SQL Database
> use_auto_whitelist1
> auto_whitelist_factoryMail::SpamAssassin::SQLBasedAddrList
> user_awl_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> user_awl_sql_username spamassassin
> user_awl_sql_password ***
> user_awl_sql_tableawl
>
> # Using A SQL Database for Bayesian Storage Module
> use_bayes 1
> use_bayes_rules   1
> bayes_auto_learn  1
> bayes_store_moduleMail::SpamAssassin::BayesStore::SQL
> bayes_sql_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> bayes_sql_usernamespamassassin
> bayes_sql_password***
> bayes_min_ham_num 100
> bayes_min_spam_num100
> bayes_learn_during_report 1
> bayes_expiry_max_db_size  18
> bayes_auto_expire 0
> bayes_journal_max_size102400
> bayes_learn_to_journal0
> bayes_use_hapaxes 1
> bayes_sql_override_username  spamassassin
>
> add_header all BayesScore _BAYES_
> add_header all TokenSummary _TOKENSUMMARY_
> add_header all Bayestc _BAYESTC_
> add_header all Bayestcleanred  _BAYESTCLEARNED_
> add_header all bayestcspammy _BAYESTCSPAMMY_
> add_header all bayestchammy  _BAYESTCHAMMY_
> add_header all bayestop5hammytokens  _HAMMYTOKENS(5)_
> add_header all bayestop5spammytokens  _SPAMMYTOKENS(5)_
> score BODY_ENHANCEMENT 5.0
> score BODY_ENHANCEMENT2 5.0
> score DRUGS_ERECTILE 20.0
> score FB_CIALIS_LEO3 5.0
> score FRT_LEVITRA 5.0
> score FUZZY_CPILL 5.0
> score FUZZY_VPILL 5.0
> score SARE_ADULT2 5.0
> score SARE_SXLIFE 5.0
> score SARE_WEOFFER 5.0
> score FB_ADD_INCHES 5.0
> #score RCVD_IN_NJABL_DUL 2.9
> #score RAZOR2_CF_RANGE_51_100 1.5
> score DATE_IN_FUTURE_03_06 3.5
> score DATE_IN_FUTURE_06_12 2.5
> score  CHARSET_FARAWAY 6.0
> score  CHARSET_FARAWAY_HEADER 6.0
> # How many hits before a message is considered spam.
> required_score  5.00
> # Text to prepend to subject if rewrite_subject is used
> rewrite_header Subject  [SPAM]
> # Encapsulate spam in an attachment
> report_safe 0
> # Enable or disable network checks
> skip_rbl_checks   1
> # Mail using locales used in these country codes will not be marked
> # as being possibly spam in a foreign language.
> ok_localesall
> # All cusom directives may be added to
> /hsphere/local/config/mail/spamassassin/custom.cf
> include /hsphere/local/config/mail/spamassassin/custom.c

Re: Bayes not running but no errors

2008-03-19 Thread Mitchell Hudson
I tried both just to be sure, but neither changed the messages when I 
did a --lint.


I noticed your dsn line was different than mine, so I tried changing it 
to localhost from :bayes_sql_dsn 
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
But then it just didn't connect to the database at all. I went through 
and made sure I had the perl modules installed, and I did install 
Mail::SpamAssassin::BayesStore::MySQL, but I already had 
Mail::SpamAssassin::BayesStore::SQL installed.


It seems to be connecting to the database great, it learns and I have a 
ton of tokens. But it's not pulling anything back out of the database 
ever. I grepped back through all of my sys logs to see if anything 
reported during all this testing but nothing showed up.


As always, thanks

Leveau Stanislas wrote:


My conf for an old mysql version

bayes_store_module  Mail::SpamAssassin::BayesStore::*SQL*
bayes_sql_dsn   DBI:mysql:spam:localhost

for a recent mysql version

bayes_store_module  Mail::SpamAssassin::BayesStore::*MySQL*
bayes_sql_dsn   DBI:mysql:spam:localhost


> Sure, I'll repaste the bayes portion, and include the rest of the file
> for good measure. Thanks again!
>
> # SpamAssassin config file for version 3.2x
> # Loading SpamAssassin User Preferences From An SQL Database
> user_scores_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> user_scores_sql_username  spamassassin
> user_scores_sql_password  ***
> # Using SpamAssassin Auto-Whitelists With An SQL Database
> use_auto_whitelist1
> auto_whitelist_factoryMail::SpamAssassin::SQLBasedAddrList
> user_awl_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> user_awl_sql_username spamassassin
> user_awl_sql_password ***
> user_awl_sql_tableawl
>
> # Using A SQL Database for Bayesian Storage Module
> use_bayes 1
> use_bayes_rules   1
> bayes_auto_learn  1
> bayes_store_moduleMail::SpamAssassin::BayesStore::SQL
> bayes_sql_dsn
> DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
> bayes_sql_usernamespamassassin
> bayes_sql_password***
> bayes_min_ham_num 100
> bayes_min_spam_num100
> bayes_learn_during_report 1
> bayes_expiry_max_db_size  18
> bayes_auto_expire 0
> bayes_journal_max_size102400
> bayes_learn_to_journal0
> bayes_use_hapaxes 1
> bayes_sql_override_username  spamassassin
>
> add_header all BayesScore _BAYES_
> add_header all TokenSummary _TOKENSUMMARY_
> add_header all Bayestc _BAYESTC_
> add_header all Bayestcleanred  _BAYESTCLEARNED_
> add_header all bayestcspammy _BAYESTCSPAMMY_
> add_header all bayestchammy  _BAYESTCHAMMY_
> add_header all bayestop5hammytokens  _HAMMYTOKENS(5)_
> add_header all bayestop5spammytokens  _SPAMMYTOKENS(5)_
> score BODY_ENHANCEMENT 5.0
> score BODY_ENHANCEMENT2 5.0
> score DRUGS_ERECTILE 20.0
> score FB_CIALIS_LEO3 5.0
> score FRT_LEVITRA 5.0
> score FUZZY_CPILL 5.0
> score FUZZY_VPILL 5.0
> score SARE_ADULT2 5.0
> score SARE_SXLIFE 5.0
> score SARE_WEOFFER 5.0
> score FB_ADD_INCHES 5.0
> #score RCVD_IN_NJABL_DUL 2.9
> #score RAZOR2_CF_RANGE_51_100 1.5
> score DATE_IN_FUTURE_03_06 3.5
> score DATE_IN_FUTURE_06_12 2.5
> score  CHARSET_FARAWAY 6.0
> score  CHARSET_FARAWAY_HEADER 6.0
> # How many hits before a message is considered spam.
> required_score  5.00
> # Text to prepend to subject if rewrite_subject is used
> rewrite_header Subject  [SPAM]
> # Encapsulate spam in an attachment
> report_safe 0
> # Enable or disable network checks
> skip_rbl_checks   1
> # Mail using locales used in these country codes will not be marked
> # as being possibly spam in a foreign language.
> ok_localesall
> # All cusom directives may be added to
> /hsphere/local/config/mail/spamassassin/custom.cf
> include /hsphere/local/config/mail/spamassassin/custom.cf
>
>
> -- Mitch
>
>
>
> Leveau Stanislas wrote:
>> Hi
>>
>> Can you show us your spamassassin configuration : local.cf
>>
>> Thanks
>>
>>> Mitchell Hudson schrieb am 19.03.2008 18:18:
>>>
>>>> I have a few questions though, you said I am not using   
>>>> bayes_sql_override_username  but I have   
>>>> "bayes_sql_override_username  spamassassin " in my config, does   
>>>> that not count?

>>>
>>> I'm sorry, I overlooked that. Yes, in the configuration that you 
posted

>>> it was set. And I also told rubbis

Re: Bayes not running but no errors

2008-03-19 Thread Mitchell Hudson

Hope this helps:

# mysql -V
mysql  Ver 14.12 Distrib 5.0.44, for pc-linux-gnu (i686) using readline 4.3

It would be nice if it was a mysql problem, those are usually easy 
enough to fix, but I couldn't find any bugs related to what I'm seeing, 
though I could certainly have missed something.


Leveau Stanislas wrote:

what is your mysql version?


Sure, I'll repaste the bayes portion, and include the rest of the file
for good measure. Thanks again!

# SpamAssassin config file for version 3.2x
# Loading SpamAssassin User Preferences From An SQL Database
user_scores_dsn
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
user_scores_sql_username  spamassassin
user_scores_sql_password  ***
# Using SpamAssassin Auto-Whitelists With An SQL Database
use_auto_whitelist1
auto_whitelist_factoryMail::SpamAssassin::SQLBasedAddrList
user_awl_dsn
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
user_awl_sql_username spamassassin
user_awl_sql_password ***
user_awl_sql_tableawl

# Using A SQL Database for Bayesian Storage Module
use_bayes 1
use_bayes_rules   1
bayes_auto_learn  1
bayes_store_moduleMail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock
bayes_sql_usernamespamassassin
bayes_sql_password***
bayes_min_ham_num 100
bayes_min_spam_num100
bayes_learn_during_report 1
bayes_expiry_max_db_size  18
bayes_auto_expire 0
bayes_journal_max_size102400
bayes_learn_to_journal0
bayes_use_hapaxes 1
bayes_sql_override_username  spamassassin

add_header all BayesScore _BAYES_
add_header all TokenSummary _TOKENSUMMARY_
add_header all Bayestc _BAYESTC_
add_header all Bayestcleanred  _BAYESTCLEARNED_
add_header all bayestcspammy _BAYESTCSPAMMY_
add_header all bayestchammy  _BAYESTCHAMMY_
add_header all bayestop5hammytokens  _HAMMYTOKENS(5)_
add_header all bayestop5spammytokens  _SPAMMYTOKENS(5)_
score BODY_ENHANCEMENT 5.0
score BODY_ENHANCEMENT2 5.0
score DRUGS_ERECTILE 20.0
score FB_CIALIS_LEO3 5.0
score FRT_LEVITRA 5.0
score FUZZY_CPILL 5.0
score FUZZY_VPILL 5.0
score SARE_ADULT2 5.0
score SARE_SXLIFE 5.0
score SARE_WEOFFER 5.0
score FB_ADD_INCHES 5.0
#score RCVD_IN_NJABL_DUL 2.9
#score RAZOR2_CF_RANGE_51_100 1.5
score DATE_IN_FUTURE_03_06 3.5
score DATE_IN_FUTURE_06_12 2.5
score  CHARSET_FARAWAY 6.0
score  CHARSET_FARAWAY_HEADER 6.0
# How many hits before a message is considered spam.
required_score  5.00
# Text to prepend to subject if rewrite_subject is used
rewrite_header Subject  [SPAM]
# Encapsulate spam in an attachment
report_safe 0
# Enable or disable network checks
skip_rbl_checks   1
# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_localesall
# All cusom directives may be added to
/hsphere/local/config/mail/spamassassin/custom.cf
include /hsphere/local/config/mail/spamassassin/custom.cf


-- Mitch



Leveau Stanislas wrote:

Hi

Can you show us your spamassassin configuration : local.cf

Thanks


Mitchell Hudson schrieb am 19.03.2008 18:18:

I have a few questions though, you said I am not using   
bayes_sql_override_username  but I have   
"bayes_sql_override_username  spamassassin " in my config, does   
that not count?


I'm sorry, I overlooked that. Yes, in the configuration that you 
posted

it was set. And I also told rubbish by claiming that you ran under the
username root. SA reported the internal userid from the sql table, and
that was probably the user 'spamassassin'.

As well I tried setting the min_ham and min_spam to 1 just for a  
 short test, and took out the bayes_sql_override_username  and it 
  wasn't calling. When I did the use spamassassin; select * from  
 bayes_vars; I did get a list of people, but they have very few   
tokens, in the order of 1 or 2 which looks to me like those  
tokens  were created when I was tinkering and removed the   
sql_override_username, otherwise everything is put into the   
spamassassin user which has a few hundred thousand tokens in it   
currently.


Yes, that's a valid explanation. Sorry for the confusion from my part.
But that leads us back to your question: "why it is not scoring?". Did
you really found all bayes-related output from --lint? If I run a
"spamassassin --lint -D 2>&1|grep -i bayes", I get more bayes-related
output:

[21631] dbg: plugin: loading Mail::SpamAssassin::Plugin::Bayes from 
@INC

[21631] dbg: config: fixed relative path:
/var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf
[21631] dbg: config: using
"/var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf"
for included file
[21631] dbg: config: read file
/var/lib/spamassassin/3.0020

Re: Bayes not running but no errors

2008-03-19 Thread Mitchell Hudson
Sure, I'll repaste the bayes portion, and include the rest of the file 
for good measure. Thanks again!


# SpamAssassin config file for version 3.2x
# Loading SpamAssassin User Preferences From An SQL Database
user_scores_dsn   
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock

user_scores_sql_username  spamassassin
user_scores_sql_password  ***
# Using SpamAssassin Auto-Whitelists With An SQL Database
use_auto_whitelist1
auto_whitelist_factoryMail::SpamAssassin::SQLBasedAddrList
user_awl_dsn  
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock

user_awl_sql_username spamassassin
user_awl_sql_password ***
user_awl_sql_tableawl

# Using A SQL Database for Bayesian Storage Module
use_bayes 1
use_bayes_rules   1
bayes_auto_learn  1
bayes_store_moduleMail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn 
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock

bayes_sql_usernamespamassassin
bayes_sql_password***
bayes_min_ham_num 100
bayes_min_spam_num100
bayes_learn_during_report 1
bayes_expiry_max_db_size  18
bayes_auto_expire 0
bayes_journal_max_size102400
bayes_learn_to_journal0
bayes_use_hapaxes 1
bayes_sql_override_username  spamassassin

add_header all BayesScore _BAYES_
add_header all TokenSummary _TOKENSUMMARY_
add_header all Bayestc _BAYESTC_
add_header all Bayestcleanred  _BAYESTCLEARNED_
add_header all bayestcspammy _BAYESTCSPAMMY_
add_header all bayestchammy  _BAYESTCHAMMY_
add_header all bayestop5hammytokens  _HAMMYTOKENS(5)_
add_header all bayestop5spammytokens  _SPAMMYTOKENS(5)_
score BODY_ENHANCEMENT 5.0
score BODY_ENHANCEMENT2 5.0
score DRUGS_ERECTILE 20.0
score FB_CIALIS_LEO3 5.0
score FRT_LEVITRA 5.0
score FUZZY_CPILL 5.0
score FUZZY_VPILL 5.0
score SARE_ADULT2 5.0
score SARE_SXLIFE 5.0
score SARE_WEOFFER 5.0
score FB_ADD_INCHES 5.0
#score RCVD_IN_NJABL_DUL 2.9
#score RAZOR2_CF_RANGE_51_100 1.5
score DATE_IN_FUTURE_03_06 3.5
score DATE_IN_FUTURE_06_12 2.5
score  CHARSET_FARAWAY 6.0
score  CHARSET_FARAWAY_HEADER 6.0
# How many hits before a message is considered spam.
required_score  5.00
# Text to prepend to subject if rewrite_subject is used
rewrite_header Subject  [SPAM]
# Encapsulate spam in an attachment
report_safe 0
# Enable or disable network checks
skip_rbl_checks   1
# Mail using locales used in these country codes will not be marked
# as being possibly spam in a foreign language.
ok_localesall
# All cusom directives may be added to 
/hsphere/local/config/mail/spamassassin/custom.cf

include /hsphere/local/config/mail/spamassassin/custom.cf


-- Mitch



Leveau Stanislas wrote:

Hi

Can you show us your spamassassin configuration : local.cf

Thanks


Mitchell Hudson schrieb am 19.03.2008 18:18:

I have a few questions though, you said I am not using  
bayes_sql_override_username  but I have  
"bayes_sql_override_username  spamassassin " in my config, does  
that not count?


I'm sorry, I overlooked that. Yes, in the configuration that you posted
it was set. And I also told rubbish by claiming that you ran under the
username root. SA reported the internal userid from the sql table, and
that was probably the user 'spamassassin'.

As well I tried setting the min_ham and min_spam to 1 just for a  
short test, and took out the bayes_sql_override_username  and it  
wasn't calling. When I did the use spamassassin; select * from  
bayes_vars; I did get a list of people, but they have very few  
tokens, in the order of 1 or 2 which looks to me like those tokens  
were created when I was tinkering and removed the  
sql_override_username, otherwise everything is put into the  
spamassassin user which has a few hundred thousand tokens in it  
currently.


Yes, that's a valid explanation. Sorry for the confusion from my part.
But that leads us back to your question: "why it is not scoring?". Did
you really found all bayes-related output from --lint? If I run a
"spamassassin --lint -D 2>&1|grep -i bayes", I get more bayes-related
output:

[21631] dbg: plugin: loading Mail::SpamAssassin::Plugin::Bayes from @INC
[21631] dbg: config: fixed relative path:
/var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf
[21631] dbg: config: using
"/var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf"
for included file
[21631] dbg: config: read file
/var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf
[21631] dbg: bayes: using username: mail
[21631] dbg: bayes: database connection established
[21631] dbg: bayes: found bayes db version 3
[21631] dbg: bayes: Using userid: 2
[21631] dbg: bayes: corpus size: nspam = 214240, nham = 138319
[21631] dbg: bayes: tok_get_all: token co

Re: Bayes not running but no errors

2008-03-19 Thread Mitchell Hudson



Alex Woick wrote:

Mitchell Hudson schrieb am 19.03.2008 18:18:

I have a few questions though, you said I am not using 
bayes_sql_override_username  but I have "bayes_sql_override_username  
spamassassin " in my config, does that not count?
I'm sorry, I overlooked that. Yes, in the configuration that you 
posted it was set. And I also told rubbish by claiming that you ran 
under the username root. SA reported the internal userid from the sql 
table, and that was probably the user 'spamassassin'.

heh, not a problem just wanted to make sure I wasn't missing something.


As well I tried setting the min_ham and min_spam to 1 just for a 
short test, and took out the bayes_sql_override_username  and it 
wasn't calling. When I did the use spamassassin; select * from 
bayes_vars; I did get a list of people, but they have very few 
tokens, in the order of 1 or 2 which looks to me like those tokens 
were created when I was tinkering and removed the 
sql_override_username, otherwise everything is put into the 
spamassassin user which has a few hundred thousand tokens in it 
currently.


Yes, that's a valid explanation. Sorry for the confusion from my part. 
But that leads us back to your question: "why it is not scoring?". Did 
you really found all bayes-related output from --lint? If I run a 
"spamassassin --lint -D 2>&1|grep -i bayes", I get more bayes-related 
output:


[21631] dbg: plugin: loading Mail::SpamAssassin::Plugin::Bayes from @INC
[21631] dbg: config: fixed relative path: 
/var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf
[21631] dbg: config: using 
"/var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf" 
for included file
[21631] dbg: config: read file 
/var/lib/spamassassin/3.002004/updates_spamassassin_org/23_bayes.cf

[21631] dbg: bayes: using username: mail
[21631] dbg: bayes: database connection established
[21631] dbg: bayes: found bayes db version 3
[21631] dbg: bayes: Using userid: 2
[21631] dbg: bayes: corpus size: nspam = 214240, nham = 138319
[21631] dbg: bayes: tok_get_all: token count: 21
[21631] dbg: bayes: score = 0.0020110638266459
[21631] dbg: bayes: DB expiry: tokens in DB: 461680, Expiry max size: 
50, Oldest atime: 1203126859, Newest atime: 1205950517, Last 
expire: 120521, Current time: 1205950517

[21631] dbg: rules: ran eval rule BAYES_00 ==> got hit (1)
[21631] dbg: check: 
tests=BAYES_00,MISSING_DATE,MISSING_HEADERS,MISSING_SUBJECT,NO_RECEIVED,NO_RELAYS 



I am using Mysql as database.

Tschau
Alex
Unfortunately that is really all the output which is why it's confusing, 
for everything I can find it should be working:


# spamassassin --lint -D 2>&1|grep -i bayes
[29262] dbg: config: read file 
/hsphere/local/config/mail/spamassassin/23_bayes.cf
[29262] dbg: config: read file 
/hsphere/local/config/mail/spamassassin/70_sare_bayes_poison_nxm.cf
[29262] dbg: config: fixed relative path: 
/hsphere/local/config/mail/spamassassin/sa-update/3.002000/updates_spamassassin_org/23_bayes.cf
[29262] dbg: config: using 
"/hsphere/local/config/mail/spamassassin/sa-update/3.002000/updates_spamassassin_org/23_bayes.cf" 
for included file
[29262] dbg: config: read file 
/hsphere/local/config/mail/spamassassin/sa-update/3.002000/updates_spamassassin_org/23_bayes.cf

[29262] dbg: bayes: using username: spamassassin
[29262] dbg: bayes: database connection established
[29262] dbg: bayes: found bayes db version 3
[29262] dbg: bayes: Using userid: 1




--
--
Mitchell Hudson
Systems Administrator
Front Gate Solutions
1711 S Congress Ave
Austin, TX 78704
P: 512-674-9337
C: 512-587-0918
F: 512-499-0440
[EMAIL PROTECTED]




Re: Bayes not running but no errors

2008-03-19 Thread Mitchell Hudson

Thank you so much for the help.

I have a few questions though, you said I am not using 
bayes_sql_override_username  but I have "bayes_sql_override_username  
spamassassin " in my config, does that not count? As well I tried 
setting the min_ham and min_spam to 1 just for a short test, and took 
out the bayes_sql_override_username  and it wasn't calling. When I did 
the use spamassassin; select * from bayes_vars; I did get a list of 
people, but they have very few tokens, in the order of 1 or 2 which 
looks to me like those tokens were created when I was tinkering and 
removed the sql_override_username, otherwise everything is put into the 
spamassassin user which has a few hundred thousand tokens in it currently.


Thanks again

--Mitch

Alex Woick wrote:

Mitchell Hudson schrieb am 18.03.2008 23:59:


Simply it's not scoring, it leanrs, but doesn't put a score on any mail.



#spamassassin -D --lint
[23822] dbg: bayes: using username: spamassassin
[23822] dbg: bayes: database connection established
[23822] dbg: bayes: found bayes db version 3
[23822] dbg: bayes: Using userid: 1


You are running this lint test as userid 1, that means as user root. 
This is not neccessarily the same user other spam/ham was learned with.



#From local.cf:
use_bayes 1
use_bayes_rules   1
bayes_auto_learn  1
bayes_store_moduleMail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn 
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock

bayes_sql_usernamespamassassin
bayes_sql_password***
bayes_min_ham_num 100
bayes_min_spam_num100
bayes_learn_during_report 1
bayes_expiry_max_db_size  18
bayes_auto_expire 0
bayes_journal_max_size102400
bayes_learn_to_journal0
bayes_use_hapaxes 1
bayes_sql_override_username  spamassassin


You are NOT using bayes_sql_override_username , that means 
you are using a per-user bayes filter. You probably call spamc with -u 
, so every  has its own set of tokens learned. 
Each user has to fulfill individually the minimum ham/spam mails learned.


To see which users have a bayes data set and how many spam/ham is 
learned for each of them, use this sql statement in a mysql client of 
your choice: SELECT * FROM bayes_vars


If you want to use a site-wide bayes database, use one global username 
with bayes_sql_override_username.


Tschau
Alex


--
--
Mitchell Hudson
Systems Administrator
Front Gate Solutions
1711 S Congress Ave
Austin, TX 78704
P: 512-674-9337
C: 512-587-0918
F: 512-499-0440
[EMAIL PROTECTED]




Bayes not running but no errors

2008-03-18 Thread Mitchell Hudson

Hello there,

I've been trying to get my bayesian filter working for a while now and 
haven't had any success so I was hoping someone might be able to point 
me in the right direction.


Simply it's not scoring, it leanrs, but doesn't put a score on any mail. 
It has more than enough tokens learned, it's accessing the database, 
none of the settings I can see are blocking it. Spamassassin itself is 
running great actually I have spamassassin sans bayes running pretty 
well, we just get a lot of spam so my users get irritated like users do. 
So I'm kindof stuck. Here's the general breakdown:


#spamassassin -D --lint
[23822] dbg: bayes: using username: spamassassin
[23822] dbg: bayes: database connection established
[23822] dbg: bayes: found bayes db version 3
[23822] dbg: bayes: Using userid: 1

Which is all that one says about bayes, nothing else.


#sa-learn -D --ham message
...
[24248] dbg: bayes: using username: spamassassin
[24248] dbg: bayes: database connection established
[24248] dbg: bayes: found bayes db version 3
[24248] dbg: bayes: Using userid: 1
[24248] dbg: config: score set 3 chosen.
[24248] dbg: learn: initializing learner
[24248] dbg: bayes: bayes journal sync starting
[24248] dbg: bayes: bayes journal sync completed
[24248] dbg: bayes: expiry starting
[24248] dbg: bayes: expiry completed
...
[24248] dbg: bayes: seen 
([EMAIL PROTECTED]) put
[24248] dbg: bayes: learned 
'[EMAIL PROTECTED]', atime: 1200549600



I added some bayes headers and pulled those from an e-mail header:
X-Spam-Bayes-Token-Summary: Bayes not run.

#From local.cf:
use_bayes 1
use_bayes_rules   1
bayes_auto_learn  1
bayes_store_moduleMail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn 
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock

bayes_sql_usernamespamassassin
bayes_sql_password***
bayes_min_ham_num 100
bayes_min_spam_num100
bayes_learn_during_report 1
bayes_expiry_max_db_size  18
bayes_auto_expire 0
bayes_journal_max_size102400
bayes_learn_to_journal0
bayes_use_hapaxes 1
bayes_sql_override_username  spamassassin

mysql -u spamassassin -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2368170


# sa-learn --dump all | grep token
0.000  0  3  0  non-token data: bayes db version
0.000  0 197643  0  non-token data: nspam
0.000  0  64097  0  non-token data: nham
0.000  0 233210  0  non-token data: ntokens
0.000  0 1200549600  0  non-token data: oldest atime
0.000  0 1205881213  0  non-token data: newest atime
0.000  0  0  0  non-token data: last journal 
sync atime

0.000  0 1205859633  0  non-token data: last expiry atime
0.000  0  43200  0  non-token data: last expire 
atime delta
0.000  0 125089  0  non-token data: last expire 
reduction count


And because I know someone is itching to ask :)   :
# spamassassin -V
SpamAssassin version 3.2.0
 running on Perl version 5.8.8

Any help at all is appreciated.

--
--
Mitch




Re: No Bayes Headers (no errors in debug/logs)

2008-01-30 Thread Mitchell Hudson
Hmm... Well that worked a lot better to get results, but unfortunately I 
still don't have either an error or a score.


Here's what I got :

[EMAIL PROTECTED] cur]# spamassassin -D bayes < mbox2vpopmail.29159.98:2,S | 
less
[15923] warn: netset: cannot include 127.0.0.1/32 as it has already been 
included

[15923] dbg: bayes: using username: spamassassin
[15923] dbg: bayes: database connection established
[15923] dbg: bayes: found bayes db version 3
[15923] dbg: bayes: Using userid: 1

...
X-Spam-Checker-Version: SpamAssassin 3.2.0 (2007-05-01)
X-Spam-Level:
X-Spam-Status: No, score=0.9 required=5.0 tests=HTML_FONT_FACE_BAD,
   HTML_MESSAGE autolearn=ham version=3.2.0


Thanks again for the help!

--Mitch

Matt Kettler wrote:

Mitchell Hudson wrote:
I did actually pull out the number of tokens and I have quite a few 
in there:


0.000  0  3  0  non-token data: bayes db version
0.000  0  23930  0  non-token data: nspam
0.000  0   8304  0  non-token data: nham
0.000  0 200096  0  non-token data: ntokens
0.000  0 1175826856  0  non-token data: oldest atime
0.000  0 1201535593  0  non-token data: newest atime
0.000  0  0  0  non-token data: last journal 
sync atime
0.000  0 1201492913  0  non-token data: last expiry 
atime
0.000  0  91902  0  non-token data: last expire 
atime delta
0.000  0 111416  0  non-token data: last expire 
reduction count



So I'm not worried about not having any training. And the 
spamassassin -D bayes -D bayes > message.txt, but in any case I let it run for about 30 
minutes and it didn't return any data, which seemed very strange.


I meant spamassassin -D bayes in to spamassassin, not over-write it with spamassassin's output.


You got no output, because you gave it no message.


I also tried reinstalling the perls bayes modules from cpan, which 
did update, but didn't correct the problem. I've sat there and 
watched /var/log/current for quite a while, and watched the debug 
info. It's so strange bayes seems to load, as in it will learn and 
accesses the database, adds new tokens, etc. But doesn't actually 
score. I've checked all my configuration files and can't find 
anything weird. I'm at a loss. 


Try a manual message scan, as above, and see how that does.



--
--
Mitch




Re: No Bayes Headers (no errors in debug/logs)

2008-01-28 Thread Mitchell Hudson
I did actually pull out the number of tokens and I have quite a few in 
there:


0.000  0  3  0  non-token data: bayes db version
0.000  0  23930  0  non-token data: nspam
0.000  0   8304  0  non-token data: nham
0.000  0 200096  0  non-token data: ntokens
0.000  0 1175826856  0  non-token data: oldest atime
0.000  0 1201535593  0  non-token data: newest atime
0.000  0  0  0  non-token data: last journal 
sync atime

0.000  0 1201492913  0  non-token data: last expiry atime
0.000  0  91902  0  non-token data: last expire 
atime delta
0.000  0 111416  0  non-token data: last expire 
reduction count



So I'm not worried about not having any training. And the spamassassin 
-D bayes  
message.txt, but in any case I let it run for about 30 minutes and it 
didn't return any data, which seemed very strange.


I also tried reinstalling the perls bayes modules from cpan, which did 
update, but didn't correct the problem. I've sat there and watched 
/var/log/current for quite a while, and watched the debug info. It's so 
strange bayes seems to load, as in it will learn and accesses the 
database, adds new tokens, etc. But doesn't actually score. I've checked 
all my configuration files and can't find anything weird. I'm at a loss.


Thanks so much for your response

--Mitch

Matt Kettler wrote:

Matt Kettler wrote:

Mitchell Hudson wrote:

Hello there,

I have spamassassin loaded and is running pretty well, it's supposed 
to be using bayes and I can't find any errors that would tell me why 
it's not, but it's not. When I do a debug log there are no db 
connection errors, in fact it's auto-learning just fine. I've put in 
a few thousand learning e-mails of both spam and ham so I know it's 
over the min limit. Basically everything looks like it's supposed to 
except there's no bayes header in the spamassassin headers and when 
I tail -f /var/log/spamd/current when it says which tests it runs 
bayes is never present. So basically I'm hoping there's a secret 
ninja option that says 'no really I would like to use bayes'. In any 
case thoughts would be appreciated.


spamassassin -V:
SpamAssassin version 3.2.0

I do use a control panel called hsphere, but it calls spamassassin 
like this:
/usr/bin/perl -T -w /hsphere/shared/bin/spamd --max-children=2 
--max-conn-per-child=5 --nouser-config --sql-config 
--username=vpopmail --socketpath=/var/hsphere/mail/spamd 
--socketowner=vpopmail --socketgroup=vchkpw --socketmode=770 
--syslog-socket=none


manually calling spamassassin doesn't change the no bayes issue.


have you tried:

sa-learn --dump magic

Just to confirm there are as many messages as you think?



Hit send too soon..

Another thing to try is bayes debugging.

spamassassin -D bayes That should un-burry all the bayes messages from all the other debug, 
and generates more bayes debug than the default -D does.




--
--
Mitchell Hudson
Systems Administrator
Front Gate Solutions
1711 S Congress Ave
Austin, TX 78704
P: 512-674-9337
C: 512-587-0918
F: 512-499-0440
[EMAIL PROTECTED]




No Bayes Headers (no errors in debug/logs)

2008-01-25 Thread Mitchell Hudson

Hello there,

I have spamassassin loaded and is running pretty well, it's supposed to 
be using bayes and I can't find any errors that would tell me why it's 
not, but it's not. When I do a debug log there are no db connection 
errors, in fact it's auto-learning just fine. I've put in a few thousand 
learning e-mails of both spam and ham so I know it's over the min limit. 
Basically everything looks like it's supposed to except there's no bayes 
header in the spamassassin headers and when I tail -f 
/var/log/spamd/current when it says which tests it runs bayes is never 
present. So basically I'm hoping there's a secret ninja option that says 
'no really I would like to use bayes'. In any case thoughts would be 
appreciated.


spamassassin -V:
SpamAssassin version 3.2.0

I do use a control panel called hsphere, but it calls spamassassin like 
this:
/usr/bin/perl -T -w /hsphere/shared/bin/spamd --max-children=2 
--max-conn-per-child=5 --nouser-config --sql-config --username=vpopmail 
--socketpath=/var/hsphere/mail/spamd --socketowner=vpopmail 
--socketgroup=vchkpw --socketmode=770 --syslog-socket=none


manually calling spamassassin doesn't change the no bayes issue.

Just more spamd calls:
/usr/bin/spamd -d -c -m5 -H -r /var/run/spamd.pid

local.cf:
user_scores_dsn   
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock

user_scores_sql_username  spamassassin
user_scores_sql_password  4235b270d0
use_auto_whitelist1
auto_whitelist_factoryMail::SpamAssassin::SQLBasedAddrList
user_awl_dsn  
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock

user_awl_sql_username spamassassin
user_awl_sql_password 4235b270d0
user_awl_sql_tableawl
use_bayes 1
use_bayes_rules   1
bayes_auto_learn  1
bayes_store_moduleMail::SpamAssassin::BayesStore::SQL
bayes_sql_dsn 
DBI:mysql:spamassassin:mysql_socket=/var/lib/mysql/mysql.sock

bayes_sql_usernamespamassassin
bayes_sql_password*
bayes_min_ham_num 100
bayes_min_spam_num100
bayes_learn_during_report 1
bayes_expiry_max_db_size  18
bayes_auto_expire 1
bayes_journal_max_size102400
bayes_learn_to_journal0
bayes_use_hapaxes 1
bayes_sql_override_username  spamassassin
required_score  4.0
rewrite_header Subject  [SPAM]
report_safe 0
skip_rbl_checks   1
ok_localesall