Re: [EXIM] Clarifying use of condition

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: Dom Mitchell
CC: exim-users
Sujet: Re: [EXIM] Clarifying use of condition
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}}

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.

-- 
Philip Hazel                   University Computing Service,
P.Hazel@???          New Museums Site, Cambridge CB2 3QG,
ph10@??? (sic)       England.  Phone: +44 1223 334714



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