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

Top Page
Delete this message
Reply to this message
Author: Adam Nielsen
Date:  
To: exim-users
CC: ph10
Old-Topics: Re: [exim] Testing for the absence of a header - solution
Subject: Re: [exim] Testing for the absence of a header
> 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


However a test e-mail without the X-Spam-Score header always ended up in
the inbox, regardless of whether I say 'is "no"' or 'is "yes"' in the
condition.

On the other hand, my original condition does work:

if $header_x-spam-score: is "" then ...

It correctly detects the absence of a header, whereas the first one
doesn't seem to. Not sure what's happening with the 'def' there...

Cheers,
Adam.