Re: [exim] acl filter variable syntax

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Todd Lyons
Date:  
À: Michael F. Egglestone
CC: exim-users
Sujet: Re: [exim] acl filter variable syntax
On Mon, May 16, 2011 at 10:02 PM, Michael F. Egglestone <mike@???> wrote:
> condition = ${if def:header_X-FC-System:} and ${if header_Return_Path: contains {/etc/exim4/listofnames}}


There is no contains{} function provided by exim so I assume you were
just using pseudo-code. The and{} function requires you to group your
functions differently:

${if and{ \
            {def:header_X-FC-System:} \
            {${lookup{$h_Return-Path:}lsearch{/etc/exim4/listofnames}}} \
       } \
    {yes} \
    {no} \
}


The "yes" and "no" are implied, so you could just shorten it to:
${if and{ {def:h_X-FC-System:}{${lookup{$h_Return-Path:}lsearch{/etc/exim4/listofnames}}}
} }

This is all completely untested, test it thoroughly before using.
Note that this can only be done in the data acl since headers aren't
present before that point.
--
Regards...      Todd
"It is the nature of the human species to reject what is true but
unpleasant and to embrace what is obviously false but comforting."
"You might be a skeptic if you have pedantically argued the topic of pedantry."