Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an Ubuntu (12.10) server running postfix and SpamAssassin. I've set up spampd following these directions on the SpamAssassin wiki: http://wiki.apache.org/spamassassin/IntegratePostfixViaSpampd

However, settings ~/.spamassassin/user_prefs are being ignored.

What do I need to do to have spampd/SpamAssassin read/use per-user rules?

share|improve this question
add comment

2 Answers

I'm still not 100% clear on whether spampd is calling spamassassin or spamc, if it is calling spamc you need to set allow_user_rules to 1, if not, it should look for the user_prefs in the directory of the user calling spamassassin, and that directory only.

I don't think you will be able to use individual user_prefs from in spampd, they specifically mention that per-user whitelists are not available. They also mention that per-user preferences are a To-Do..

From the notes on switches

Turns on the SpamAssassin global whitelist feature. See the SA docs. Note that per-user whitelists are not available.

From the To-Do section on github

Per-user preferences: The jury is still out on this one. I'm thinking more and more that most per-user prefs should be specified on the final mailbox server. Why? Because SMTP isn't designed with per-user preferences in mind. On a relay server, the same message body can go to multiple recipients who may have wildly different preferences when it comes to handilng junk mail. The exception here might be the use of LMTP protocol, which bears further investigation.

I'm guessing they assume the users will have .procmail filters.

share|improve this answer
1  
BTW, if you want per-user spamassassin prefs, have a look at calling it from amavisd, you can have them in SQL, and let users change preferences through web apps including webmail programs.. –  NickW Mar 20 '13 at 12:02
    
Per the docs I linked to, this is using SpamAssassin and not spamc. I'm not asking for a whitelist; I'm asking for general use of user_prefs, so different users can have different thresholds, etc. –  Paul Schreiber Mar 20 '13 at 15:00
    
It sounds like amavisd a newer/better approach to solving this problem. –  Paul Schreiber Mar 20 '13 at 15:00
1  
Yeah, either you have each user call spamassassin so spamassassin runs in their context, or you use spamc/spamd and specifically enable per-user rulesets, or you call spamc/d from amavis, etc, and use their methods for importing specific user settings. –  NickW Mar 20 '13 at 15:07
    
BTW, I mention per-user whitelists, as that is one of the primary functionalities that I saw used from my webmail interface to amavis/SQL, and it's one of the most common things that users want to be able to enable in their personal preferences. Maybe I should have mentioned that in the reply :) –  NickW Mar 20 '13 at 15:09
add comment

What are the permission settings on your user_prefs file? Verify that its readable by the spam assassin daemon. They should probably be 644.

Failing that, what user are you running SA as? According to this resource here, certain usergroups for the daemon result in it checking for config files in /home/spamassassin. Admittedly, this is Debian, so the Ubuntu behavior might be different.

share|improve this answer
    
/home, /home/paul, /home/paul/.spamassassin are 744 and /home/paul/.spamassassin/user_prefs is 644. spampd is running as the user spampd. There is no /home/spamassassin. –  Paul Schreiber Mar 17 '13 at 12:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.