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: Chris <racerx AT makeworld DOT com>
To: carlos AT fisica.ufpr DOT br (Carlos Carvalho)
Date: Sat, 11 Aug 2007 20:10:21 -0500
On Sat, 11 Aug 2007 22:02:15 -0300
carlos AT fisica.ufpr DOT br (Carlos Carvalho) wrote:

> 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.
>  >> 
>  >> 
> 

You NEED a valid MX record for mail to work. Here's DNSStuff's output

DNS Lookup: mat.ufpr.br MX record
Generated by www.DNSstuff.com at 01:09:21 GMT on 12 Aug 2007.

How I am searching:

Searching for mat.ufpr.br MX record at c.root-servers.net
[192.33.4.12]: Got referral to E.DNS.br. (zone: br.) [took 24 ms]
Searching for mat.ufpr.br MX record at E.DNS.br. [200.229.248.10]: Got
referral to ns2.ufpr.br. (zone: ufpr.br.) [took 127 ms] Searching for
mat.ufpr.br MX record at ns2.ufpr.br. [200.17.209.123]: Reports that no
MX records exist. [took 348 ms] Response: No MX records exist for
mat.ufpr.br. [Neg TTL=86400 seconds] Details: ns2.ufpr.br. (an
authoritative nameserver for mat.ufpr.br.) says that there are no MX
records for mat.ufpr.br. The E-mail address in charge of the
mat.ufpr.br. zone is: root AT mat.ufpr DOT br. There is no need to refresh the
page -- to see the DNS traversal, to make sure that all DNS servers are
reporting the same results, you can Click Here. Note that these results
are obtained in real-time, meaning that these are not cached results.
These results are what DNS resolvers all over the world will see right
now (unless they have cached information).


-- 
Best regards,
Chris
Registerd Linux user number 448639

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