Andreas Freyvogel:
> Am I to understand that Postfix will first try to lookup the MX record via
> DNS and if should that fail it will use the value configured in the
> /etc/hosts file?
> 

No. Assuming that DNS lookups are enabled, and that there are
no overrides with transport_maps or otherwise:

1) Postfix looks up the MX record. 

2) If the result is one or more MX records, Postfix will try to
deliver to the named hosts.

3) If the result is NXDOMAIN or NODATA then Postfix looks up the
up the IP address.

4) Otherwise the result is an error (timeout, SERVFAIL, malformed
reply, whatever). Postfix defers delivery or bounces the message,
depending on error details.

5) Postfix can be configured (with smtp_host_lookup) to look
the IP address in local databases besides DNS. But this is not
the default in Postfix source code from postfix.org mirrors.

In your case, apparently either DNS lookup was disabled, or the MX
lookup resulted in an NXDOMAIN or NODATA response (i.e. some DNS
server was confused or mis-configured and wrong information got
cached in a local DNS server so Postfix kept banging into the wall).

        Wietse
> 
> -----Original Message-----
> From: owner-postfix-us...@postfix.org
> [mailto:owner-postfix-us...@postfix.org] On Behalf Of Wietse Venema
> Sent: Monday, September 12, 2011 12:36 PM
> To: Postfix users
> Subject: Re: Postfix Question: strange issue with mx record lookup
> 
> Andreas Freyvogel:
> > The email address to which we are sending is "u...@mmm.com".
> 
> Postfix will send to the A record for mmm.com if MX lookup is
> disabled, or if MX lookup results in a "not found" response (either
> NXDOMAIN or NODATA).
> 
> Postfix does not send to the A record if MX fails due to any other
> error such as timeout or server failure.
> 
> If your MX lookups "by hand" succeed and Postfix still sends to the
> /etc/hosts address, then something is broken at your end.
> 
> Perhaps you have an outdated (or missing) etc/resolv.conf file in
> the Postfix queue. With a missing etc/resolv.conf file, some resolvers
> will contact the DNS server on 127.0.0.1. And with an outdated
> etc/resolv.conf, anything could happen.
> 
>       Wietse
> 
> 
> 
> 

Reply via email to