Engaging custom rules in SpamAssassin


Jan 10, 2005
I wondered if anyone can help me on a SpamAssassin issue. I'd like to do some custom rules, and have found out the syntax of how to write them, but I am not sure where to put them (or how). The SpamAssassin wiki says:

"/etc/mail/spamassassin/local.cf is the place of choice for site-wide application of a rule. Rules placed here get applied no matter what user invokes SpamAssassin.

~/.spamassassin/user_prefs is best if you want to have a rule only run when a particular user runs SA. Bear in mind that this is the user that executes SA, not the user who the mail is addressed To:."

There is not, by default, a /etc/mail/spamassassin/local.cf file in my domain space, while there is a user_prefs file. I tried adding my mail rules to the bottom of the user_prefs file the other day, and did not see any immediate difference in test mails, but this may have been either because there is some "gap time" in the rules being used by SpamAssassin, or because I need to do something other then just paste in the rules (the wiki is okay as far as how to write rules, but doesn't tell you how the files containing the rules should be arranged (headers/footers etc)).

Any insights gratefully received.