You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Kenneth Porter <sh...@sewingwitch.com> on 2008/08/12 07:34:05 UTC
Testing for existence of header
<http://wiki.apache.org/spamassassin/WritingRules>
Shows how to test for text associated with a header. How do I test if the
header is present at all? (Or not present?)
Re: Testing for existence of header
Posted by Matt Kettler <mk...@verizon.net>.
Michael Scheidell wrote:
>> From: Kenneth Porter <sh...@sewingwitch.com>
>> Date: Mon, 11 Aug 2008 22:34:05 -0700
>> To: SpamAssassin Users List <us...@spamassassin.apache.org>
>> Subject: Testing for existence of header
>>
>> <http://wiki.apache.org/spamassassin/WritingRules>
>>
>> Shows how to test for text associated with a header. How do I test if the
>> header is present at all? (Or not present?)
>>
>>
>
> Look for examples in *.cf files.
>
>
> header DOESTHISEXIST exists:X-Spam-sign
>
Yep, that's the way to go. Just beware that Exists currently won't match
a truly empty header.
Currently, it's actually implemented as:
header DOESTHISEXIST X-Spam-sign ~= /./
Which requires at least one character to be present in the text part of
the header. 99.9999% of the time, that does what you need, and is
lightweight to implement.
Re: Testing for existence of header
Posted by Michael Scheidell <sc...@secnap.net>.
> From: Kenneth Porter <sh...@sewingwitch.com>
> Date: Mon, 11 Aug 2008 22:34:05 -0700
> To: SpamAssassin Users List <us...@spamassassin.apache.org>
> Subject: Testing for existence of header
>
> <http://wiki.apache.org/spamassassin/WritingRules>
>
> Shows how to test for text associated with a header. How do I test if the
> header is present at all? (Or not present?)
>
Look for examples in *.cf files.
header DOESTHISEXIST exists:X-Spam-sign
--
Michael Scheidell, CTO
>|SECNAP Network Security
Winner 2008 Network Products Guide Hot Companies
FreeBSD SpamAssassin Ports maintainer
_________________________________________________________________________
This email has been scanned and certified safe by SpammerTrap(r).
For Information please see http://www.spammertrap.com
_________________________________________________________________________