Ok, now my local.cf looking as follow: ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
rewrite_header Subject [***** SPAM _SCORE_ *****] required_score 5.0 report_safe 0 use_bayes 1 use_bayes_rules 1 bayes_auto_learn 1 skip_rbl_checks 0 use_razor2 1 use_dcc 0 use_pyzor 1 user_scores_dsn DBI:mysql:spamassassin:127.0.0.1 user_scores_sql_password spamassassin user_scores_sql_username spamassassin user_scores_sql_custom_query SELECT preference, value FROM _TABLE_ WHERE username = _USERNAME_ OR username = '@GLOBAL' OR username = concat('@', _DOMAIN_) ORDER BY username ASC But the result is the same: root@mail:~# grep prefs /var/lib/spamassassin/spamd.log Wed Jul 13 12:57:09 2011 [12013] dbg: config: retrieving prefs for spamd from SQL server Wed Jul 13 12:57:09 2011 [12014] dbg: config: retrieving prefs for spamd from SQL server SpamAssassin only check prefs for real users on the system. > Wednesday, July 13, 2011, 3:14:53 AM, Kristian wrote: > >> Is it nessacary needed? When i start spamd in debug mode saw the >> /usr/share/spamassassin/10_default_prefs.cf is proceeded. > > You shouldn't make any changes in the /usr/share/spamassassin > directory as they could be overwritten when you upgrade SpamAssassin. > I believe by default, the user_scores_* settings are commented out. > The default SpamAssassin stores userprefs in individual user > directories within the file system. Any changes to the config should > be done within the local.cf config file. > >>> Wednesday, July 13, 2011, 1:23:51 AM, Kristian wrote: >>> >>>> Hello im using spamassassin and user prefs in mysql database, i have >>>> successfully setting up mysql table and all about correct work of >>>> squirelmail plugin and from client site everything is ok. The problem >>>> is >>>> spamassassin can't handle username & domain variables.. >>> >>>> I mean this: >>> >>>> /usr/share/spamassassin/10_default_prefs.cf >>> >>>> user_scores_dsn DBI:mysql:spamassassin:localhost:3306 >>>> user_scores_sql_password spamassassin >>>> user_scores_sql_username spamassassin >>> >>> Do you have anything defined in your local.cf file? This is what I >>> have: >>> >>> user_scores_dsn DBI:mysql:spamass:127.0.0.1:3306 >>> user_scores_sql_username spamass >>> user_scores_sql_password password >>> user_scores_sql_custom_query SELECT preference, value FROM _TABLE_ >>> WHERE username = _USERNAME_ OR username = '@GLOBAL' OR username = >>> concat('@', _DOMAIN_) ORDER BY username ASC >>> >>> >>>> but when i started spamassassin with debug in the logs i watching >>>> this: >>> >>>> Tue Jul 12 18:54:12 2011 [10110] dbg: config: Conf::SQL: executing >>>> SQL: >>>> select preference, value from userpref where username = 'spamd' or >>>> username = '@GLOBAL' order by username asc >>> >>>> which is incorrect rule, because i need to replace username with >>>> virtual >>>> user and domain. The problem is spamassassin not recognize variables >>>> like >>>> _USERNAME_ or _DOMAIN_. >>> >>>> What is the problem and what i should do to fix is? >>>> Thanks. > > -- > Best regards, > Duane mailto:du...@duanemail.org > >