Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!mp.cs.niu.edu!rickert From: rickert@mp.cs.niu.edu (Neil Rickert) Newsgroups: comp.mail.sendmail Subject: Re: $=m class Message-ID: <1990Sep26.220824.19155@mp.cs.niu.edu> Date: 26 Sep 90 22:08:24 GMT References: <9629@ur-cc.UUCP> Organization: Northern Illinois University Lines: 52 In article <9629@ur-cc.UUCP> Mark Sirota writes: >According to the SunOS 4.1 System & Network Administration manual, page 746, >the $=m class is a special class set to the domain name of this host. > >Well, pardon me if I'm wrong, but isn't the domain name a singular value? >Shouldn't it therefore be a macro, not a class? How is this class created, Since this seems to work on Sun's, I guess it is ok for it to be a class. Presumably Sun has installed some special purpose code in their versions of sendmail to handle this. Normally a class can only match a single token, so this must be specially handled. In other words it does not work like a normal class. >While I'm at it, I have a second question regarding hostnames. The $w macro >is set to the hostname of this site. For some sendmails, this is always the >short name, even if the hostname as reported by gethostbyname() contains the >domain. For other sendmails, the entire hostname is stored. This is an >annoying discrepancy between various sendmails... Older versions of sendmail set this to the hostname as reported by gethostname() - not gethostbyname(). Versions which are designed to read MX records from a name server set it to gethostbyname(gethostname()) - please excuse the wrong argument types - so that it will be fully qualified. When there are MX records, sendmail needs to be able to tell whether the MX record is to the local host, so there is a comparison with the value of $w, and this will only work correctly if $w is fully qualified. IMHO they should have done the comparison with $j, which would have caused less trouble. But presumably the programmers at Berkeley decided that $w is more reliable since it is defined internally and $j is not. I think this was a mistake since the defined meaning of $j is more precise than the defined meaning of $w. (On the other hand an awful lot of systems have $j wrongly defined - but then the same systems probably have $w wrongly defined too). >In any case, the $=w class is supposed to be a special class set to all of >the names this host is known by. Where does this information come from, and >for newer sendmails for which class tokens can contain dots, does this >include the domain name or not? The same question abotu a debugging value >applies as above... This is defined in code. I haven't tested it, but it probably doesn't work properly with MX versions where the hostname contains periods. Get the IDA versions of sendmail which allow $=x matches to work with multi-token comparisons. The '$=w' definitely works there. However to match all names of the host you will still need some 'Cw' lines in sendmail.cf. They have not yet fully implemented the RPM instruction (Read the Programmer's Mind). -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science Northern Illinois Univ. DeKalb, IL 60115. +1-815-753-6940