KNOWNHOST WIKI

User Tools

Site Tools


control-panels:cpanel-whm:how-can-i-enable-spamassassin-on-all-cpanel-accounts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
control-panels:cpanel-whm:how-can-i-enable-spamassassin-on-all-cpanel-accounts [2016/10/21 08:56]
mscherf revised for consistency
control-panels:cpanel-whm:how-can-i-enable-spamassassin-on-all-cpanel-accounts [2020/06/15 10:17] (current)
Karson N.
Line 11: Line 11:
 </WRAP> </WRAP>
  
 +\\
 ===== Enable SpamAssassin on all cPanel accounts =====  ===== Enable SpamAssassin on all cPanel accounts ===== 
  
-  Log in to your server via SSH terminal as the root user. +  Log in to your server via SSH terminal as the root user. 
-  Make sure the Global SpamAssassin Enable file exists, otherwise create it. +  Make sure the Global SpamAssassin Enable file exists, otherwise create it. 
- * ''touch /etc/global_spamassassin_enable'' +<code> 
-  Create a 'default' or 'blanket' configuration for user preferences. Reference [[https://spamassassin.apache.org/full/3.1.x/doc/Mail_SpamAssassin_Conf.html|SA Configuration Manual]] for specifics on creating configuration files. For this example, we're using a simple configuration containing the rule "required_score 3". The default configuration file will be located in /root/support/spamassassin/ +  touch /etc/global_spamassassin_enable 
- * ''touch /root/support/spamassassin/user_prefs && echo "required_score 3" >> /root/support/spamassassin/user_prefs'' +</code> 
-  Once that's completed, continue with these loops to create the proper files/folders. + 
-    Create the "enable" files for each user: +  Create a 'default' or 'blanket' configuration for user preferences. Reference((https://spamassassin.apache.org/full/3.1.x/doc/Mail_SpamAssassin_Conf.html)) [[https://spamassassin.apache.org/full/3.1.x/doc/Mail_SpamAssassin_Conf.html|SA Configuration Manual]] for specifics on creating configuration files. For this example, we're using a simple configuration containing the rule "required_score 3". The default configuration file will be located in /root/support/spamassassin/ 
-      * ''for i in `cat /etc/trueuserdomains | cut -d: -d' ' -f2-` ;do mkdir /home/$i/.spamassassin && touch /home/$i/.spamassassinenable ;done'' +<code> 
-    Copy the default configuration we created in step 3 to all cPanel accounts: +  touch /root/support/spamassassin/user_prefs && echo "required_score 3" >> /root/support/spamassassin/user_prefs 
-      * ''for i in `cat /etc/trueuserdomains | cut -d: -d' ' -f2-` ;do cp /root/support/spamassassin/user_prefs /home/$i/.spamassassin/ ;done'' +</code> 
-    Correct the permissions and ownership of the files/folders just created: + 
-      * ''for i in `cat /etc/trueuserdomains | cut -d: -d' ' -f2-` ;do chown $i:$i /home/$i/.spamassassinenable && chown -R $i:$i /home/$i/.spamassassin ;done'' +  Once that's completed, continue with these loops to create the proper files/folders. 
-  That's it! All cPanel accounts have SpamAssassin enabled with user preferences.+    Create the "enable" files for each user: 
 +<code> 
 +  for i in `cat /etc/trueuserdomains | cut -d: -d' ' -f2-` ;do mkdir /home/$i/.spamassassin && touch /home/$i/.spamassassinenable ;done 
 +</code> 
 + 
 +    Copy the default configuration we created in step 3 to all cPanel accounts: 
 +<code> 
 +  for i in `cat /etc/trueuserdomains | cut -d: -d' ' -f2-` ;do cp /root/support/spamassassin/user_prefs /home/$i/.spamassassin/ ;done 
 +</code> 
 +    Correct the permissions and ownership of the files/folders just created: 
 +<code> 
 +  for i in `cat /etc/trueuserdomains | cut -d: -d' ' -f2-` ;do chown $i:$i /home/$i/.spamassassinenable && chown -R $i:$i /home/$i/.spamassassin ;done 
 +</code> 
 + 
 +  That's it! All cPanel accounts have SpamAssassin enabled with user preferences.
  
control-panels/cpanel-whm/how-can-i-enable-spamassassin-on-all-cpanel-accounts.1477058168.txt.gz · Last modified: 2016/10/21 08:56 by mscherf