From owner-freebsd-questions@FreeBSD.ORG Tue Sep 14 16:19:11 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A54710656C2 for ; Tue, 14 Sep 2010 16:19:10 +0000 (UTC) (envelope-from root@mediamonks.net) Received: from mail.mediamonks.net (mail.mediamonks.net [217.195.117.200]) by mx1.freebsd.org (Postfix) with ESMTP id 68F8E8FC13 for ; Tue, 14 Sep 2010 16:19:10 +0000 (UTC) X-CGP-AntiVirus: Scanned and found clean by Sophos X-Abuse-Info: Send abuse reports about this email to abuse@mediamonks.net Received: from [145.99.190.150] (account terrence@mediamonks.com) by mail.mediamonks.net (CommuniGate Pro IMAP 5.3.8) with XMIT id 6311597; Tue, 14 Sep 2010 17:49:07 +0200 Date: Tue, 14 Sep 2010 17:49:07 +0200 Organization: MediaMonks B.V. Message-Id: <254c61d2cccd564d8fd93ae56635d6c0@mediamonks.com> In-Reply-To: MIME-Version: 1.0 Thread-Topic: sendmail && resolv.conf changes Priority: Normal Importance: normal X-MSMail-Priority: normal X-Priority: 3 Sensitivity: Normal Thread-Index: ActUJF0gGnd26gQkQYCu9Nt9fBR6ZQ== From: "Terrence Koeman" To: "tomasz dereszynski" , "Matthias Apitz" , "freebsd-questions@freebsd.org" X-MAPI-LastModified: Tue, 14 Sep 2010 17:49:07 +0200 X-Mailer: CommuniGate Pro MAPI Connector 1.52.53.1/1.53.3.2 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: Subject: RE: sendmail && resolv.conf changes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 16:19:11 -0000 > -----Original Message----- > From: owner-freebsd-questions@freebsd.org [mailto:owner-freebsd- > questions@freebsd.org] On Behalf Of tomasz dereszynski > Sent: Tuesday, September 14, 2010 11:28 AM > To: Matthias Apitz; freebsd-questions@freebsd.org > Subject: Re: sendmail && resolv.conf changes > > > > El d=EDa Tuesday, September 14, 2010 a las 09:15:49AM +0100, tomasz > > dereszynski escribi=F3: > > > >> > >> > > >> > Hello, > >> > > >> > When using a laptop it is normal that there are some changes in > >> > resolv.conf during the live, for example: > >> > > >> > boot time: no network available > >> > start of PPP over UMTS: resolv.conf from provider > >> > start VPN to connect to company: resolv.conf from company > >> > ... > >> > > >> > it seems that sendmail is not aware of such changes in the > resolv.conf > >> > and always get stuck with the old DNS and ofc does not work on > >> incoming > >> > mails (provided by fetchmail). A restart helps, but is there some > >> better > >> > way to let sendmail switch to the new DNS environment when > resolv.conf > >> > changes? > >> > > >> > Thanks > >> > > >> My very wide guess would be that Sendmail starts before system > obtain > >> network settings from DHCP. > > > > Your guess is correct :-) > > > > What I wanted to say: sendmail runs and DHCP changes in certain > > situations the IP, routing and DNS, and sendmail does not adopt on > these > > changes. > > > delay Sendmail start to after network settings loaded from DHCP. > > not sure if there is any 'documentation correct' way of doing that but > 'home crafted' one would be to move /etc/rc.sendmail to > /usr/local/etc/rc.d/blah.sendmail.sh and remove it from rc.config > > hope someone here knows more proper way and can advise. > It might be an idea to (mis)use the "script" option in dhclient.conf to res= tart sendmail (/etc/rc.d/sendmail restart) after a lease has been aquired. = See 'man dhclient.conf'. -- Regards, T. Koeman, MTh/BSc/BPsy; Technical Monk MediaMonks B.V. (www.mediamonks.com) Please quote all replies in correspondence.