spamassassin --lint doesn't report any errors.
However, I think I have found the source of the problem.
spamassassin seems to regard all X-Spam headers as its personal domain
and ignores them for
processing. The relevant line in PerMsgStatus.pm is
$self->{msg}->delete_header('X-Spam-.*');
If I comment out this line, my rule starts working again. I am unsure
why spamassassin
in version 3.1 doesn't want to include the rule for processing. I
could understand it, if
there was a concern that spammers were writing their own X-headers to
fool mail
readers. However, spamassassin still passes on these headers (whether
they are bogus
or not. It just doesn't use them for rule processing).
Anyway, my problem seems to be solved.
Thanks for all comments
Dave
Matt Kettler wrote:
Subject:
Re: Problem with writing rules based on X-headers
From:
Matt Kettler <[EMAIL PROTECTED]>
Date:
Tue, 26 Jun 2007 19:57:52 -0400
To:
David Robson <[EMAIL PROTECTED]>
To:
David Robson <[EMAIL PROTECTED]>
CC:
users@spamassassin.apache.org
David Robson wrote:
Hi,
My site runs spamassassin. Our ISP runs a spam checker, that adds an
X-header to our email of the form
X-Spam-Bar: ###############
where the number of hashes indicate the likelihood of spam. I have
written
a rule for our spamassassin, which makes use of this X-header, so I can
make use of both spam checkers. This has worked well and reliably for
a number of years, until we upgraded from spamassassin 2.60 to
spamassassin 3.1.9
Although all our other local rules work, this one no longer has any
affect.
It looks as if the "header" rules for version 3.1.9 no longer work on
X-headers, although they did in version 2.60
Can anyone confirm this, and can anyone suggest a work around?? All
help gratefully received.
It should work just fine.
Two questions:
1) have you run spamassassin --lint after your upgrade? It could be that
SA is choking on your config file further up and ditching it.
2) where is this declared? user_prefs, or a *.cf file in your site rules
dir?
3) if user_prefs, do you use spamd? Do you have allow_user_rules set to
1 at the site rules level?
Dave
The rule in question is ....
header DWR X-Spam-Bar =~ /\#\#\#\#\#\#\#\#\#/i
describe DWR Contains: Spam detected by our ISP
score DWR 5.50
Looks perfectly fine to me.