Le 12261ième jour après Epoch, Andreas Gredler écrivait: > On Mon, Jul 28, 2003 at 11:23:45AM -0300, Christian Lyra wrote: >> >> Hi, >> >> I use to use the ifupdown-roaming package. With this package the >> machine >> automagically detect the right network and may run custom commands. So, to >> solve your problem is only a matter of putting a little script on the "up / >> down" network interface section. >> >> You can have two exim configuration files, let?s say, exim.conf-home >> and >> exim.conf-other. On the "up" interface command you choose the right one, >> link >> it to exim.conf, and restart exim. >> >> ah... of course... you can hack /etc/init.d/exim too, and choose the >> right >> config file at start. > > This is not the problem. The problem is to avoid two configuration files > for exim when only a couple of lines are different. It is also hard to > keep the configurations in sync. Imagine, you have 3 or 4, or even more, > configurations for exim, you change a line and then you have to copy the > new configuration 3 or 4 times and change every config file so that the > smarthost entries are not lost.
I agree. I need a good solution without managing N exim.conf files. But thanks a lot. (I use ifplugd, and it is doing a good job) One solution is probably to have 2 or 3 routers configurations in the exim file... In my case, I must use smarthost @home, and lookup @other ... So we can probably use something like: ### ROUTERS ### smarthost: driver = domainlist transport = remote_smtp require_files = /var/run/I_am_at_home route_list = "* my.smart.host bydns_a" lookuphost: driver = lookuphost transport = remote_smtp literal: driver = ipliteral transport = remote_smtp So, if the file /var/run/I_am_at_home is present, the smarthost router will work, and if not present, lookuphost or ipliteral will be selected. I have no time yet to test this solution, but if I do, I tell you. -- DELETE A FORTUNE! Don't some of these fortunes just drive you nuts?! Wouldn't you like to see some of them deleted from the system? You can! Just mail to `fortune' with the fortune you hate most, and we'll make sure it gets expunged.