From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <0bfd32bfe8981a44d7e61aa8de388107@coraid.com> From: erik quanstrom Date: Tue, 16 Jan 2007 14:05:05 -0500 To: 9fans@cse.psu.edu Subject: Re: [9fans] $smtp dns failure In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: 04ae17ba-ead2-11e9-9d60-3106f5b1d025 =C2=A75 of rfc 2821 spells out how to do the lookup. smtpd should do tha= t. if there are any huristics to apply while running the lookup, it would make sense to me to do as sendmail/postifix/qmail do. smtp is an interface to the world. being different isn't a virtue in this case. - erik On Tue Jan 16 13:46:09 EST 2007, rsc@swtch.com wrote: > > there is an interesting case with mxlookup1() in mxdial.c. > > if a dns /failure/ is reported for the mx lookup, then mxdial doesn't > > try a/cname records. i've had trouble in the past with mx failures w= hen the > > a record looks up just fine. i'm not sure if the standard says one m= ust quit > > on dns failure. >=20 > if there is a dns failure, the logic there is that since the > mx could not be determined due to some transient dns error, > we are not going to blindly try the underlying host name, > because that is likely to be wrong. i am sure that i put this > in because of actual problems. >=20 > the real problem is that smtp is doing a dns lookup on 192.168.0.22, > which ndb/dns interprets as a request for a reverse lookup > (that is, it looks up 22.0.168.192.in-addr.arpa), which fails. > mxlookup should probably check whether ds->host is a > valid ip address all by itself, and then return 0 if so, rather > than ask dns anything at all. unfortunately i don't think there > is a library routine that will tell us whether a string is a valid > ip address. parseip doesn't. >=20 > russ