[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Configuration of Exim



Hi exim experts

I have configured exim to work find when I am using my dial up account 
with my ISP.  The exim.conf contains the following entry

smarthost:
  driver = domainlist
  transport = smtp
  route_list = "* post.demon.co.uk bydns_a"
end

As it happens I work for an enlightened company that doesn't mind me
taken my laptop into work and connectting it to their network. So
I configured fetchmail to get any mail that is being held by my ISP,
and this also works fine.

Is their an eligent way of configuring exim to forward mail to
post.demon.co.uk when the ppp link is up, or to my companies 
mail engine when the TCP/IP link is up?

I had the idea that in the scripts that run when the network is
configured (/etc/pcmcia/network.opt:start_fn() for TCP/IP and
/etc/ppp/ip-up.d/exim for PPP) could write the name of the 
smart host a file (i.e. /etc/exim.conf.smarthost) thus:

  smarthost   what.ever.my.smart.host.is

I then set up exim.conf with

  route_list = "* ${lookup {smarthost} lsearch {/etc/exim.conf.smarthost} {$value} {nosmarthost.nodomain}} bydns_a"
  
and

  route_list = "* ${lookup{smarthost} lsearch {/etc/exim.conf.smarthost} {$value} {nosmarthost.nodomain}} bydns_a"

and

  route_list = "* ${lookup{smarthost} lsearch {/etc/exim.conf.smarthost} {$value} {nosmarthost.nodomain}} bydns_a"

All gave an error trying to send mail of the form:
  ... smarthost router: failed to expand "${lookup}": missing lookup type

First question: What is wrong with my exim.conf route_list line?

Second question: Is there a better way of doing this?

Thanks for any help you can provide.

Steve
-- 
Steve Dobson                  E-mail:       sdobson@allstor-sw.com
Unix Architect                Tel (Direct): +44 1763 264441
Allstor Software Ltd.             (R'tion): +44 1763 262963
Whiting Way                   Fax:          +44 1763 264444
Melbourn, Herts, UK SG8 6EN 



Reply to: