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

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Graeme Fowler
Ημερομηνία:  
Προς: 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