You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Jon Schulman <jo...@accessway.net> on 2005/10/28 18:51:49 UTC

SpamAssassin and SQL problems

Hello - 

 

I am trying to manage a SpamAssassin implementation with a MySQL backend for
users to manage their own settings. I am running into some strange problems
with this, however. 

 

When I do a spamassassin -lint, I receive the following message:

 

config: SpamAssassin failed to parse line, skipping: user_scores_sql_table
userpref

warning: score set for non-existent rule BAYES_90

warning: score set for non-existent rule BAYES_70

warning: score set for non-existent rule HABEAS_SWE

 

The first line is what concerns me - the table definitely exists, and the
SQL user can access it, etc. That line also comes after several other SQL
config lines in the local.cf file, which I am placing below:

 

# Setup db vars to point to the MySQL prefs

user_scores_dsn                 DBI:mysql:mail:localhost

user_scores_sql_username        mail

user_scores_sql_password        ************

user_scores_sql_table           userpref

 

To add additional strangeness, SpamAssassin seems to be using the SQL table
for some things and not others. For instance, if I modify bounce-levels or
reporting options, SpamAssassin will take them into account. However, the
whitelist_from and blacklist_from options seem to be being ignored. Debug
output from spamc and spamd don't show any errors relating to this. 

 

I am running spamd at boot time with the following command: 

 

spamd_pidfile=${spamd_pidfile:-"/var/run/spamd/spamd.pid"}

spamd_flags=${spamd_flags:-"-c -d -Q -r ${spamd_pidfile} "}

 

The server is running SpamAssassin 3.0.3, Perl 5.8.7, MySQL 4.1.15.

 

Any help anyone can provide would be of great assistance. Thanks! I will
gladly provide any additional info (within reason of course - don't expect
my root passwords or anything) if anyone needs it.

 

Jon


Re: SpamAssassin and SQL problems

Posted by Dan <ka...@gmail.com>.
I use the following spamd flags: -d -x -q -r pidfile

The -x is for ignoring userpref files.  You are using -Q which is
similar to -q, both of which are supposed to be used with -x.  This is
according to spamd's man file.

So my suggestion would be try adding -x to your spamd flags.  Also I
don't know if -c is used with sql.

-Dan