On Jul 15, 2004, at 08:28, Dave Markham wrote:
> #routers
> ext_if_not_int:
> driver = dnslookup
> domains = ! +local_domains
> transport = external_smtp
> headers_remove = recieved
> condition = ${lookup
> dnsdb{mx=$domain}lsearch{/usr/exim/internal_ips}fail} <- this bit
> made up
Some problems with the above statement:
- You are performing an MX lookup, which will (should!) return a name,
not an IP address. Matching it against a list of IP addresses will
always fail.
- A single ${lookup..} cannot query both 'dnsdb' and 'lsearch'. You
need
nested lookups.
- Per syntax of the ${lookup...} function, "fail" is not valid where
you
put it.
You probably mean something like:
condition = ${lookup {${lookup{a=$domain}{$value}fail}} \
lsearch {/usr/exim/internal_ips} \
{true}}
But may I ask why you do this? Doesn't the line:
domains = ! +local_domains
take care of what you try to accomplish?
-tor