On 1 Jun 2016, at 9:07, KSB wrote:
Hi!
I have in config
ignore_mx_lookup_error = no
as default. Which, as I understand, don't force to look for A record,
if MX not found.
As Wietse has already explained, that is NOT what that setting does. "No
response" as used in the documentation is different from a non-error
response with no answer records, a response that the domain does not
exist, or a server failure response. "No response" is what you get when
a DNS server is unavailable or takes so long to answer that your
resolver times out.
There is no need to explicitly set ignore_mx_lookup_error to "no"
because that is the default, complying with the RFC5321 delivery
specification. Setting it to "yes" can result in fast permanent failure
of delivery instead of a transient failure that might resolve in a short
time.
But in logs I clearly see, that is tried to deliver mails to ip
address which corresponds to domain A record if domain haven't MX. It
is needed for some RFC
Yes. This is how email routing has been done since the widespread
deployment of DNS to replace distribution of the global HOSTS.TXT file,
about 30 years ago. A description of how the MX RRTYPE and A fallback
came to exist with the relevant RFC references is at
https://en.wikipedia.org/wiki/MX_record#History_of_fallback_to_address_record
and can this behavior be changed, to not try A?
I know of no way to do that in Postfix, short of patching the source
code in a way which would be incompatible with how Internet email has
operated for the past 30 years. Fallback to A records in the absence of
any MX records is the only way to get email to addresses in some
domains. There is not (and never has been) any standard requiring a MX
record for any domain name that can accept email. Such a requirement
would needlessly bloat some DNS zones and increase DNS traffic volume
because a "no answer" reply to an initial MX query is smaller than a
reply with an answer record of the same name as the one being queried.