Re: [exim] question of string expansion and condition=

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Graeme Fowler
日付:  
To: exim-users@exim.org
題目: Re: [exim] question of string expansion and condition=
On 8 Dec 2017, at 15:15, Robert Bannocks <r.bannocks@???> wrote:
> FILENAME=/abc/def
> Condition = ${lookup{$primary_hostname}lsearch{FILENAME}}


First observation is that your second entry in FILENAME has two colon separators, not a dot in the hostname - that'll fail!

Anyhow, you may need something like this (escaped for readability):

condition = ${if \
        eq{${lookup{$primary_hostname}lsearch{FILENAME}}}\
        {}\
        {1}\
        {${lookup{$primary_hostname}lsearch{FILENAME}}}\
    }


Insert whatever value you need in the '1' field to fill in blank values.

Graeme