[exim] Domain list intersection.

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: David Woodhouse
Fecha:  
A: exim-users
Asunto: [exim] Domain list intersection.
Is there a way to get a domainlist which contains the intersection of
two other domainlists -- i.e. which contains only domains which are in
_both_ of the component domainlists?

I have a list of virtual domains which are to be handled specially --
the aliases in TXT records thing. But the magic DNS zones in which you
look up the aliases aren't visible everywhere; they have to be slaved
explicitly by the local named. I'm extending the cluster of machines
which share (mostly) the same configuration and I'm trying to avoid
having to give the list of virtual domains differently for each host.

So instead of just 'domainlist dns_virtual_domains = lsearch;FILE' I'd
actually like to make it something like

domainlist dns_virtual_domains = lsearch;FILE ∩ @mx_any

Obviously I can do this in every place that 'dns_virtual_domains' gets
used, by adding more conditions using @mx_any... but there are other
domainlists like 'virtual_domains' which include the other types of
virtual domain and that would soon get ugly.

Is there a sane way of doing this?

I tried:

domainlist not_dns_virtual_domains = !lsearch;FILE : !@mx_any
domainlist dns_virtual_domains = !+not_dns_virtual_domains

But due to the way domainlists are evaluated, a domain which is in the
FILE is then _not_ in +not_dns_virtual_domains regardless of whether
it's in @mx_any or not.

Now I'm staring at and testing:

domainlist not_dns_virtual_domains_base = !lsearch;CONFDIR/conf/DNS_VIRTUAL
domainlist not_mx_any = !@mx_any
domainlist not_dns_virtual_domains = +not_dns_virtual_domains_base : +not_mx_any
domainlist dns_virtual_domains = !+not_dns_virtual_domains

... which is starting to make my brain hurt. Am I missing something?

--
dwmw2