Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!mp.cs.niu.edu!rickert From: rickert@mp.cs.niu.edu (Neil W. Rickert) Newsgroups: comp.mail.sendmail Subject: Re: Problem with MXs in Sun sendmail Message-ID: <1990Sep7.033443.21995@mp.cs.niu.edu> Date: 7 Sep 90 03:34:43 GMT References: <1267@kluge.fiu.edu> <18507@ucsd.Edu> Distribution: na Organization: Northern Illinois University Lines: 39 In article <18507@ucsd.Edu> brian@ucsd.Edu (Brian Kantor) writes: >In sendmails 5.59 thru 5.64, there is a bug in domain.c that doesn't >properly compare MX names with hostnames - it doesn't use the FQDN of >your local host, so if your local hostname isn't set to a FQDN but is >instead a simple hostname (as most Suns are), the MX (which is fully >qualified) will not match to the local hostname, and you'll try to open >a connection to yourself - getting the 'not recognized as local' >(formerly, 'I refuse to talk to myself') error. I assume Sun's >sendmail has the bug too. > >The following patch (to 5.64) fixes that; it also adds a bit more >debugging that I used to figure this out. > - Brian ... patch followed. ----- Congratulations. You just fixed a problem which did not exist. The problem is in your sendmail configuration file, not in getmxrr(). Certainly there is a problem in getmxrr() in domain.c, for which I supplied a fix about two weeks ago. But it is not here. Background: getmxrr() is called from deliver.c with one of the parameters (localhost) supposedly the name of the local host. It is computed in deliver.c by evaluating $w. In my opinion this is wrong, and it should use $j (that patch is in the IDA versions). I did send Berkeley email about this several weeks ago. (If you want to change this, look in deliver.c a few lines before getmxrr() is called). Brian's patch instead takes the value of localhost, and canonicalizes it first. THIS SHOULD NEVER WORK. If this works, your sendmail.cf is wrong. The $w macro should already be canonical. If not, redefine $w near the beginning of sendmail.cf -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science Northern Illinois Univ. DeKalb, IL 60115. +1-815-753-6940