🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #57952

Re: [slrn] slrn can't deduce my fqdn, so I can't get customized MsgIDs

#57952
From: Daniel Price
Date: Sat, 12 Feb 2000 00:00
64 lines
3381 bytes
On 12 Feb 2000 04:00:32 GMT, John E. Davis <davis@space.mit.edu> wrote:
>On 11 Feb 2000 23:30:07 GMT, Daniel Price <dp@xanadu.eng.sun.com>
>wrote:
>>So, I would call this a bug-- slrn doesn't play nice with systems
>>resolving hosts via NIS.
>
>I am not convinced.  A brief web search indicates that this is a
>common problem on solaris and is due to a misconfigured system.  In
>particular, I encourage you to look at
>
>  http://www.sendmail.org/sun-specific/check-hostname.html
>
>This will try to find your FQDN and then if it does not find it, it
>will suggest what to fix.

$ ./check-hostname.sh 
Hostname xanadu OK: fully qualified as xanadu.eng.sun.com

I think the difference here is that you have /etc/nsswitch.conf
configured differently than I do.  In particular, I have:

# consult /etc "files" only if nis is down. 
hosts:      nis dns [NOTFOUND=return] files

This is the default for Solaris when it is configured for NIS at install
time.  Perhaps you or your sites administrators have overridden this
setting?  When gethostbyname is called, the name service switch consults
the nis map; since an entry for xanadu is available there, it returns
with that record.  No DNS lookup is attempted, since the host is found. 

The script you pointed to looks in /etc/hosts, then attempts a nis
lookup, using 'ypmatch', then tries an 'nslookup', which is forced to
use DNS.  On my system, this third lookup attempt succeeds. 

+ check_nis xanadu 
+ ypmatch xanadu hosts 
+ awk {for (f=2; f <= NF; f++) print $f} 
+ accept_if_fully_qualified xanadu 
nis_domains= nis
+ check_dns xanadu 
+ nslookup xanadu 
+ awk $1 == "Name:" || $1 == "Aliases:"{print $2} 
+ accept_if_fully_qualified xanadu.eng.sun.com 
+ echo Hostname xanadu OK: fully qualified as xanadu.eng.sun.com 
Hostname xanadu OK: fully qualified as xanadu.eng.sun.com
+ exit 0 

My suggestion about using SI_SRPC_DOMAIN as a fallback was simply to
suggest a way to get *some* domain that makes sense-- since the FQDN is
only used in generting message IDs it didn't seem to matter much whether
it mapped exactly to your machine's FQ network name.

Perhaps a more aggressive (and correct) approach is to use libresolv to
actually force a DNS query when other means fail.

        -dp

-- 
Daniel Price - Solaris I/O - dp@eng.sun.com
Expressed in this posting are my opinions. They are in no way related to
opinions held by my employer, Sun Microsystems. Statements on Sun products
included here are not gospel and may be fiction rather than truth.

Technical Details
Message-ID: <884m8m$1ss$1@engnews2.Eng.Sun.COM>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <880j4i$bev$1@engnews2.Eng.Sun.COM> <slrn8a83dq.4b.jewa@message-id.wahnes-world.de> <88261v$2p6$1@engnews2.Eng.Sun.COM> <slrn8a9mmu.ka5.davis@aluche.mit.edu>

Show Full Headers
Complete Article Headers
Message-ID: <884m8m$1ss$1@engnews2.Eng.Sun.COM>
Subject: Re: [slrn] slrn can't deduce my fqdn, so I can't get customized MsgIDs
Date: Sat, 12 Feb 2000 00:00:00 +0000
From: dp@xanadu.eng.sun.com (Daniel Price)
References: <880j4i$bev$1@engnews2.Eng.Sun.COM> <slrn8a83dq.4b.jewa@message-id.wahnes-world.de> <88261v$2p6$1@engnews2.Eng.Sun.COM> <slrn8a9mmu.ka5.davis@aluche.mit.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 585119495
Organization: Sun Microsystems Inc., Mountain View, CA
User-Agent: slrn/0.9.6.2 (SunOS)
Reply-To: dp@xanadu.eng.sun.com
Newsgroups: news.software.readers