Chris Knipe wrote:

> Blah:
>   driver = accept
>   domains = mysql query to get the relay domains
>   local_parts = mysql query to select the users from mysql to the relay
> domains
>   verify_only

This implies that there is another router that handles the delivery, like:

blah2:
 driver = dnslookup
 domains = mysql query to get the relay domains
 no_verify


But that won't help you with your logic problem. I don't know your tables,
but something like this could work (my sql is a little rusty...)

!condition = ${lookup mysql{
  SELECT 'yes' FROM domain, user
  WHERE domain.name = '{quote_mysql:$domain}'
  AND (domain.verify = 0
       OR (domain.domain_id = user.domain_id
           AND user.local_part = '{quote_mysql:$local_part}'))
  LIMIT 1}}

(trailing \es stripped)

not exactly beautiful, though...



-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to