Testing for existence of header - SpamAssassin

This is a discussion on Testing for existence of header - SpamAssassin ; Shows how to test for text associated with a header. How do I test if the header is present at all? (Or not present?)...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Testing for existence of header

  1. Testing for existence of header



    Shows how to test for text associated with a header. How do I test if the
    header is present at all? (Or not present?)


  2. Re: Testing for existence of header


    > From: Kenneth Porter
    > Date: Mon, 11 Aug 2008 22:34:05 -0700
    > To: SpamAssassin Users List
    > Subject: Testing for existence of header
    >
    >
    >
    > 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
    __________________________________________________ _______________________


  3. Re: Testing for existence of header

    Michael Scheidell wrote:
    >> From: Kenneth Porter
    >> Date: Mon, 11 Aug 2008 22:34:05 -0700
    >> To: SpamAssassin Users List
    >> Subject: Testing for existence of header
    >>
    >>
    >>
    >> 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.


+ Reply to Thread