Re: [EXIM] Clarifying use of condition

Pàgina inicial
Delete this message
Reply to this message
Autor: Dom Mitchell
Data:  
A: Philip Hazel
CC: exim-users
Assumpte: Re: [EXIM] Clarifying use of condition
Philip Hazel <ph10@???> writes:
> On Mon, 15 Jun 1998, Dom Mitchell wrote:
>
> > pandhhost:
> > driver = lookuphost
> > transport = remote_smtp
> > gethostbyname
> > condition = match {$domain}{^[^.]\$}
>
> The value of a "condition" option is a string which is checked for one
> of the strings "0", "no", or "false". If it is none of those, it is
> taken as true. The value of your condition option is the string
>
>     match {the.domain}{^[^.]$}

>
> which will be taken as "true". I think what you want is
>
> condition = ${if match {$domain}{^[^.]\$}{yes}{no}}


Thanks, yes, this is exactly what I was looking for. However - I'd
better get the regex right: {^[^.]+\$}. :-)

> The reason for doing it this way, rather than making the text of
> "condition" be a condition sub-string on its own is so that you can do
> things like
>
> condition = ${lookup {$domain} lsearch{/some/file}{$value} fail}
>
> and other complex expansion strings.


Cunning. Thank you.
--
"Remember the Golden Rule: he who has the gold makes the rules" -- WoID

--
*** Exim information can be found at http://www.exim.org/ ***