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

-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to