Dan wrote:
> Newbie here,
>
> I've filtered email for years with Declude and am adding SpamAssassin
> to my arsenal.  I want to build something from scratch and am having
> problems getting started.
Before we get further: I'd really suggest starting off playing with SA's
default setup for a while, then try tinkering with customizations, THEN
move on to building a whole ruleset from scratch.

The main reason why you're finding little documentation about "starting
from the ground up" is that it's a MASSIVE amount of work. I probably
sunk about 100 man-hours of my free time into creating the rules in
antidrug.cf, maybe more. That's for a very small number of rules.
> Thing is, all the guides (books, manual, web pages) seem to be geared
> toward using the standard configuration or making slight modifications
> to it - assuming the reader doesn't want to see under the hood.  I
> can't find anything that describes the configuration structure that SA
> uses, its requirements or rules.
man Mail::SpamAssassin::Conf

>
> I have a sense of 10_, 20_, 50_ file names in terms of controlling
> order and I know how to build SA rules.  But I want to know, if I
> delete every config/rule file, what files would I absolutely have to
> have and what would have to be in them?
In theory, if you delete all the rule/config files, then you'd have a
perfectly working SA that would always generate scores of 0.

That said, this is not a well tested configuration. Some of the in-code
defaults may not match those established by 10_misc.cf, and some things
may not have defaults at all and may cause errors.  You might want to
consider keeping this file, if for no other reason then ensuring all the
settings get reasonable defaults.
>   For example, do I just need a local.cf file with specific global
> lines and then everything else can be body/description/scores, inside
> any file with any name?  
Yes, rules can be in any file with any name that ends in .cf, provided
it's placed in one of two directories:

Rules can be in /usr/share/spamassassin/*.cf, which is the intended home
of the "default" ruleset. This directory gets obliterated and
repopulated when you upgrade spamassassin.

Rules can also be in /etc/mail/spamassassin/*.cf, which is the intended
home of add-on and customized rules.

Just remember that SA parses rule files in alphabetic order, so if you
want to reference rules across files, name them to fit the parse-order
you need.

> Are new rules in new files automatically added when present?
Yes, but if you use spamd, spamd only parses these two directories when
it loads, so you'd have to restart spamd.
>
> For the purposes of these questions, assume a single configuration
> level will all rules in the same directory.  Any links or descriptions
> would be appreciated.
>
> Thanks,
> Dan
>
>

Reply via email to