You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Andy Norris <an...@svmg.net> on 2004/07/08 23:00:22 UTC
linting my rules -- fresh from upgrade
I upgraded from 2.60 to 2.63 (would like to go to 3.0) just now and the
spamassassin -d --lint gives me all kinds of errors. Starting with a bunch
of them in /etc/spamassassin/20_phrases.cf.
Is there a better version of the rules out there I should grab or is there
a SA newbie trick I don't know as far as troubleshooting the rules? I'm
looking for the cause of the syntax errors (am a pretty proficient Perl
programmer), but I cannot find anything wrong in the file it lists, and
each time I run the command to lint, it moves to the next error, rather
than staying on the same error long enough for me to troubleshoot and fix
it. Problem is that the error messages don't really match up with the line
numbers, or even the content of the file reported...?
I want to get this thing running as error-free as possible!
Thanks very much,
Andy Norris
An example of one of the errors below:
Misplaced _ in number at /usr/share/spamassassin/20_phrases.cf, rule
REMOVAL_INSTRUCTIONS, line 8.
Bareword found where operator expected at
/usr/share/spamassassin/20_phrases.cf, rule REMOVAL_INSTRUCTIONS, line 8,
near "0624_body_test"
(Missing operator before body_test?)
Failed to compile body SpamAssassin tests, skipping:
(syntax error at /usr/share/spamassassin/20_phrases.cf, rule
REMOVAL_INSTRUCTIONS, line 8, near "sub BIGTHING-"
Can't use global @_ in "my" at /usr/share/spamassassin/20_phrases.cf, rule
REMOVAL_INSTRUCTIONS, line 10, near "( @_ "
syntax error at (no file), rule BIGTHING-0624, line 6, near "}
}"
)
Re: linting my rules -- fresh from upgrade
Posted by Andy Norris <an...@svmg.net>.
Thanks Matt,
Yeah, before I upgraded (I had this problem and then decided to try to
upgrade, thinking that might clear it up), I cleared the rules directories
it was using (/etc/mail/spamassassin & /usr/share/spamassassin). Then the
rules that showed up there are only the ones from the install -- including
local.cf.
And, no, I'm not editing anything between runs of --lint. It just cycles to
the next "error" (seemingly).
The confusing thing is that SA and MailScanner are still working despite
the syntax errors. I'm sure that the rules it's complaining about aren't
firing, but some others must be.
I'm wondering, at this point, how much a pain it would be to uninstall SA
and reinstall fresh?? Is that even advisable? Nervous about any change now,
as we only have the one server, so there's no test bed to speak of.
We're using a machine running Ensim Pro 4.0 (a control panel setup for
managing multiple domains). And my setup -- as far as I've been able to
configure it -- is site-wide. Still waiting for that O'Reilly SpamAssassin
book to be released!
Thanks again,
Andy Norris
At 04:24 pm 2004-07-08, Matt Kettler wrote:
>At 05:00 PM 7/8/2004, Andy Norris wrote:
>>Is there a better version of the rules out there I should grab or is
>>there a SA newbie trick I don't know as far as troubleshooting the rules?
>>I'm looking for the cause of the syntax errors (am a pretty proficient
>>Perl programmer), but I cannot find anything wrong in the file it lists,
>>and each time I run the command to lint, it moves to the next error,
>>rather than staying on the same error long enough for me to troubleshoot
>>and fix it
>
>That shouldn't happen. The same configfiles should ALWAYS produce the
>exact same output from spamassassin --lint.
>
>Is there any chance something is being edited between runs?
>
> From the looks of things, SA's parser is heavily confused, and the file
> and rule it's complaining about might not be the true cause of the problem.
>
>Have you tried yanking your local.cf out temporarily to see if it clears up?
>
>Have you made sure the .cf files are the same as the ones in the tarball
>(except changes to the require_version line and the comments about where
>local.cf resides)?
>
>
>
>
Re: linting my rules -- fresh from upgrade
Posted by Matt Kettler <mk...@evi-inc.com>.
At 05:00 PM 7/8/2004, Andy Norris wrote:
>Is there a better version of the rules out there I should grab or is there
>a SA newbie trick I don't know as far as troubleshooting the rules? I'm
>looking for the cause of the syntax errors (am a pretty proficient Perl
>programmer), but I cannot find anything wrong in the file it lists, and
>each time I run the command to lint, it moves to the next error, rather
>than staying on the same error long enough for me to troubleshoot and fix it
That shouldn't happen. The same configfiles should ALWAYS produce the exact
same output from spamassassin --lint.
Is there any chance something is being edited between runs?
From the looks of things, SA's parser is heavily confused, and the file
and rule it's complaining about might not be the true cause of the problem.
Have you tried yanking your local.cf out temporarily to see if it clears up?
Have you made sure the .cf files are the same as the ones in the tarball
(except changes to the require_version line and the comments about where
local.cf resides)?