Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!mucs!cns!umaida!jf From: jf@ap.co.umist.ac.uk (John Forrest) Newsgroups: comp.mail.sendmail Subject: More Sendmail v5.65+IDA Funnies Message-ID: <1990Nov13.125434@ap.co.umist.ac.uk> Date: 13 Nov 90 12:54:34 GMT Sender: usenet@cns.umist.ac.uk (News System) Reply-To: jf@ap.co.umist.ac.uk (John Forrest) Organization: UMIST Computation, Manchester, UK. Lines: 70 Here is another great comment, from daemon.c in the sendmail 5.65+IDA source: /* ** Don't do recursive domain searches. An example why not: ** Machine cerl.cecer.army.mil has a UUCP connection to ** osiris.cso.uiuc.edu. Also at UIUC is a machine called ** uinova.cerl.uiuc.edu that accepts mail for the its parent domain ** cerl.uiuc.edu. Sending mail to cerl!user with recursion on ** will select cerl.uiuc.edu which maps to uinova.cerl.uiuc.edu. ** We leave RES_DEFNAMES on so single names in the current domain ** still work. ** ** Paul Pomes, CSO, UIUC 17-Oct-88 */ Where this comment is actually positioned, with Sendmail trying to open a port, this makes some sense (probably alot, but I haven't thought this bit fully through). However, further down we find: # ifdef NAMED_BIND /* ** See note in makeconnection() above for why we disable ** recursive domain matching. -pbp */ _res.options &= (~RES_DNSRCH & 0xffff); /* ** But make sure default domain qualification is enabled - ** it may have been disabled in deliver.c. -nr */ _res.options |= RES_DEFNAMES ; # endif /* NAMED_BIND */ hp = gethostbyname(hbuf); if (hp == NULL) { /* try lowercase version */ (void) strcpy(tmphbuf, hbuf); (void) makelower(tmphbuf); /* Could be just an MX record; look for anything */ ret = getcanonname(tmphbuf,sizeof(tmphbuf)); That is, the same modification has been added to where sendmail tries to use BIND to retrieve the canonical name. Nett effect? Well, domain searching doesn't work - that is the effect explicitly required by this mod. This is a pitty - it means you have to use other means to do what BIND will do automatically. For instance, in our domain: ap.co.umist.ac.uk users expect to be able to resolve: ap.co.umist -> ap.co.umist.ac.uk cns.umist -> cns.umist.ac.uk newcastle -> newcastle.ac.uk all of this will be done by the domain searching, but no with just DEF_NAMES. In fact, the latter only is next to useless - you can't even say jf@ap. This is one problem I have with this particular change, the second is that I can't see the point - unless I am very much mistaken, cerl!user will be converted to user@cerl.uucp before looking up here, and cerl.uucp should not resolve to any local domain. Have I missed something here. The second point, is there any advantage of calling "gethostbyname" in the fragment above before "getcanonname"? I'm tempted to take the former out, but would like to hear if there are problems created. John Forrest PS. Thanks to Neil Rickert for describing the advantages of getcanoname failing if the entry has its best MX back to the local node. Isn't this capability a reason for tacking out tghe call to gethostbyname ?