Standard rule files are placed in /usr/share/spamassassin/
. There is a variety of files in this directory, and the files may change with different releases of SpamAssassin. Barring a few exceptions, names for rules files are generally of the form: nn_description.cf
where nn
is a number, for example 10
or 25
, and description
describes the type of rules, for example dnsbl_tests
or bayes
.
The rules installed by SpamAssassin are version-specific. Custom rules can be defined in files ending in .cf
, and placed in the /etc/mail/spamassassin/
directory, or in ~/.spamassassin/user_prefs
for user-specific rules.
SpamAssassin first reads all the files in /usr/share/spamassassin/
in alphanumerical order; 10_misc.cf
will be read before 23_bayes.cf
. SpamAssassin then reads all the .cf
files in /etc/mail/spamassassin/
, again in alphanumeric order. Finally, SpamAssassin reads ~user/.spamassassin/user_prefs
. If a rule or score is defined in two files, then the setting in the last file read...