Re: [EXIM] Clarifying use of condition

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Dom Mitchell
CC: exim-users
題目: 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/ ***