Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!blake!ndsuvax!necurtis From: necurtis@ndsuvax.UUCP (William Bruce Curtis) Newsgroups: comp.mail.sendmail Subject: Re: sendmail 5.61 turns off resolver inappropriately Keywords: sendmail resolver bind Message-ID: <2905@ndsuvax.UUCP> Date: 12 Sep 89 18:06:00 GMT References: <3440@blake.acs.washington.edu> Reply-To: necurtis@ndsuvax.UUCP (William Bruce Curtis) Organization: North Dakota State University, Fargo Lines: 63 In article <3440@blake.acs.washington.edu> Steve Hubert writes: > I have designed a sendmail.cf for our campus. The addition of these > lines in deliver.c: > > #ifdef NAMED_BIND > _res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */ > #endif > #ifdef NAMED_BIND > _res.options |= RES_DEFNAMES | RES_DNSRCH; /* XXX */ > #endif > > to turn off RES_DNSRCH and RES_DEFNAMES in deliver() is causing > problems for me. Presumably, this was done so that everyone would > (Example problems deleted) >Fix: > Removal of the two XXX lines from deliver.c would fix this problem. > An alternative fix would be to turn the resolver options back on > before each call to remotename(). (I haven't checked that idea out.) > >Steve Hubert >Networks and Distributed Computing >Univ. of Washington, Seattle >hubert@cac.washington.edu Last week I also ran into the same problem with host names in headers not being fully qualified. I wasn't sure that the lines above were causing the problem or what problems deleting them would cause so I wound up turning the resolver options back on before the call to remotename in daemon.c Below is the diff for the additions to daemon.c: *** daemon.c.orig Tue Sep 12 12:23:01 1989 --- daemon.c Tue Sep 12 12:23:48 1989 *************** *** 37,42 **** --- 37,44 ---- # include # include # include + # include + # include /* ** DAEMON.C -- routines to use when running as a daemon. *************** *** 539,544 **** --- 543,553 ---- } else { + /* NDSU fix. If _res.options has been messed with make */ + /* sure that it will be re-initialized. Bruce Curtis */ + if (!(_res.options & RES_DEFNAMES)) + _res.options = RES_DEFAULT; + hp = gethostbyname(hbuf); if (hp == NULL) { /* try lowercase version */ -- Bruce Curtis necurtis@plains.NoDak.edu necurtis@ndsuvax.bitnet North Dakota State University ..!uunet!ndsuvax!necurtis