Re: [Exim] Variable/operator that contains results of MX loo…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: David S. Madole
Dátum:  
Címzett: mark moseley, exim-users
Tárgy: Re: [Exim] Variable/operator that contains results of MX lookup?
> "mark moseley" <moseleymark@???> wrote:
>
> I'm curious if the MX records of a looked-up domain
> are available in a variable?
>
> I've got mail servers behind load balancers, thus in a
> private IP range. To fool the mail servers into
> thinking that they are local for those IP (and should
> handle mail for domains whose MX records resolve
> there), I've set up dummy interfaces with those IPs.
>
> This is a bit error-prone to remember when setting up
> new servers and bothers me as a bit inelegant (and
> likely to come back to haunt me down the road).
>
> What I'd like to do (if it's possible) is to be able
> to bypass dnslookup routers based on something like:
> condition = ${if
> !match($mx_lookup_or_whatever}{\Nmy-ips-regex\N}{1}{0}}
> (don't mind the syntax) or something similar depending
> on the output.


I don't know how to do what you're asking, but just having the MX records
wouldn't help; you'd need the addresses of the hosts the MX records point to
for your condition to work. MX records don't contain addresses directly.

How about setting extra_local_interfaces to the list of addresses your MX
records might resolve to:

http://www.exim.org/exim-html-4.30/doc/html/spec_toc.html#TOC137

Or, if your MX records point to hosts in a single specific domain, rather
than client's domains, just set hosts_treat_as_local to the appropriate
domain:

http://www.exim.org/exim-html-4.30/doc/html/spec_14.html#IX1130

David