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

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Graeme Fowler
Datum:  
To: exim-users@exim.org
Betreff: 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