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

exim on laptops: smarthost on demand



Hi,

I've been trying to find a way that I can use a smarthost only when I'm
connected to a specific network. That means when I'm at home I don't
want to use a smarthost, when I'm at work I have to use a smarthost.
It would be easy to rewrite the whole exim configfile, but that is not
the way that I prefer.

I've found two other ways, but none did work.
First:

smarthost:
  driver = domainlist
  transport = remote_smtp
  route_list = "${lookup{ip}lsearch{/etc/smarthost}{$value}{*}} 
  ${lookup{smart}lsearch{/etc/smarthost}{$value}} byname"
  (This is one line, just made a linebreak for better reading)
  
It didn't work because it seems to be impossible to make a lookup on the
domain. No matter what the file contains, it is ignored.
If I write
route_list = "* ${lookup{smart}lsearch{/etc/smarthost}{$value}} byname"
it works.

Second:

smarthost:
  driver = domainlist
  transport = remote_smtp
  route_list = /etc/routefile

routefile:
* my_smarthost.at byname

Again, it seems to be ignored. Also tried with route_file and lsearch
but it didn't change anything(I skipped this method because according to
the manual wildcards are ignored)

Has someone another idea or knows what went wrong with the methods
described above?

regards Jimmy

-- 
Andreas "Jimmy" Gredler, andreas.gredler@gmx.at
Get my public key at www.g-tec.co.at



Reply to: