Hi,

I've got a very closely related (I think) question to the post from 
earlier this month with the above subject (I'm new to the list, so I 
assume this will not be properly threaded into that original thread).

I'm trying to do something very similar, only not *quite* as complex and 
am wondering if it's possible.

I'm already using SpamAssassin successfully through amavis, as I'm sure 
almost everyone does.  It took a bit of permissions switching around to 
get amavis's SA instance to correctly read my local.cf from 
/etc/spamassassin, but I got that ironed out.

I've also recently enabled the user_scores options in order to read some 
supplemental SA configs from a MySQL database, but I don't really care 
about it being handled on a per user basis (right now anyway).

Is there a simple way for me to get the SA instance called from within 
amavis (in the normal Perl library method) to honor those user_scores 
flags that I have set?

My secrets.cf file looks like this:

user_scores_dsn                  DBI:mysql:<deleted>:localhost:3306
user_scores_sql_password         <deleted>
user_scores_sql_username         <deleted>
user_scores_sql_custom_query     SELECT preference, value FROM 
sa_userpref WHERE username = _USERNAME_ OR username = '$GLOBAL' OR 
username = CONCAT('%',_DOMAIN) ORDER BY username ASC

and when I test SpamAssassin with something like "spam -D -q" (the "-q" 
being the key part, I think) from the command line, it works fine, 
including the SQL data.

Is there any way for me to do this using amavisd-new-2.4.1 (latest 
stable in Gentoo) without resorting to any kind of patching?

Thanks for any insight,

John Lawler

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to