Re: [exim] domains in condition

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Marilyn Davis
Fecha:  
A: Tony Finch
Cc: exim-users
Asunto: Re: [exim] domains in condition
On Tue, 4 Jan 2005, Tony Finch wrote:

> On Tue, 4 Jan 2005, Marilyn Davis wrote:
> >
> > Parsing the $received_protocol gives all the info needed for a
> > delivery of this sort, so a lookup isn't necessary -- but getting to
> > the right router without a lookup is.
>
> The problem with your router as written is that the router preconditions
> have a fixed order - see section 3.11 of the spec. I recommend that people
> use this order when writing their routers, i.e. start with the router's


Great idea! Thank you for that.

I just unscrambled the order on all my routers to match the testing
order. I wonder if you have some other suggestions -- for the
non-testing statements?

> driver, then any preconditions in the order they are tested, then the rest
> of the options.
> http://www.exim.org/exim-html-4.40/doc/html/spec_3.html#SECT3.11
>
> What you can do as an alternative is make use of the fact that the domains
> precondition is expanded, so instead of what you wrote (in the order of
> testing and reformatted for clarity):
>
>   domains = ! +local_domains
>   condition = ${if and{{ eq{$received_protocol}{local} } \
>                        { eq{INBOUND_EMAIL}{no} } \
>                        { !def:sender_address }} \
>                    {yes} {no} }

>
> you can write:
>
>   domains = ${if and{{ eq{$received_protocol}{local} } \
>                      { eq{INBOUND_EMAIL}{no} } \
>                      { !def:sender_address }} \
>                  {!+local_domains} {} }


Of course! Works like a charm.

Thank you so much dot-at-dot-at-dot-at.

Marilyn

>
> Tony.
>


--