Gary V-2 wrote:
> 
>>I'm running amavisd-new with spamassassin and setup bayes and mysql
earlier
>>today. It seems to connect to the db fine with user vscan when running
>>spamassassin -d. I ran sa-learn --spam/ham < spam.txt (full email headers
>>too) a few times and those are the only entires in the db, the ones that I
>>added, all other email is untouched. What's the deal? Here is my local.cf
>>file... awl seems to work fine, but it scores mail funky sometimes.
>>
>># Enable the Bayes system
>>use_bayes 1
>>bayes_store_module                Mail::SpamAssassin::BayesStore::SQL
>>bayes_sql_dsn                     DBI:mysql:bayes
>>bayes_sql_username                vscan
>>bayes_sql_password                vscan
>>bayes_sql_override_username       vscan
>>
>># Enable awl
>>auto_whitelist_factory            Mail::SpamAssassin::SQLBasedAddrList
>>user_awl_dsn                      DBI:mysql:bayes
>>user_awl_sql_username             vscan
>>user_awl_sql_password             vscan
>>
>>--
> 
> You probably ran the commands as root, so you are only looking at root's 
> data. Add this in local.cf:
> 
> bayes_sql_override_username vscan
> 
> That way everyone will see the same data (site wide configuration). You
> want 
> to always run spamassassin and sa-learn commands as the vscan user but 
> adding this seting means that even if you learn spam or ham as root,
> vscan's 
> data will be updated.
> 
> su vscan -c 'sa-learn --spam < spam.txt'
> 
> Gary V
> 
> _________________________________________________________________
> PC Magazine’s 2007 editors’ choice for best Web mail—award-winning Windows 
> Live Hotmail. 
> http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_pcmag_0507
> 
> 
> 

The command was run as user vscan (amavisd-new user and spamassassin user).
If you look closer you will see that my config already has that directive. 

-- 
View this message in context: 
http://www.nabble.com/mySQL-bayes-not-working-correctly-tf3896467.html#a11049679
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.

Reply via email to