postfix-users

Re: dns A records not used when there's no MX

Subject: Re: dns A records not used when there's no MX
From: carlos AT fisica.ufpr DOT br (Carlos Carvalho)
To: postfix-users AT postfix DOT org
Date: Sat, 11 Aug 2007 22:02:15 -0300
Wietse Venema (wietse AT porcupine DOT org) wrote on 10 August 2007 20:55:
 >Carlos Carvalho:
 >> Messages have been getting stuck in the smtp queue because the
 >> destination doesn't have a MX record. Here's an example:
 >> 
 >> Aug  9 07:49:34 hoggar postfix/smtp[7034]: 3B95232E1A4: to=<X AT example 
 >> DOT com>, relay=none, delay=80142, delays=80142/0.02/0/0, dsn=4.4.3, 
 >> status=deferred (Host or domain name not found. Name service error for 
 >> name=example.com type=MX: Host not found, try again)
 >>
 >> The dns answer is "MX record currently not present".
 >
 >No that was NOT the DNS reply. "Host not found, try again" means
 >that no valid reply was received.

What do you mean by "no valid reply"? Both host and dig say the
nameserver answered but the answer section was empty. Here it goes
with the real name, you can see it too:

% host -v -v -v -t mx mat.ufpr.br 
Default domain:
Search domains: 
Timeout per retry: 5 secs
Number of retries: 2
Number of addresses: 1
0.0.0.0
Options set: INIT RECURSE DEFNAMES
Options clr: DEBUG AAONLY USEVC PRIMARY IGNTC STAYOPEN DNSRCH

Query about mat.ufpr.br for record types MX
Trying mat.ufpr.br ...
Query failed, 0 answers, status: no error
Authority information:
mat.ufpr.br             80441   IN      SOA     mat.ufpr.br root.mat.ufpr.br (
                        2007011900      ;serial (version)
                        21600   ;refresh period (6 hours)
                        3600    ;retry interval (1 hour)
                        3600000 ;expire time (5 weeks, 6 days, 16 hours)
                        86400   ;default ttl (1 day)
                        )
mat.ufpr.br MX record currently not present

The A record is there:

% host mat.ufpr.br        
mat.ufpr.br             A       200.17.211.64

% dig mx mat.ufpr.br +multiline            

; <<>> DiG 9.4.1-P1 <<>> mx mat.ufpr.br +multiline
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 62634
;; flags: qr ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;mat.ufpr.br.           IN MX

;; AUTHORITY SECTION:
mat.ufpr.br.            80887 IN SOA mat.ufpr.br. root.mat.ufpr.br. (
                                2007011900 ; serial
                                21600      ; refresh (6 hours)
                                3600       ; retry (1 hour)
                                3600000    ; expire (5 weeks 6 days 16 hours)
                                86400      ; minimum (1 day)
                                )

 >> The messages stay
 >> in the queue until the maximal_queue_lifetime expires. However the
 >> example.com destination *does have* an A record. According to rfc 2881:
 >> 
 >>    "If no MX records are found, but an A RR is found, the A RR is
 >>    treated as if it was associated with an implicit MX RR, with a
 >>    preference of 0, pointing to that host."
 >> 
 >> So why are the msgs not being sent to the IP address pointed to by the
 >> A record? I have ignore_mx_lookup_error=no and
 >> smtp_defer_if_no_mx_address_found=no (default values), with postfix
 >> version 2.4.3.
 >> 
 >> 

<Prev in Thread] Current Thread [Next in Thread>