Mike wrote:
> It appears that load-sa-rules.pl is not loading all the
rules.
> I saw this due to differences in scores on web front
end & in the email, I
> checked the logs to see the rules triggered and
they're missing from the db.
>
> The ones I have tracked down are Fred's rules from
rulesemporium.
> 88_FVGT_headers has many rules, but you can see the
script only recognise 3
> of them and updates the scores of 2.
>
> Final excerpt from the rules file shows the rules
surounding HELO_EQ_IP_ADDR
> that are not in the database. (there are many others
missng too)
Yes, at the moment, the load-sa-rules script demands that
the authors of
custom rules comply with the SpamAssassin standard, which
requires that
every rule include a "describe" line (which is
used in the spam report
as the text description explaining what the rule means). In
other
words, a typical well-formed header rule looks something
like this:
header FOO_BAR X-Foo =~ /bar/
score FOO_BAR 1.0
describe FOO_BAR X-Foo header contains the string 'bar'
If the "describe" line is omitted, SpamAssassin
is lenient and will
continue to process the rule (as long as it has at least the
header/body
and score lines to work with), but its own spam report
header will
contain a blank entry without a proper description for the
rule.
In other words, the rules that you're seeing load-sa-rules
ignore are
the ones that violate the SpamAssassin standard by not
including any
"describe" lines. If SpamAssassin were more
strict about enforcing the
standard (e.g. by raising warnings or errors when the rules
are loaded
at startup), rules authors would be compelled to do a better
job, but
until then, that just makes life a bit trickier for the rest
of us who
have to wade through that slop. The maintainers of these
malformed
rules should be smacked
I'll open a ticket (#357) in any case and consider ways to
properly
include rules that lack "describe" lines. It's
not as trivial a problem
to solve as it sounds, though, because in some cases
there's a
semi-legitimate reason for not including a
"describe" line for a given
rule. For instance, there are "meta-rules" and
"sub-tests"--rules that
consist of more than one test, and so there's only one
"describe" line
for the set. Short of actually parsing the rules into a
data structure
that mimics SpamAssassin's, a casual line parser like
load-sa-rules is
going to have a hard time figuring out which rules /need/
description
lines and which ones are effectively just sub-tests that
don't matter
unless they trigger in combination with certain other rules.
That's
information that the rule designers/maintainers are supposed
to provide.
--
Robert LeBlanc <rjl renaissoft.com>
Renaissoft, Inc.
Maia Mailguard <http://www.maiamail
guard.com/>
_______________________________________________
Maia-users mailing list
Maia-users renaissoft.com
http://www.renaissoft.com/mailman/listinfo/maia-users
|