Setting Server wide Spam Assassin settings
I apologise for ths question being seemingly easy to answer, but I can't find the info. I'm lookin for.
I have been reading about Spam Assassin on here and across the web for the last few days, and I'm sure I've already come across the info. I'm looking for (but I didn't want it before), and I now I do want it, I can't find it!!
Anyhow; I want to do three things:
1) I want to set Apache Spam Assassin (3.4.1) rules to effect all accounts on my server. Which file in the spamassassin folder (I believe /var/lib/spamassassin/ but not certain) do I edit for this, I think it's local.cf but am not sure and can't find any clarification. FIXED
2) Can someone please provide a quick syntax example of setting custom rules in the local.cf file (or whichever file is appropriate). The local.cf itself doesn't give examples given on the documentation (
-
UPDATE: I have found This page ( SpamAssassin: Tests Performed: v3.3.x ) which lists Spam Assassin Rules as well as this Config file details about how to update ( Mail::SpamAssassin::Conf - SpamAssassin configuration file ) the conclusion I reach from these is: - 1) Log in to your server and find /etc/mail/spamassassin/local.cf and download, - 2) Edit the file to add/adjust the scores needed - 3) Reupload the file - 4) On the command line run: /scripts/restartsrv_spamd This *should* update and restart Apache Spam Assassin on the server, and apply the scores/rules specified in the links above to all accounts on the server. I have not yet found a neat way of clearing all account-specific rules. 0 -
the conclusion I reach from these is: - 1) Log in to your server and find /etc/mail/spamassassin/local.cf and download, - 2) Edit the file to add/adjust the scores needed - 3) Reupload the file - 4) On the command line run: /scripts/restartsrv_spamd This *should* update and restart Apache Spam Assassin on the server, and apply the scores/rules specified in the links above to all accounts on the server.
Hello, This is the correct method of modifying the default SpamAssassin rules/configuration values. To clear the custom configuration values implemented in an individual account, you'd need to manually remove the following file:/home/$username/.spamassassin/user_prefs
Thank you.0 -
Hello, Changing the score required in local.cf doesn't change the value in existing accounts, not for me anyway. Does this mean that because of the user_prefs files that lock in the default, that essentially the score cannot be changed server-wide, but needs to be done per account? 0 -
Hello, Yes, the values in the user_prefs file for individual accounts takes precedence over the global values. You'd have to remove or modify the existing "/home/$username/.spamassassin/user_prefs" files for each account to ensure they are using the default global values. Thank you. 0 -
Hello @martin MHC, I've re-opened this thread per your direct request. Feel free to post your question here. Thank you. 0 -
Many thanks @cPanelMichael Re your response above; you state a very important qualifier - Please can you clarify what files/rules are actually used in a process: for example If I set a /account/.spamassassin/.user_prefs file to contain a set of SCORE adjustments; does the presence of this file also overwrite (ie clear) any BLACKLIST set addresses (or any other NON-SCORE default values) in the server-wide /etc/mail/spamassassin/local.cf file? Cheers 0 -
Hello @cPanelMichael - is there any feedback on this hiarachy structure? Thanks! 0 -
Hello @martin MHC, It depends on the configuration value. SpamAssassin documents how this works at: Mail::SpamAssassin::Conf - SpamAssassin configuration file Additionally, check out the "Where To Add Them" section on the SpamAssassin document linked below for more information about when/how user_prefs rules are utilized: WritingRules - Spamassassin Wiki Thank you. 0 -
Thanks @cPanelMichael, I was under an erroneous belief that the layering of Spam Assassin (Server wide vs Account wide) rule implementations was a WHM/CPanel construct. However, thank you for the links. 0
Please sign in to leave a comment.
Comments
9 comments