You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Dylan Bouterse <dy...@corp.power1.com> on 2006/10/27 16:29:38 UTC

RE: spamassassin --lint fails with rules in local.cf (now perl plugin error for TextCat)

-----Original Message-----
From: Matt Kettler [mailto:mkettler_sa@verizon.net] 
Sent: Friday, October 27, 2006 9:13 AM
To: Dylan Bouterse
Cc: users@spamassassin.apache.org
Subject: Re: spamassassin --lint fails with rules in local.cf

Dylan Bouterse wrote:
>
>
> **
>
> [root@p1-lk-mxfilter spamassassin]# pwd
>
> /usr/share/spamassassin
>
> [root@p1-lk-mxfilter spamassassin]# grep SARE_GIF_ATTACH *
>
> 70_sare_stocks.cf:full     SARE_GIF_ATTACH  
> /name=\"?[0-9a-z._\-]{3,18}\.gif\"?/i
>
> 70_sare_stocks.cf:describe SARE_GIF_ATTACH   Email has a inline gif
>
> 70_sare_stocks.cf:score    SARE_GIF_ATTACH   0.75
>
> [root@p1-lk-mxfilter spamassassin]# grep SARE_GIF_STOX *
>
> 70_sare_stocks.cf:describe SARE_GIF_STOX     Inline Gif with little
HTML
>
> 70_sare_stocks.cf:score    SARE_GIF_STOX     1.66
>
> [root@p1-lk-mxfilter spamassassin]# grep SARE_SPEC_XXGEOCITIES2 *
>
> 70_sare_specific.cf:meta      SARE_SPEC_XXGEOCITIES2  
> !__SARE_SPEC_XXGEOCITIE &&  __SARE_SPEC_XX2GEOCIT
>
> 70_sare_specific.cf:describe  SARE_SPEC_XXGEOCITIES2   spamsign
> pointing to free webhost spam site
>
> 70_sare_specific.cf:score     SARE_SPEC_XXGEOCITIES2   1.666
>
> [root@p1-lk-mxfilter spamassassin]# grep SARE_SPEC_XXGEOCITIES3 *
>
> 70_sare_specific.cf:meta      SARE_SPEC_XXGEOCITIES3  
> __SARE_SPEC_XXGEOCITIE  &&  __SARE_SPEC_XX2GEOCIT
>
> 70_sare_specific.cf:describe  SARE_SPEC_XXGEOCITIES3   spamsign
> pointing to free webhost spam site
>
> 70_sare_specific.cf:score     SARE_SPEC_XXGEOCITIES3   1.666
>
> *My guess is that the lint check is reading the local.cf file before
> the additional SARE rule sets.** My --list reads:*
>
> [16109] dbg: config: using "/etc/mail/spamassassin" for site rules pre
> files
>
> [16109] dbg: config: read file /etc/mail/spamassassin/init.pre
>
> [16109] dbg: config: read file /etc/mail/spamassassin/v310.pre
>
> [16109] dbg: config: read file /etc/mail/spamassassin/v312.pre
>
> [16109] dbg: config: using "/var/lib/spamassassin/3.001003" for sys
> rules pre files
>
> [16109] dbg: config: using "/var/lib/spamassassin/3.001003" for
> default rules dir
>
> [16109] dbg: config: read file
> /var/lib/spamassassin/3.001003/updates_spamassassin_org.cf
>
> [16109] dbg: config: using "/etc/mail/spamassassin" for site rules dir
>
> [16109] dbg: config: read file /etc/mail/spamassassin/local.cf
>
> *And the SARE ruleset configs come after that. My SARE rulesets are in
> /usr/share/spamassassin. Should I put my local.cf file there as well
> or am I** going down** the wrong path?*
>
You're using the wrong path. Move your SARE rules to
/etc/mail/spamassassin/ where they belong.

The SARE rulesets must be parsed BEFORE your local.cf.

Also, are you sure the ones in /usr/share/spamassassin are even being
parsed? According to the above, your system is using
"/var/lib/spamassassin/3.001003" instead of /usr/share/spamassassin.

That said, in general, don't monkey with anything but the "site rules
dir". Any other rule directories, such as the "default rules dir", are
for SA's own rules, and the SA installer feels perfectly free to rm -f *
on those directories.



Amavisd read the /usr/share/spamassassin dir which is probably why
--lint didn't work but reloading amavisd would work. Either way.....

I moved my /usr/share/spamassassin dir contents to
/etc/mail/spamassassin. I get the following errors when trying to
--lint. 

[3246] dbg: plugin: loading Mail::SpamAssassin::Plugin::TextCat from
@INC
[3246] warn: textcat: languages filename not defined
[3246] dbg: plugin: registered
Mail::SpamAssassin::Plugin::TextCat=HASH(0x9760db8)

[3246] warn: config: invalid regexp for rule SUBJ_SOMEONE_WROTE: Subject
=~ /\bwrote:$/i: missing or invalid delimiters
[3246] warn: config: warning: description exists for non-existent rule
SUBJ_SOMEONE_WROTE

[3246] warn: config: warning: score set for non-existent rule
SUBJ_SOMEONE_WROTE

[3246] warn: Use of uninitialized value in hash element at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/Plugin/TextCat.pm line
380.
[3246] warn: Use of uninitialized value in join or string at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/Plugin/TextCat.pm line
391.
[3246] dbg: textcat: language possibly:
[3246] warn: Use of uninitialized value in join or string at
/usr/lib/perl5/site_perl/5.8.5/Mail/SpamAssassin/Plugin/TextCat.pm line
469.

The SUBJ_SOMEONE_WROTE rule that was posted a week ago or so on the list
isn't passing.
20_phrases.cf:body SUBJ_SOMEONE_WROTE           Subject =~ /\bwrote:$/i
20_phrases.cf:describe SUBJ_SOMEONE_WROTE       Search for Subject lines
ending in wrote:
50_scores.cf:score SUBJ_SOMEONE_WROTE 3.000

I still get the TextCat errors even if I comment out the
SUBJ_SOMEONE_WROTE rule.

Dylan