Re: [exim] Consider local_domains only if DNS matches

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Stanislaw Halik
Date:  
À: exim-users
Sujet: Re: [exim] Consider local_domains only if DNS matches
On Sun, May 13, 2007, Peter Thomassen wrote:
> So, how do I configure Exim to only deliver mail locally if the domain is in
> local_domains AND a DNS lookup confirms that our machine is in the MX
> records of the domain in question, hence serving the domain?


Here's something I've been using for a while:

domainlist local_domains = ${if \
        and { \
          { match_domain{$domain}{+virtual_domains} } \
          { match{${lookup dnsdb{mx=$domain}{$value}fail}}{\N(?mi)^\d+ ME_REGEXP$\N}} \
        }{$domain}{}}


Note that an empty MX record will cause a defer and A records aren't
taken into account at all.

-- 
Whenever you find that you are on the side of the majority, it is time
to reform.
                -- Mark Twain