From owner-freebsd-questions@FreeBSD.ORG Tue Mar 23 07:11:30 2004 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 1EE7E16A4CE for ; Tue, 23 Mar 2004 07:11:30 -0800 (PST) Received: from p1028-ipbffx02marunouchi.tokyo.ocn.ne.jp (p1028-ipbffx02marunouchi.tokyo.ocn.ne.jp [220.111.132.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED2A943D4C for ; Tue, 23 Mar 2004 07:11:28 -0800 (PST) (envelope-from lukek@meibin.net) Received: (qmail 2388 invoked by uid 89); 23 Mar 2004 15:11:27 -0000 Received: from unknown (HELO ?127.0.0.1?) (192.168.10.35) by 192.168.20.5 with SMTP; 23 Mar 2004 15:11:27 -0000 Date: Wed, 24 Mar 2004 00:05:42 +0900 From: Luke Kearney To: zhangweiwu@realss.com In-Reply-To: References: Message-Id: <20040324000335.24BB.LUKEK@meibin.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.08.01 [en] cc: questions@freebsd.org Subject: Re: tell sendmail to use a different dns server? 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, 23 Mar 2004 15:11:30 -0000 On Tue, 23 Mar 2004 22:30:32 +0800 "Zhang Weiwu" granted us these pearls of wisdom: > Zhang Weiwu wrote: > > > >> Zhang Weiwu wrote: > >> > > > >>>> Hello. I'm using the dns service on a router box. This router does > > > >> > >> provide dns service, on which every computer in the LAN has a local > >> domain name (computername.our.lan) > >> > > > >>>> > >>>> Now the built in dns server's function is limited; it does not relay > MX > > > >> > >> type of record. Thus sending mail using sendmail always get hostname > >> lookup failure. > >> > > > >>>> 1. If I change my name server address in resolv.conf to use my ISP's > dns > > > >> > >> server, I cannot access lan computers using local hostnames. > >> > > > >>>> 2. If I use our dns server, I cannot send mails through sendmail. > >>>> > >>>> So what should I do? Can I ask sendmail to use ISP's dns server, while > > > > >> > >> the rest programs use local dns server? > >> I just realized I can do this in resolve.conf: > >> ==== > >> # our LAN's dns server > >> nameserver 192.168.0.1 > >> # ISP > >> nameserver 202.101.103.54 > >> > >> Hope this is the best method. > > > But this works on my notebook but not on my desktop computer, both 5.2 > RELEASE > > dino is my desktop computer: > dino# cat /etc/resolv.conf > search realss > nameserver 192.168.0.138 > nameserver 202.101.103.54 > dino# host -t mx hotmail.com > Host not found, try again. > > thinkpad is my notebook: > thinkpad# cat /etc/resolv.conf > search realss > nameserver 192.168.0.138 > nameserver 202.101.103.54 > thinkpad# host -t mx hotmail.com > hotmail.com mail is handled (pri=5) by mx4.hotmail.com > hotmail.com mail is handled (pri=5) by mx1.hotmail.com > hotmail.com mail is handled (pri=5) by mx2.hotmail.com > hotmail.com mail is handled (pri=5) by mx3.hotmail.com your other option has been to run a split view of your dns so that internal clients can get an "internal" view being able to resolve each other and outsiders can only see your external hosts. I believe bind 9.X can accomplish this. HTH LukeK