You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Hamish Marson <ha...@travellingkiwi.com> on 2006/03/01 10:31:20 UTC

Re: False hits on rules... But Debugging doesn't show them.(SA3.1.0)

On Tue, 2006-02-28 at 16:51 -0800, jdow wrote:
> From: "Hamish Marson" <ha...@travellingkiwi.com>
> 
> > On Tue, 2006-02-28 at 17:55 +0000, Hamish Marson wrote:
> >> I have a problem... Got  aload of complaints about emails not coming
> >> through. On investigating, I have discovered that we're getting rules
> >> such as MISSING_SUBJECT hit, where an email clearly has a subject: line
> >> in the headers. Also missing recieved header, no from_or_to etc..
> >> 
> >> So I can spamassassin -D to see why... And although those rules get
> >> listed & counted in the summary, they DON'T show up as being hit in the
> >> actual debug output.
> >> 
> >> But what I do get is a suspicious looking line about header tests...
> >> 
> >> [3317762] dbg: rules: running header regexp tests; score so far=0
> >> [3317762] warn: rules: failed to run header tests, skipping some:
> >> Illegal declaration of anonymous subroutine
> >> at /usr/local/perl-5.8.6/etc/mail/spamassassin/70_sare_genlsubj1.cf,
> >> rule SARE_SUB_GROW_BUSINESS, line 9.
> >> 
> >> 
> >> Now it started with a different sare ruleset first... Which I checked
> >> and can't see any anonymous subroutine sbeing declared... SO renamed it
> >> to see what would happen. And the problem moved to this file. Again
> >> nothing there. Especially at line 9, which just happens to be
> >> constant...
> >> 
> >> So it looks like a problem with an actual module somewhere being
> >> reported falsely as in a ruleset... 
> > 
> > Well... I've isolated it down to a ruleset (File) created locally by
> > myself... Not sure why... The file contains the following...
> > 
> > /etc/mail/spamassassin/bad# ls -l
> > total 8
> > -rw-r--r--   1 root     system       131 Jan 24 14:16 01_local_drugs.cf
> > br01ai01:/etc/mail/spamassassin/bad# cat *
> > header  01_DRUGS_01     Subject =~ /Powerful/i
>           ^- Rule name begins with a numeric - bad
> > score   01_DRUGS_01     1.0
>           ^- Rule name begins with a numeric - bad
> > 
> > header  01_DRUGS_02     Subject =~ /Climaxes/i
>           ^- Rule name begins with a numeric - bad
> > score   01_DRUGS_02     3.0
>           ^- Rule name begins with a numeric - bad
> 
> Try:
> header  X01_DRUGS_01     Subject =~ /Powerful/i
> score   X01_DRUGS_01     1.0
> 
> header  X01_DRUGS_02     Subject =~ /Climaxes/i
> score   X01_DRUGS_02     3.00
> 

Doh!

Thanks for that. I didn't realise rules starting with a digit were
bad... Learn something new every day... Sadly by breaking it first of
course :)