From owner-freebsd-questions@FreeBSD.ORG Mon Mar 31 22:54:32 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7460537B401 for ; Mon, 31 Mar 2003 22:54:32 -0800 (PST) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by mx1.FreeBSD.org (Postfix) with ESMTP id C740243F3F for ; Mon, 31 Mar 2003 22:54:31 -0800 (PST) (envelope-from sandshrimp@attbi.com) Received: from attbi.com (12-228-93-40.client.attbi.com[12.228.93.40]) by sccrmhc01.attbi.com (sccrmhc01) with SMTP id <2003040106543000100rcl02e>; Tue, 1 Apr 2003 06:54:31 +0000 Message-ID: <3E88C792.5020906@attbi.com> Date: Mon, 31 Mar 2003 22:56:18 +0000 From: Ryan Merrick User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021026 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "W. Sierke" References: <024501c2f7c6$080ab560$0264a8c0@regional.net.au> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-questions@FreeBSD.org Subject: Re: localhost name resolution problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Apr 2003 06:54:32 -0000 W. Sierke wrote: >Hi, > >In the course of trying to resolve a problem with sendmail (refusing to >deliver even local mail), I saw a note in the sendmail configuration docs >which says "host localhost must resolve to 127.0.0.1". However, when I >checked my system I instead found (details obscured): > ># host localhost >localhost.my.domain is a nickname for my.domain >my.domain has address 202.x.x.x > > >Someone suggested I check localhost.: > ># host localhost. >Host not found. > > >I'm not (wasn't) running a nameserver, my host.conf contains the entries >hosts and bind in that order, resolv.conf has a single, automatic (from >PPPoE) >nameserver entry which works, hostname is set to this_machine.my.domain. > >hosts contains >::1 localhost.my.domain localhost >127.0.0.1 localhost.my.domain localhost >192.168.100.1 this_machine.my.domain this_machine >192.168.100.2 another_machine.my.domain another_machine >... > > > > > > Your #/etc/hosts file should read for IPv4 localhost 127.0.0.1 localhost.Your_local_domain.com localhost There should be another line in #/etc/hosts your host 192.168.100.1 My_host.Your_local_domain.com My_host You can add as many lines as you want. with IP address, hostname, nickname. -Ryan