So where do you put your rules if not in /usr/share/spamassassin? Well, there's two places. And your choice of place depends on how your copy of SpamAssassin is set up, and what you want the rules to do:
/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:. If you run SA from a sendmail milter, the only user_prefs that will be used is the one for the user sendmail runs as (usually root). Even if you do have a site-wide configuration, user_prefs may be useful to you by allowing you to add rules to another user account's user_prefs and test them using the command line prior to adding them to your local.cf.
Note: if you use spamd, rules placed in user_prefs will be IGNORED by default. If you add the allow_user_rules option to your local.cf you can get spamd to honor them. |