Subject: Re: Full Domain Name in 'From:' field

From: [email-masked] (Hal Render)
Date: 11 Feb 1995 02:04:30 GMT

FWIW, I ended up doing a "gross kludge" on this.  The routine that sets
the return addresses in pine (for both mail and news) is getdomainnames(), 
defined in the file pine/osdep/domnames.  The original function checks to 
see if there is a local domain name attached to the host name, but if there 
isn't it simply uses the hostname as both the FQDN and the local domain
name.  I solved this by tacking on local domain name onto the hostname.  
This is the only "simple" solution I could see (there's probably a preferred 
way to get the full domain name from someplace other that gethostname(), but 
I don't know what it is).  What pine could do is allow the user to define 
a constant set to the local domain and put the code below in an #ifdef-#endif

Anyway, here is the diff (replace "uccs.edu" with your local domain name):

	pine/osdep/domnames
	47c47,48
	<         strncpy(domainname, hostname, dsize-1);
	---
	>         strcat(hostname, ".uccs.edu");
	>         strcpy(domainname, "uccs.edu");
--
hal render
univ. of colorado at colorado springs
[email-masked]

---

From: [email-masked] (Hal Render)
Date: 10 Feb 1995 22:23:39 GMT

Bob Rahe ([email-masked]) wrote:
>   You have it exactly.  Solaris 2.3 is not returning a FQDN for the function
> gethostbyname.  Your fix of putting user-domain in pine.conf.fixed will
> fix the problem with the From: field.  But.... there are two more places that
> need to use it and don't.  One is the generation of Message-ID:.  The RFCs
> seem to say that that name needs to be a FQDN also.  I fixed that by 
> changing reply.c in generate_message_id to use "maildomain" which is what
> gets set by the user-domain option in the conf.fixed file.

It is not uncommon to set the the gethostbyname function to return only
the inital machine name, not the FQDN.  This is not a bug, it's just the
way that some machines are or can be set.  Our DECstations do this as do
our Suns.  Other networked communications packages I have built (tin,
rn, elm) realize this, and allow you to define a constant somewhere in
the source that gives the remainder of the domain name.  This is
appended to the machine name returned by gethostbyname whenever it is
called.  Why doesn't Pine?  I ask this because we are having the same
problem here (with both mail messages and news postings from by Pine)
and I've been looking for a simple, clean patch.  I guess I don't
understand why this isn't a problem for any of these other programs
like it is for Pine.

Anyway, let me through in a "me too" and ask if anyone else has a simple
patch for this.  BTW, has this been reported as a bug to the Pine developers?
I was going to, but I was trying to find out if I had simply missed something
in the FAQ.
--
hal render
univ. of colorado at colorado springs
[email-masked]