SA Bugzilla – Bug 5969
"X-Spam-Status." changing between (Yes|YES)
Last modified: 2008-09-06 13:52:22 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?
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)?
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.
It was my fault, sorry! The token "YES" according to X-Spam-Flag not to X-Spam-Status.