On 2022-04-22 at 09:20:17 UTC-0400 (Fri, 22 Apr 2022 09:20:17 -0400) Michael Grant <mgr...@grant.org> is rumored to have said:
> Is there some way to run spamassassin with only a specific set of rules and > scores? > > I've tried putting the rules in a rules.cf file and running spamassassin like: > > spamassassin -t -p rules.cf < test.eml > > but it runs all the rules including theones in rules.cf Correct. The -p option loads a file in 'user prefs' mode, which is supplementary to the base config and cannot change some settings. > I've tried changing the config path with -C so it doesn't pick up the > other cf files but this breaks things. Correct. The -C flag replaces the "LOCAL_STATE_DIR" setting, which is the top of the versioned tree into which sa-update loads rules channels. Typically something like /var/lib/spamassassin/3.004006/ or /var/db/spamassassin/3.004006/ with $channelname.cf files that contain include directives for files in $channelname/ subdirectories. There MUST be at least one *.cf file in the LOCAL_STATE_DIR or spamassassin will exit with a message telling you to run sa-update. Note that the default config settings and utility subrules are defined in the rules channel, so if you run SA with an empty .cf there, you may have unexpected results. In addition to -C pointing to a directory with some *.cf (maybe empty!) you can use '--siteconfigpath=path' to change where spamassassin looks for your *.pre files and your local.cf file. -- Bill Cole b...@scconsult.com or billc...@apache.org (AKA @grumpybozo and many *@billmail.scconsult.com addresses) Not Currently Available For Hire
signature.asc
Description: OpenPGP digital signature