Re: user prefs from sql problem

2009-09-09 Thread Karel Beneš
Hi,

On Tue, Sep 08, 2009 at 09:45:18PM -0400, Matt Kettler wrote:
 Did you set these options in your local.cf?:
 
   user_scores_dsn   DBI:driver:connection
   user_scores_*sql*_username  dbusername
   user_scores_*sql*_password  dbpassword
 
 And what did you set user_scores_dsn to?

  my local.cf settings is:

user_scores_dsn DBI:mysql:spamassassin:localhost
user_scores_sql_usernamespamassassin
user_scores_sql_passwordx

--kb

-- 
Karel Beneš be...@is.svitavy.cz
RádobyFotoBlog: http://kaaia.rohozna.cz/rfb/


Re: user prefs from sql problem [solved]

2009-09-09 Thread Karel Beneš
On Wed, Sep 09, 2009 at 09:32:27AM +0200, Karel Beneš wrote:
 On Tue, Sep 08, 2009 at 09:45:18PM -0400, Matt Kettler wrote:
  Did you set these options in your local.cf?:
  
user_scores_dsn   DBI:driver:connection
user_scores_*sql*_username  dbusername
user_scores_*sql*_password  dbpassword
  
  And what did you set user_scores_dsn to?
 
   my local.cf settings is:
 
 user_scores_dsn DBI:mysql:spamassassin:localhost
 user_scores_sql_usernamespamassassin
 user_scores_sql_passwordx

Works fine now. My expectation was wrong. I have expect that new rows
will be inserted automatically (in the same way as user_pref file is
created) but it is not true. It seems userpref table is read-only
from spamassassin perspective. When I insert appropriate rows there,
they are recognized and considered by spamassassin.

Current spamd parameters: --max-children 2 --nouser-config
--sql-config --setuid-with-sql.

Maybye, explicit note in readme about this behaviour would avoid
confusion like this.

Regards,
Karel

-- 
Karel Beneš be...@is.svitavy.cz
RádobyFotoBlog: http://kaaia.rohozna.cz/rfb/


Re: user prefs from sql problem [solved]

2009-09-09 Thread Kris Deugau

Karel Beneš wrote:

Works fine now. My expectation was wrong. I have expect that new rows
will be inserted automatically (in the same way as user_pref file is
created)


Well, it's true that the userprefs file is automatically created...  but 
it's created empty (aside from comments and whitespace).  I'm curious 
what you think should have been autocreated in the SQL table.


-kgd


Re: user prefs from sql problem [solved]

2009-09-09 Thread Karel Beneš
On Wed, Sep 09, 2009 at 10:47:28AM -0400, Kris Deugau wrote:
 Karel Beneš wrote:
 Works fine now. My expectation was wrong. I have expect that new rows
 will be inserted automatically (in the same way as user_pref file is
 created)

 Well, it's true that the userprefs file is automatically created...  but  
 it's created empty (aside from comments and whitespace).  I'm curious  
 what you think should have been autocreated in the SQL table.

My interpretation of creation empty userprefs file was: here is
settings which you can customize according to your needs, so I have
supposed same behaviour with sql-based userprefs.

No problem, all's well that ends well. :)

--kb

-- 
Karel Beneš be...@is.svitavy.cz
RádobyFotoBlog: http://kaaia.rohozna.cz/rfb/


user prefs from sql problem

2009-09-08 Thread Karel Beneš
Hi,

  I am trying to load user preferences from SQL db (mysql). Setup was
done according to doc/spamassassin/sql/README.gz, but user
preferences are still loaded from files. No error message is raised
into log file in debug mode. DB-based bayes and awl works fine.

Debian GNU/Linux 5.0.3, spamassassin 3.2.5, mysql 5.0.51a.

Spamassassin is invoked by spamc in /etc/procmailrc.

spamd --max-children 2 --helper-home-dir --setuid-with-sql -d
--pidfile=x

What is going wrong?

Thanks a lot,
--kb

-- 
Karel Beneš be...@is.svitavy.cz
RádobyFotoBlog: http://kaaia.rohozna.cz/rfb/


Re: user prefs from sql problem

2009-09-08 Thread Matt Kettler
Karel Beneš wrote:
 Hi,

   I am trying to load user preferences from SQL db (mysql). Setup was
 done according to doc/spamassassin/sql/README.gz, but user
 preferences are still loaded from files. No error message is raised
 into log file in debug mode. DB-based bayes and awl works fine.

 Debian GNU/Linux 5.0.3, spamassassin 3.2.5, mysql 5.0.51a.

 Spamassassin is invoked by spamc in /etc/procmailrc.

 spamd --max-children 2 --helper-home-dir --setuid-with-sql -d
 --pidfile=x

 What is going wrong?
   
Did you set these options in your local.cf?:

  user_scores_dsn   DBI:driver:connection
  user_scores_*sql*_username  dbusername
  user_scores_*sql*_password  dbpassword

And what did you set user_scores_dsn to?

See also:

sql/README from the tarball (web copy for 3.2.x at:
http://svn.apache.org/repos/asf/spamassassin/branches/3.2/sql/README)




 Thanks a lot,
 --kb