From owner-freebsd-questions Thu Jan 2 19:44:27 2003 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 3D2C737B405 for ; Thu, 2 Jan 2003 19:44:24 -0800 (PST) Received: from tomts23-srv.bellnexxia.net (tomts23.bellnexxia.net [209.226.175.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BE1943EA9 for ; Thu, 2 Jan 2003 19:44:23 -0800 (PST) (envelope-from matt@gsicomp.on.ca) Received: from gabby.gsicomp.on.ca ([65.95.187.110]) by tomts23-srv.bellnexxia.net (InterMail vM.5.01.04.19 201-253-122-122-119-20020516) with ESMTP id <20030103034421.DXHS19158.tomts23-srv.bellnexxia.net@gabby.gsicomp.on.ca>; Thu, 2 Jan 2003 22:44:21 -0500 Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by gabby.gsicomp.on.ca (8.12.6/8.12.6) with SMTP id h033gck5003339; Thu, 2 Jan 2003 22:42:38 -0500 (EST) (envelope-from matt@gsicomp.on.ca) Message-ID: <00b601c2b2da$5fa1f760$1200a8c0@gsicomp.on.ca> From: "Matthew Emmerton" To: "Konstantin Borovik" , References: <004501c2b2d9$976940a0$0300000a@winxp> Subject: Re: command host does not check /etc/hosts. Date: Thu, 2 Jan 2003 22:44:08 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1251" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > Hi, > > Command host does not check /etc/hosts file. Is it a bug or normal behavior? > My sendmail could not deliver mail to localhost. I had to comment the > following lines in the config file. > > # Resolve map (to check if a host exists in check_mail) > #Kresolve host -a -T > #C{ResOk}OKR > > My system: > > uname -a > > FreeBSD fb.homeunix.org 4.7-STABLE FreeBSD 4.7-STABLE #1: Tue Dec 31 > 21:29:27 MST 2002 bkn@fb.homeunix.org:/usr/obj/usr/src/sys/BSD i386 > > I did some investigation: > > ******************************** start > **************************************************** > > bkn@fb /home/bkn> ktrace host localhost > localhost.ab.hsia.telus.net has address 10.166.205.185 > > ********************************** end > *************************************************** > > ******************************** start > **************************************************** > bkn@fb /home/bkn> kdump | less > > ...... > 3032 host CALL readlink(0x18120194,0xbfbff770,0x3f) > 3032 host NAMI "/etc/malloc.conf" > 3032 host RET readlink -1 errno 2 No such file or directory > 3032 host CALL mmap(0,0x1000,0x3,0x1002,0xffffffff,0,0,0) > 3032 host RET mmap 403931136/0x18138000 > 3032 host CALL break(0x8896000) > 3032 host RET break 0 > 3032 host CALL break(0x8897000) > 3032 host RET break 0 > 3032 host CALL gettimeofday(0xbfbff3c8,0) > 3032 host RET gettimeofday 0 > 3032 host CALL getpid > 3032 host RET getpid 3032/0xbd8 > 3032 host CALL break(0x8898000) > 3032 host RET break 0 > 3032 host CALL open(0x807bca2,0,0x1b6) > 3032 host NAMI "/etc/resolv.conf" > 3032 host RET open 3 > 3032 host CALL fstat(0x3,0xbfbff2c0) > 3032 host RET fstat 0 > 3032 host CALL break(0x889c000) > 3032 host RET break 0 > 3032 host CALL read(0x3,0x8898000,0x4000) > 3032 host GIO fd 3 read 132 bytes > "search ab.hsia.telus.net > nameserver 216.123.198.243 > nameserver 209.115.152.130 > nameserver 209.115.131.51 > nameserver 209.115.152.150 > " > 3032 host RET read 132/0x84 > 3032 host CALL read(0x3,0x8898000,0x4000) > 3032 host GIO fd 3 read 0 bytes > "" > 3032 host RET read 0 > 3032 host CALL close(0x3) > 3032 host RET close 0 > 3032 host CALL socket(0x2,0x2,0) > 3032 host RET socket 3 > 3032 host CALL connect(0x3,0x8893770,0x10) > 3032 host RET connect 0 > 3032 host CALL sendto(0x3,0xbfbef410,0x2d,0,0,0) > 3032 host GIO fd 3 wrote 45 bytes > "\^P\M-%\^A\0\0\^A\0\0\0\0\0\0 > localhost\^Bab\^Dhsia\^Etelus\^Cnet\0\0\^A\0\^A" > 3032 host RET sendto 45/0x2d > ...... > ********************************** end > *************************************************** > > Have a nice day. > > Konstaintin > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > Why does "localhost" resolve to 10.166.205.185? localhost should always resolve to 127.0.0.1. If it doesn't, something is severely broken with your (or your ISP's) DNS setup. -- Matt Emmerton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message