On 09/06/2011 5:09 AM, Alessandro Dentella wrote:
Hi,
I find a lot of spam that has already passed other spam-filters with
spamassassin better tuned than mine an already have a X-Spam-Flag to YES.
I tried to add a rule to match that case:
header CUSTOM_X_SPAM_FLAG X-Spam-Flag =~ /\bYES\b/i
score CUSTOM_X_SPAM_FLAG 5
But spamassassin -t< /tmp/spam does not show any hit ot that rule. Moreover
using flag -D I don't see it being called. I set it in
/etc/spamassassin/local.cf
Is it any possible to match on that rule?
Have you tried matching against the ALL:raw header? I don't think it
will work but I can't remember for sure.
header CUSTOM_X_SPAM_FLAG ALL:raw =~ /\bX-Spam-Flag: YES\b/i
A custom plugin may also be able to use get_pristine_header() to match
against what you want to match against. Again, though, I can't remember
for sure when/where the X-Spam headers get stripped out.
Daryl