Steve, > Now I would like to use a SQL query for @local_domains_maps to get a list > of the domains. But the query would be executed against a totally different > database then the one amavis-new is using.
Not sure what you have in mind, but perhaps the following example from amavisd.conf-sample can supply you an idea: # Here is an example of a SELECT clause that fabricates an artificial 'users' # table from actual table 'postfix_domains' containing a field 'domain_name'. # The effect is that domains listed in the 'postfix_domains' table will be # treated as local by amavisd, and be given settings from a policy id 99 # if such a policy id exists, or just fall back to static lookups. # The user.id (with a value 1) is there only to provide a user id (same id # for all listed domains) when global SQL-based white/blacklisting is used. # # $sql_lookups_no_at_means_domain = 1; # $sql_select_policy = # 'SELECT *, user.id'. # ' FROM (SELECT 1 as id, 99 as policy_id, "Y" AS local'. # ' FROM postfix_domains WHERE domain_name IN (%k)) AS user'. # ' LEFT JOIN policy ON policy_id=policy.id'; Mark ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/
