On Wed, Aug 09, 2006 at 11:58:45AM +1000, Peter Miller wrote: > On Wed, 2006-08-09 at 11:22 +1000, Jobst Schmalenbach wrote: > > On Wed, Aug 09, 2006 at 08:14:40AM +1000, Peter Miller ([EMAIL PROTECTED]) > > wrote: > > > Is there any elegant way to have a laptop DHCP client have its sendmail > > > configured properly? In all the cases I have to deal with, my laptop is > > > a DHCP client is behind a NAT firewall. > > > > in sendmail.mc: > > > > define(`SMART_HOST',`YOUR_ISP_UPSTREAM_MAILSERVER') > > > > then do a make in /etc/mail and restart sendmail > > I'm not getting it, this morning. > > In my case, the value of YOUR_ISP_UPSTREAM_MAILSERVER depends on which > firewall I'm behind, since all the ISPs in question gate client > connections as being from their own customers' IP addresses, not the > whole Internet. So one size definitely doesn't fit all.
It may be a long shot, but does sendmail accept a bare hostname as SMART_HOST? In which case you may be able to set it to 'mail' or 'smtp' -- which are common names that ISPs use. So if dhcp puts current-isp.com.au in /etc/resolv.conf, then sendmail will use smtp.current-isp.com.au. > Are you suggesting I need to edit sendmail.mc every time I boot the > machine? Is there a way to automagically have the DHCP client daemon > run a script to do it, instead? Has this already been done, in a Debian > package? How does the script get the right value for > YOUR_ISP_UPSTREAM_MAILSERVER from the DHCP server? Or you put the name in /etc/hosts. (hmmm ... or does sendmail insist on using dns) -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html