Re: [Exim] exim4 on a mobile environment

Góra strony
Delete this message
Reply to this message
Autor: Andreas Metzler
Data:  
Dla: exim-users
Temat: Re: [Exim] exim4 on a mobile environment
On Wed, Oct 01, 2003 at 03:33:09PM +0200, Mattia Dongili wrote:
> On Wed, Oct 01, 2003 at 02:36:52PM +0200, Andreas Metzler wrote:
>> On Wed, Oct 01, 2003 at 01:42:52PM +0200, Mattia Dongili wrote:
>>> I'm trying to configure exim4 (4.2.22 on debian) to use different
>>> smarthosts based on different network environment, only 2 at the moment.


>>> The problem I encountered is I'm triyng to use conditionals to provide
>>> the smarthost and port settings to exim.

[...]
>>> DCsmarthost = ${if exists {/etc/exim4/work-env}{smtp.work.it}{smtp.home.it}}
>>> MYport = ${if exists{/etc/exim4/work-env}{8025}{25}}

[...]
>> However "port" is not expanded, you'll have to copy your remote_smtp
>> to remote_smtp_8025 and use an expansion in the router to choose
>> remote_smtp or remote_smtp_8025.

[...]
> Anyway, is there any other, maybe cleaner, way to setup different
> smarthosts for different network environments?


> I'm thinking of creating different transports and routers files for each
> environment and .include one or the other based on the execution of a
> simple script that will find the correct environment (grepping
> /etc/resolv.conf).


.include sucks, you would have to restart or HUP exim anytime you change
the included file, however as you need to use different ports afaict you
cannot make it in a less ugly way.
             cu andreas