sendmail && resolv.conf changes

Terrence Koeman root at mediamonks.net
Tue Sep 14 16:19:11 UTC 2010


> -----Original Message-----
> From: owner-freebsd-questions at freebsd.org [mailto:owner-freebsd-
> questions at freebsd.org] On Behalf Of tomasz dereszynski
> Sent: Tuesday, September 14, 2010 11:28 AM
> To: Matthias Apitz; freebsd-questions at freebsd.org
> Subject: Re: sendmail && resolv.conf changes
> 
> 
> > El día Tuesday, September 14, 2010 a las 09:15:49AM +0100, tomasz
> > dereszynski escribió:
> >
> >>
> >> >
> >> > 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 restart 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.





More information about the freebsd-questions mailing list