Re: [exim] Testing for the absence of a header

Pàgina inicial
Delete this message
Reply to this message
Autor: Marc Sherman
Data:  
A: exim-users
CC: ph10
Assumpte: Re: [exim] Testing for the absence of a header
Adam Nielsen wrote:
>> You can, but not directly. Try this:
>>
>> if "${if def:whatever{yes}{no}}" is "yes" then ...
>
> Hmm...that doesn't seem to work. I made a rule like this:
>
>   if "${if def:header_x-spam-score{yes}{no}}" is "no" then
>     save ".spam/"
>   endif


You're missing the terminating colon on "header_x-spam-score:". The
colon can only be omitted if the following character is whitespace.

Philip, that optional colon-preceding-whitespace has been a frequently
recurring issue. Requiring the colon at all times would certainly be the
kind of incompatible change you usually resist, but I think it would be
a worthwhile one, because it would let you emit better error messages
when it's not there, instead of silently extending the name of the
header beyond what the user may have intended.

- Marc