-------- Original-Nachricht --------
> Datum: Sat, 25 Aug 2007 00:42:47 +0200
> Von: Mark Martinec <[EMAIL PROTECTED]>
> An: amavis-user@lists.sourceforge.net
> Betreff: Re: [AMaViS-user] Question regarding SQL lookups

> Steve,
> 
Mark,


> > 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';
> 
This is PERFECT! It sounds exactly as what I have looked for.
I will try now to adopt your example to my needs.


> 
>   Mark
> 
Steve


> -------------------------------------------------------------------------
> 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/

-- 
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail

-------------------------------------------------------------------------
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