Re: [exim] multiple outgoing IPs?

Góra strony
Delete this message
Reply to this message
Autor: Phil Pennock
Data:  
Dla: Tomasz Chmielewski
CC: exim-users
Temat: Re: [exim] multiple outgoing IPs?
On 2009-09-07 at 23:11 +0200, Tomasz Chmielewski wrote:
> Dave Evans wrote:
> > On Mon, Sep 07, 2009 at 07:24:31PM +0200, Tomasz Chmielewski wrote:
> >> Is it possible to configure Exim to use several outgoing IPs?
> >
> > Yes, see
> > http://exim.org/exim-html-current/doc/html/spec_html/ch30.html#id606642
>
> Thanks for pointing to documentation.
>
> What is the meaning of "<" in the example?


Changes the list delimiter. See §6.20, "Changing list separators".

> Cool - seems to work, but it will prevent from sending mail if I connect
> to localhost.
>
> How should I write it in exim config language:
>
> interface = 192.168.123.123, if $received_ip_address == 127.0.0.1
>              else $received_ip_address

>
> ?
>
> Some hints would be appreciated - I tried to follow
> http://exim.org/exim-html-current/doc/html/spec_html/ch11.html#SECTexpcond,
> but couldn't make a working config:
>
> interface = ${if match_ip{127.0.0.1}... ?


 interface = ${if eq{$received_ip_address}{127.0.0.1} \
                 {192.168.123.123}{$received_ip_address}}


It's:
${if <CONDITION> {truth-branch}{falsehood-branch}}
where <CONDITION> can contain braces too, and is any of the conditions
in §11.7, the secion you were looking at. The key bit is to tie this
back into ${if ...} back in §11.5, "Expansion items".

-Phil