Skip to main content

Change all user's 'Required Score' for Apache SpamAssassin

Comments

7 comments

  • cPanelLauren
    The users should have a user_prefs file at /home/$user/.spamassassin/user_prefs modifying the score here would modify the score for that account. Is the issue that you're attempting to make the score 5.0 for all accounts at once by modifying /etc/mail/spamassassin/local.cf and the changes aren't being saved? Thank you,
    0
  • jmf1993
    Thank you for your reply. None of the users have any 'user_prefs' file. I've made sure of that. They've never changed any SpamAssassin setting. I would like the score at 8.0 for all accounts but modifying the 'local.cf' file and restarting the service has no impact.
    0
  • cPanelLauren
    hi @jmf1993 I'm testing this locally and trying to replicate. I've renamed my user's user_prefs, mv /home/$user/.spamassassin/user_prefs{,.bk}
    and modified the local.cf as follows: # grep required_score /etc/mail/spamassassin/local.cf required_score 2.0
    Then ran /scripts/update_spamassassin_config
    and restarted spamd: /scripts/restartsrv_spamd
    The new score was immediately referenced for email sent to the user which I removed the user_prefs file for. Can you confirm that the issue persists after following the steps listed here? Thank you,
    0
  • jmf1993
    Thank you so much the reply, and testing on your own server. I followed the steps to the bone, and the problem sadly does still exist. Do you have any other ideas of what it could be? Many thanks.
    0
  • cPanelLauren
    Hi @jmf1993 That should have done it unless there's something that's getting missed or you have some other customization there that's getting overlooked. You're welcome to open a ticket using the link in my signature so we can take a closer look. If you do open one please reference the ticket ID here so we can update this thread with the outcome. Thank you,
    0
  • jmf1993
    Hello, So I went ahead and opened a support ticket, I'll paste their reply below. Thank you very much for all your assistance yesterday. Ticket number - 9464831 [QUOTE]Hello, Thank you for your patience. I was able to determine that the change you made was actually successful. If you view the headers of a received email, you can see the required score is set to 8.0. You can view the headers easily in webmail, just click 'More' then 'Show source' if you are in Roundcube. The issue you are seeing is that this isn't updated in the cPanel interface. This is because the cPanel interface for SpamAsassin reads from the user_prefs and writes to the user_prefs. If the user defined preferences do not exist, it reads from a system file that cannot be changed since it gets reset when the server receives updates. The good news is that the global configuration you created is in effect, you just can't see it in the user's cPanel and it will get overwritten if a user saves their configuration. I would recommend creating a feature request to be able to modify the file below in order to be able to change the default required_score in the interface without the worry of the file getting overwritten when 'upcp' runs. ================================ /usr/local/cpanel/etc/spamassassin.options ================================ It is important to include this file in the feature request so that we know for sure what is being requested. Here is the line in question: ================================ [00:44:15 server01 root@9464831 ~]cPs# grep '=%.2f=' /usr/local/cpanel/etc/spamassassin.options =%.2f=5;; ================================ When the number 5 is updated to something like say 8, the required score in cPanel gets updated to 8. Feature requests are a very important aspect of cPanel's product growth. Now, to help us gather community input for future product enhancements, the cPanel Team has created a Feature Request section on the forums. Previous forum requests were part of our internal tracking system, and it was often difficult to determine how strong popular demand was for certain features, and to engage ongoing discussions with a large group of people at one time. With the new Feature Request Forum, you can read and comment on what other people are suggesting, add requests for features, and subscribe to topics via email, so you can stay informed as conversations and updates are made available. As always, your business and ongoing relationship are important to us. Below is the URL to the Feature Request Forum: cPanel & WHM Feature Requests If you have any further questions regarding this issue, let me know and I will be happy to assist.
    0
  • cPanelLauren
    Hello, I'm glad to hear that the changes worked! I'm also sorry that I didn't think to ask you how you were checking if the scores were not being changed. This is exactly what I did to confirm my findings yesterday (check the spam score on the actual email) Thank you for updating us here on the outcome.
    0

Please sign in to leave a comment.