Path: utzoo!attcan!uunet!aplcen!jhunix!andy From: andy@jhunix.HCF.JHU.EDU (Andy S Poling) Newsgroups: comp.mail.sendmail Subject: Re: resolv options when rewriting sender (inconsistencies). Message-ID: <5764@jhunix.HCF.JHU.EDU> Date: 6 Jul 90 20:42:52 GMT References: <1990Jul3.020637.28385@ulrik.uio.no> Reply-To: andy@jhunix.hcf.jhu.edu (Andy Poling) Followup-To: comp.mail.sendmail Organization: The Johns Hopkins University - HCF Lines: 51 In article <1990Jul3.020637.28385@ulrik.uio.no> obh@ulrik.uio.no (Ole Bj|rn Hessen) writes: >In deliver.c, the following code is found: > > /* > ** Call the mailer. > */ > > if (ctladdr == NULL) > ctladdr = &e->e_from; >#ifdef NAMED_BIND > _res.options &= ~(RES_DEFNAMES | RES_DNSRCH); /* XXX */ >#endif > >The resolver options says that gethostbyname should not try to search >for hostname in local domain or parent domain, neither append local >domain if host is a single-component name. > >The context of the code implies that the macro $[ host $] doesn't >expand to host.local-domain while rewriting sender addresses. Actually, this code has nothing to do with the $[...$] macro. That's taken care of elsewhere. >Since this code only executes while delivering a letter, you >may get a bit surprised and baffled by this inconsistency between >mail delivery mode and sendmail test mode (-bt). > >Anybody care to comment on the reality on this code?? Any why there's >a lot of 'XXX's :-) Are people depending on this code?? I didn't really >like this code, so I commented it out. I think I know why this was done. First let's assume that you've handed deliver() an FQDN - which you should have by using the $[...$] macro somewhere in your sendmail.cf. If that's true, then there's no need to go tacking on additional domain names when trying to get MX's and their addresses. In fact, it's potentially possible to get the wrong information if you use RES_DEFNAMES | RES_DNSRCH and you happen to have local subdomains with certain names. At best, you're going to cause extra, useless queries to your neighborhood nameserver by commenting out that line. -Andy -- Andy Poling Internet: andy@gollum.hcf.jhu.edu Network Services Group Bitnet: ANDY@JHUNIX Homewood Academic Computing Voice: (301)338-8096 Johns Hopkins University UUCP: uunet!mimsy!aplcen!jhunix!andy