RE: [exim] one more condition

Pàgina inicial
Delete this message
Reply to this message
Autor: Jakob Hirsch
Data:  
A: Chris Knipe
CC: exim-users
Assumpte: RE: [exim] one more condition
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...