Dave Williss wrote: > I've setup SpamAssassin (latest stable version as of last week) and > got it running via spamd and postfix is scanning the email using > spamc. This all works well now. > > However, I can't get it to recognize settings in > ~/.spamassassin/user_prefs. > > I found a hint here.... > http://wiki.apache.org/spamassassin/UserPrefRuleTest > that "rules are not executed from user_prefs files unless a) the > allow_user_rules setting allows this (rare), or b) you execute SA > directly rather than through spamd/spamc" > > So I set allow_user_rules to 1 in my local.cf and restarted spamd. It > still won't follow my user_prefs. > > I'm trying to set the required_hits threshold higher and also setting > the rewrite_header for my account. You don't need allow_user_rules to change the required_hits in user_prefs.. you need allow_user_rules to use things that execute regular expressions like: body, header, and rawbody. These options can be dangerous to allow untrusted users to add, hence the default of not allowing them. You can find a list of config options that need this to execute in user_prefs by looking at the "Privleged settings" section of the conf manpage:
http://spamassassin.apache.org/full/3.1.x/doc/Mail_SpamAssassin_Conf.html#rule_definitions_and_privileged_settings You can also find ones that cannot be done in user prefs at all in the "Administrator settings" section: http://spamassassin.apache.org/full/3.1.x/doc/Mail_SpamAssassin_Conf.html#administrator_settings That said, are you sure you edited the correct user_prefs file in the right home directory? Spamd doesn't parse the To: header of email. Left to its own devices, spamd bases the desired user_prefs by setuiding itself to the same userid that invokes spamc. Odds are if you're calling spamc from postfix, and haven't done anything special, spamd is scanning mail using "postfix" as the user, so you'd have to edit the user_prefs in whatever home directory the postfix user has. This userid would effectively be used for all your mail, regardless of recipient. I can't really help you with postfix myself, as I know nothing about postfix other than it's yet another MTA, but I can tell you that if you want different user_prefs to be used, you either need to call spamc from a process executing as that user, or you need to pass this information after the -u parameter to spamc.