Return-Path: X-Original-To: apmail-spamassassin-users-archive@www.apache.org Delivered-To: apmail-spamassassin-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B62F94FD5 for ; Wed, 13 Jul 2011 08:17:17 +0000 (UTC) Received: (qmail 87904 invoked by uid 500); 13 Jul 2011 08:17:14 -0000 Delivered-To: apmail-spamassassin-users-archive@spamassassin.apache.org Received: (qmail 87430 invoked by uid 500); 13 Jul 2011 08:16:53 -0000 Mailing-List: contact users-help@spamassassin.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@spamassassin.apache.org Received: (qmail 87355 invoked by uid 99); 13 Jul 2011 08:16:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2011 08:16:49 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [78.90.1.17] (HELO mail.d3v1ous.info) (78.90.1.17) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jul 2011 08:16:40 +0000 Received: by mail.d3v1ous.info (Postfix, from userid 5001) id E80E6183C0; Wed, 13 Jul 2011 11:15:01 +0300 (EEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.d3v1ous.info X-Spam-Level: Received: from [192.168.0.5] (localhost [127.0.0.1]) by mail.d3v1ous.info (Postfix) with ESMTP id AAB0118367; Wed, 13 Jul 2011 11:14:53 +0300 (EEST) Received: from 192.168.0.4 (proxying for 213.16.42.98) (SquirrelMail authenticated user d3v1ous@d3v1ous.info) by 192.168.0.5 with HTTP; Wed, 13 Jul 2011 11:14:53 +0300 Message-ID: In-Reply-To: <1332003676.20110713030712@duanemail.org> References: <61ef93750db684b6ad96b71bdf048477.squirrel@192.168.0.5> <1332003676.20110713030712@duanemail.org> Date: Wed, 13 Jul 2011 11:14:53 +0300 Subject: Re: problem with spamassassin and sql From: "Kristian Kirilov" To: "Duane Hill" Cc: users@spamassassin.apache.org Reply-To: d3v1ous@d3v1ous.info User-Agent: SquirrelMail/1.4.20 MIME-Version: 1.0 Content-Type: text/plain;charset=UTF-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable version=3.3.1 Is it nessacary needed? When i start spamd in debug mode saw the /usr/share/spamassassin/10_default_prefs.cf is proceeded. > 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:duane@duanemail.org > >