Bug 5969 - "X-Spam-Status." changing between (Yes|YES)
Summary: "X-Spam-Status." changing between (Yes|YES)
Status: RESOLVED INVALID
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamassassin (show other bugs)
Version: 3.1.7
Hardware: PC Linux
: P5 normal
Target Milestone: 3.1.7
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-05 14:53 UTC by Peter Lokus
Modified: 2008-09-06 13:52 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Lokus 2008-09-05 14:53:28 UTC
I'm running spamassassin as a before-queue-filter.
My header check within postfix reject email that match following regexp:

/^X-Spam-Status:\ Yes/ REJECT Some text...

Now I'm getting emails tagged as spam sometimes. After an investigation I reveal that my regexp did not match the X-Spam-Status tag due to the uppercase written "YES".

My workaround:

/^X-Spam-Status:\ Y(es|ES)/ REJECT Some text...

Is it a feature or a bug?
Comment 1 Theo Van Dinter 2008-09-05 15:08:38 UTC
There's two tags: YESNO (produces "Yes" and "No") and YESNOCAPS (produces, surprise, "YES" and "NO").

The default X-Spam-Status header uses YESNO, and by default YESNOCAPS is only used for X-Spam-Flag.

So using the default config, you'll never see "X-Spam-Status: YES".

Can you provide sample messages (at least headers)?
Comment 2 d.hill 2008-09-05 15:33:18 UTC
In addition to Theo's comment...

In http://www.postfix.org/header_checks.5.html it states under:

  COMPATIBILITY
    ...
    By default, regexp: and pcre: patterns are case insensitive.

Therefore, your regular expression should have matched regardless.
Comment 3 Peter Lokus 2008-09-06 13:52:22 UTC
It was my fault, sorry!
The token "YES" according to X-Spam-Flag not to X-Spam-Status.