David Goldsmith wrote:
> 
> So I have 3 directories with SA-included rulesets
> 
> /etc/mail/spamassin - 3.1.0 rules from Dec 2005
> /usr/share/spamassassin - 3.1.3 rules dated Jun 5 2006
> /var/lib/spamassassin/3.001003/... - update 407357 to 3.1.3 rules

Perfectly normal.

> When I run 'spamassassin -LD --lint', I see it try to load the
> following types of files from the following locations:
> 
> config: using "/etc/mail/spamassassin" for site rules pre files
> config: using "/var/lib/spamassassin/3.001003" for sys rules pre files
> config: using "/var/lib/spamassassin/3.001003" for default rules dir
> config: using "/etc/mail/spamassassin" for site rules dir
> 
> In /etc/mail/spamassassin, any rules we have added or score
> adjustments have been made in either local.cf or in *.cf files we
> have created. 

That's where they should be.

> Questions:
> 
> 1) Are the SA-included ##_<string>.cf files needed in all 3 locations
> or can the 'older' files in /etc/mail/spamassassin and
> /usr/share/spamassassin be removed?

Leave them alone.  SA will use the proper files.

> 2) Do the rulesets in the multiple files get merged or does only the
> first/last copy of the same name get used?

The rulesets get merged.  If any rule definitions or scores are
duplicated, the last version wins.

Basically what happens is this:

1) If /var/lib/spamassassin/3.001003 exists, default rules are loaded
   from there.
2) Otherwise the default rules are loaded from /usr/share/spamassassin
3) User-created rules are loaded from /etc/mail/spamassassin

> To test the behavior wrt Q2, I created a dave.cf file in both
> /etc/mail/spamassassin and /var/lib/spamassassin/...   I created a
> rule that matched on my email address.  The rules were named
> DGOLDSMITH1 (/etc/mail/spamassassin) and DGOLDSMITH2
> (var/lib/spamassassin/...) so they would be unique.
> 
> After restarting SA, and running some messages through, only to
> DGOLDSMITH1 rule is getting matched.

You should see matches on both if they have unique names.  You did
give both of them a non-zero score, right?

-- 
Bowie

Reply via email to