On Fri, Jan 17, 2003 at 07:39:51PM -0500, Darryl L. Pierce wrote: > I use my laptop both at home and at work. I've been completely unable > to send email to a few mailing lists for some reason, and have narrowed > it down to Exim complaining about retry timeouts connecting to their > mail servers. When I switched to using my ISP's smart relay, everything > started working properly. > > My question, is there a way to configure Exim to use my ISP's SMTP > server and my SMTP server at work without having to manually change > settings when I go from one place to the other?
I have this set-up that allows me to change smarthost "on-the-fly": /etc/exim/exim.conf (in the routers section): -----8<---- smarthost: driver = domainlist transport = remote_smtp route_list = "* ${lookup{smarthost}lsearch{/var/state/exim.smarthost}{$value}{no.smart.host}} bydns_a" end -----8<---- which basically makes exim read the file /var/state/exim.smarthost - it is expected to contain a line e.g. smarthost smtp.your-isp.net This makes it easy for scripts to change smarthost: echo smarthost smtp.work.com > /var/state/exim.smarthost in e.g. /etc/pcmcia/network.opts - start_fn() and similar places. HTH PS: Would the original author of the above exim config please stand up and receive the beverage of choice? PS: Is /var/state the right place for such a file? /etc is a candidate too, but having programs automagically write to things in /etc is possibly evil, although it is generally accepted for e.g. /etc/resolv.conf... -- Karl E. Jørgensen [EMAIL PROTECTED] http://karl.jorgensen.com JabberID: [EMAIL PROTECTED] ==== Today's fortune: War spares not the brave, but the cowardly. -- Anacreon
msg10551/pgp00000.pgp
Description: PGP signature