Re: [exim] Smarthost on Specified Interface

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Dave Evans
Date:  
À: exim-users
Sujet: Re: [exim] Smarthost on Specified Interface
On Mon, Oct 11, 2010 at 12:17:56PM +1000, Tim Johnston wrote:
> ip-up distinguishes whether to run the queue or not according to the IP
> range assigned by ISPs. But the thing is that when isp1 comes up, ip-up
> will run 'exim4 -qf' as planned BUT exim4 could then in fact use
> interface to isp2 (if it's up at the time), where I would only want it
> to use the direct interface to isp1.
>
> I see that there is the configuration item "interface=", but I can't
> specify the interface in a configuration file in advance, as they are
> dynamically assigned (dhcp) when the interface comes up. I've set 'route
> add -net x.x.x.x netmask dev pppx", in ip-up, but this doesn't seem to
> guarantee a result.


One way of tackling this would be something like:
  - in "if-up", write the IP that Exim should use to some config file, e.g.
      echo "INTERFACE_ADDRESS=x.x.x.x" > /etc/exim4/interface.conf
      then restart exim
  - in your exim config, ".include" that file
  - in your exim config, specify "interface = INTERFACE_ADDRESS"


Left as an exercise: work out what to do with interface.conf when your ISP of
choice is down.

--
Dave Evans
http://djce.org.uk/
http://djce.org.uk/pgpkey