From: joost@cadlab.de (Michael Joosten)
Newsgroups: comp.sys.sgi
Subject: Re: sendmail on Indigo
Date: 23 Nov 92 22:42:54
Organization: CADLAB, Paderborn, FRG
Reply-To: joost@cadlab.de
NNTP-Posting-Host: ori.cadlab.uni-paderborn.de
In-reply-to: roberts@nimrod.wpd.sgi.com's message of Wed, 18 Nov 1992 19:53:01 GMT

Ah, just the right thread at the right time. We are running 4.0.2.

In article <shcmfp4@sgi.sgi.com> roberts@nimrod.wpd.sgi.com (Robert Stephens) writes:


   >                                                           Also, when
   > receiving mail my machine always greets the sending machine with
   > something like "HELO machinename.D, why do you call yourself
   > machinename.domainname".

   The message implies that your host knows the connecting host by a
   different name than the connecting host knows itself.  If you do a
   "/usr/sbin/canonhost machinename" what do you get?

"canonhost" - How does it retrieve the canonical hostname? On our SGIs (in a
Sun NIS) "canonhost ingold" returns "ingold", or must the full name be first
in /etc/hosts etc.?

our /etc/hosts: 131.234.80.57   ingold  ingold.cadlab.de

Apparently Irix insists that the first name-column has to contain the full
name. I'm not sure what happens if we change our whole NIS host map in this
way..... 

   I don't understand the .D

Ha! I bite. This day I just tracked this problem down. Apparently this occurs
if your gethostbyaddress() doesn't return the fully qualified hostname of the
client, as it is in our NIS system (w're mainly Sun-equipped). In this case,
sendmail tries to build the full name by means of the option 'N', this is in
daemon.c, function getrequests() (this is at least true for the BSD4.3
sendmail sources). There the full name is built by appending the value of the
variable 'NetName' to the hostname as returned by gethostbyaddr(). 'NetName'
in turn comes from the sendmail option 'N', which is set in the default config
file to 'ON$D'. But here is a bug: option statements do *not* evaluate macros,
so when you change it to 'ON<domainname>' this will be (more) correct. After
having done this, 4.0.2's sendmail now greets me with:

220 ingold Sendmail 920110.SGI/911001.SGI ready at Mon, 23 Nov 92 21:37:44 +0100
helo ori.cadlab.de
250 Hello ori.cadlab.de, why do you call yourself ori.cadlab.de?
          ^^^^^^^^^^^^                            ^^^^^^^^^^^^^ Huh?
  
This message comes from srvrsmtp.c, somewhere after a 'case CMDHELO'. This
sort of message doesn't in occur in 4.3 sendmail, only in IDA and 4.2, and
looking now in IDA I can't see what's wrong there:

                        if (RealHostName != NULL && strcasecmp(ptr, RealHostName
))
                        {
                                char hostbuf[MAXNAME];

                                (void) sprintf(hostbuf, "%s (%s)", ptr, RealHost
Name);
                                DeclHostName = newstr(hostbuf);
                                message("250", "Hello %s, why do you call yourse
lf %s?",
                                        RealHostName, ptr);
                        }

Is this in 4.0.2 sendmail different? On the other hand, IDA does not try to
append the 'N' option to the client's hostname, so I had to look in two
different sources (and BSD Net2's sendmail also omits the appending of NetName..)

Well, Robert, do you have access to the sources ? Maybe you could explain this
a bit... 8-)


Michael
--
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Michael Joosten   |       Tel.  : (+49) (+) 5251-284 120                 |
| CADLAB            |       Fax   : (+49) (+) 5251-284 140                 |
| Bahnhofstr. 32    |       E-Mail: joost@cadlab.de                        |
| D-4790 Paderborn  |        	    ...!uunet!unido!cadlab!joost           | 
| FRG               | Mass mail to: joost@pbinfo.uni-paderborn.de          |
|--------------------------------------------------------------------------|
| CADLAB is a cooperation between Uni-GH Paderborn & SNI AG                |
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~