*BSD News Article 66531


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!news.ecn.uoknor.edu!paladin.american.edu!gatech!usenet.eel.ufl.edu!tank.news.pipex.net!pipex!dispatch.news.demon.net!demon!awfulhak.demon.co.uk!awfulhak.demon.co.uk!awfulhak.demon.co.uk!not-for-mail
From: brian@awfulhak.demon.co.uk (Brian Somers)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Lookup problems
Date: 18 Apr 1996 02:38:20 +0100
Organization: Coverform Ltd.
Lines: 36
Message-ID: <4l46ec$ah@anorak.coverform.lan>
References: <4kpiuf$hpv@news.nstn.ca>
X-NNTP-Posting-Host: awfulhak.demon.co.uk
X-Newsreader: TIN [version 1.2 PL2]

Mike Digdon (digdon@yohoho.org) wrote:
: I am having a problem with sendmail and name lookups.

: In my /etc/host.conf file, I have the following entries:
: hosts
: bind

: This obviously means check the /etc/hosts file first, and then go through
: named.

: In my /etc/hosts file, I have the following entry:
: 137.186.184.254     pirate.yohoho.org    pirate

: Now, when I do a ping of pirate.yohoho.org, it properly gets the name/number
: from the hosts file.  I know this because my resolv.conf points to 2
: nameservers that require a ppp connection to get to, and I did the test with
: no connection.

: However, when I try to send mail to user@pirate.yohoho.org, sendmail says
: that it can't lookup the name of the host.  What's going on here? Ping gets
: the name/number from the hosts file, but sendmail doesn't.  Why?

'cos sendmail things it's smart and doesn't use "gethostbyname".  I find
this enormously irritating too !  I have a local network, all of which is
specified in my /etc/hosts file.  I also have demand-dialed PPP.  If I
send mail to a local machine, the PPP link comes up, the DNS at the other
end says "never heard of him" and sendmail happily sends things (it must
look in /etc/hosts).

Maybe sendmail has an out-of-sync algorythim and it is actually possible
to get it to look in /etc/hosts first - dunno !

--
Brian <brian@awfulhak.demon.co.uk>
Don't _EVER_ lose your sense of humour....