Subject: Message-ID in Pine Sun Binary

From: Dan Schlitt <[email-masked]>
Date: Tue, 8 Nov 1994 10:34:22 -0500 (EST)

A quick question which probably has a simple solution that I don't see.

I just upgraded from 3.05 to 3.91 and now the Message-ID does not contain
the complete FQDN but just the hostname.  I have tried a few of the
options which I thought should have an effect but nothing seems to work. 
Is there a way to get the fully qualified name without doing a compile?

Thanks.

/dan

-- 

Dan Schlitt                           School of Engineering Computer Systems
[email-masked]        City College of New York
(212)650-6760                         New York, NY 10031

---

From: Barry Cornelius <[email-masked]>
Date: Tue, 8 Nov 1994 20:49:00 +0000 (GMT)

> Is there a way to get the fully qualified name without doing a compile?

Your Subject says "Sun Binary".  Is this a binary obtained from Washington
or is it one that you have compiled yourself?  Is it for Solaris 2.x or
SunOS 4.1.x?  If it's for Solaris 2.x, then I think this is caused by a
what I think is a bug in Solaris 2.3. 

The file pine/reply.c has the generate_message_id function. It uses the
value of ps->hostname.  This value is set up by init_hostname in init.c.
The function init_hostname calls getdomainnames to generate this value. 
The function getdomainnames is defined in pine/osdep/domnames.  It uses
gethostbyname.  I believe that the Solaris 2.3 gethostbyname does not 
return a FQDN.  Please tell me if I am wrong!

--
Barry Cornelius                      Telephone: (0191 or +44 191) 374 4717
IT Service, Science Site,    IT Service Office: (0191 or +44 191) 374 2892   
University of Durham,                      Fax: (0191 or +44 191) 374 3741
Durham, DH1 3LE, UK                   E-mail: [email-masked]

---

From: Dan Schlitt <[email-masked]>
Date: Tue, 8 Nov 1994 19:27:54 -0500 (EST)

It is the Sun OS binary from Washington.

Ordinarily I would not be asking.  I would just compile the source. 
However, somewhere on the path between here and Seattle there is a lot of
packet loss so I have not been able to ftp the source.  (It took 2 hours
to get the binary :-( )

/dan

--

---

From: [email-masked] (Xander Jansen)
Date: Wed, 9 Nov 1994 18:16:22 GMT

Barry Cornelius ([email-masked]) wrote:
: On Tue, 8 Nov 1994, Dan Schlitt wrote:
: > A quick question which probably has a simple solution that I don't see.
: > I just upgraded from 3.05 to 3.91 and now the Message-ID does not contain
: > the complete FQDN but just the hostname.  I have tried a few of the
: > options which I thought should have an effect but nothing seems to work. 
: > Is there a way to get the fully qualified name without doing a compile?

: Your Subject says "Sun Binary".  Is this a binary obtained from Washington
: or is it one that you have compiled yourself?  Is it for Solaris 2.x or
: SunOS 4.1.x?  If it's for Solaris 2.x, then I think this is caused by a
: what I think is a bug in Solaris 2.3. 

: The file pine/reply.c has the generate_message_id function. It uses the
: value of ps->hostname.  This value is set up by init_hostname in init.c.
: The function init_hostname calls getdomainnames to generate this value. 
: The function getdomainnames is defined in pine/osdep/domnames.  It uses
: gethostbyname.  I believe that the Solaris 2.3 gethostbyname does not 
: return a FQDN.  Please tell me if I am wrong!

You're right (although I think it is 'does not always', depending on the
/etc/hosts file ?). From the Solaris Porting FAQ (you'll find it in your
nearest news.answers repository, directory Solaris2, file porting-FAQ):

       *      gethostbyname() always returns null in h->aliases.
         *      Now, gethostbyX can be replaced its __switch_gethostbyX
         *      equivalents. However, these are missing from Solaris 2.3.

And then a replacement routine (by Casper Dik) to "plug it in every program
that requires gethostbyname to work" (only header shown here):

        /*
         *     Proper gethostbyXX function for Solaris 2.0-2.3
         *     (and later ?) 
         *
         *     Fixed in 2.4?
         *
         *     You'll need -ldl added to the link command line.
         *
         *     Casper Dik ([email-masked])
         *
         */

I've heard rumours that this indeed is fixed in 2.4 (but I'm not sure).

Anyway, I once put the replacement routine somewhere in the Pine code and my
message-ID's suddenly got FQDN's in it. Don't ask me where I put it, I'm not
a C-programmer and probably picked the 'wrong' place ;-)

Xander