Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!samsung!ctrsol!emory!utkcs2!betelgeuse!moore From: moore@betelgeuse.cs.utk.edu (Keith Moore) Newsgroups: comp.mail.sendmail Subject: Re: How to recognize domain literals (was Re: How to use IP addresses ...) Message-ID: <1439@utkcs2.cs.utk.edu> Date: 2 Dec 89 06:39:47 GMT References: <8911292029.AA13662@jvncf.csc.org> <1436@utkcs2.cs.utk.edu> <3472@jhunix.HCF.JHU.EDU> Sender: news@utkcs2.cs.utk.edu Reply-To: moore@cs.utk.edu (Keith Moore) Organization: CS Dept -- University of TN, Knoxville Lines: 57 In article <3472@jhunix.HCF.JHU.EDU> ecf_hap@jhunix.UUCP (Andrew Poling) writes: >In article <1436@utkcs2.cs.utk.edu> moore@cs.utk.edu (Keith Moore) writes: >>In article , >> cfe+@andrew.cmu.edu (Craig F. Everhart) writes: >>(lamenting the fact that most sendmail sites don't recognize domain literals) >>>There's no cure but for the target administrator to fix the >>>sendmail.cf file to recognize explicit dotted-quads, alas, [...] >>While it's true that many sites running sendmail don't recognize >>domain literals, you don't have to hard-code the IP address into >>every machine's sendmail.cf file. The example below shows how. >[shows one method of recognizing domain literals using canonicalization] > >Wail hail, it's even easier than that if you have functional $[ and $] >canonicalization. In that case, attempting to canonicalize the address >should return the hosts domain name anyway. This can cause delivery failure for outgoing mail to domain literals, given the following set of conditions: 1) $[ IP-address $] yields "domain.address" 2a) DNS lookup of "domain.address" for record type MX yields a host with a different IP address, or 2b) DNS lookup of "domain.address" for ADDR record yields a different IP address than in the original domain literal. The situation described in case 2a is normal for many sites that send all incoming mail to a single host. But you still want to be able to send directly to any given IP address, if only for testing purposes. I've actually been bitten by the situation described in 2b. Furthermore, even though I could identify the problem using nslookup, I had no way of sending mail to the postmaster or system maintainer at that site. The only reason to use domain literals at all is as a trapdoor for when the name server / host tables are incorrect or insufficient. So it's important that they work properly even if the name server database at some particular site is bogus. To be fair, even the method I posted earlier will fail if all of the recipient's nameservers are down and there's no fallback to a local /etc/hosts file. (Sendmail really should pre-define a class that will match all local IP addresses as obtained from the SIOCGIFCONF ioctl; then the matches would be foolproof.) >I'm sure that most of the sites Craig was referring to don't yet have the >ability to canonicalize using $[ and $]. Well, support for $[ and $] (at least via the /etc/hosts file) has been in sendmail since version 4.39, dated August 1984. Any one on the Internet that is using something older should certainly ftp the latest sources from Berkeley and compile them :-). Keith Moore Internet: moore@cs.utk.edu University of Tenn. CS Dept. BITNET: moore@utkvx 107 Ayres Hall, UT Campus UT Decnet: utkcs::moore Knoxville Tennessee 37996-1301 Telephone: +1 615 974 0822