How to install enable SPF & Domain keys using SSH cPanel

Please follow the following steps to install and setup SPF and DKIM

 For : SPF Record (Sender Policy Framework)

Sender Policy Framework (SPF) is an email validation system designed to prevent email spam by detecting email spoofing by verifying sender IP addresses. SPF allows administrators to specify which hosts are allowed to send mail from a given domain by creating a specific SPF record (or TXT record) in the DNS zone files. Using the following command we can enable SPF for domains in cPanel.

 For One Domain : run the following command in ssh.

 /usr/local/cpanel/bin/spf_installer user (type username here) to enable it

 To Disable For One Domain : run the following command in ssh.

/usr/local/cpanel/bin/spf_uninstaller user (type username here) to disable it

 

 Command to install SPF for all cPanel users in a server:

Just copy and paste between the full line below

for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/spf_installer $i ;done

This will uninstall SPF record from existing cPanel account (to disable it) 
The command below will remove SPF
for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/spf_uninstaller $i ;done

Your done with SPF.

 

For : DKIM known as Domain Keys
DomainKeys is an e-mail authentication system designed to verify the DNS domain of an e-mail sender and the message integrity. Using the following command we can enable domain keys for domains in cPanel server.
 To enable For One Domain : run the following command in ssh.
/usr/local/cpanel/bin/dkim_keys_install (username here) to enable it
 To Disable For One Domain : run the following command in ssh.

 /usr/local/cpanel/bin/dkim_keys_uninstall (username here) to disable it 

This will uninstall DKIM (domain keys) from existing cPanel account (to disable it)

The command below will remove DKIM

 for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/dkim_keys_uninstall $i ;done
Command to install Domain keys for all cPanel users in a server:
Just copy and paste between the full line belowfor user in `ls /var/cpanel/users`; do /usr/local/cpanel/bin/domain_keys_installer $user; done

or

 for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/dkim_keys_install $i ;done

kbadmin has written 149 articles

Loading Facebook Comments ...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.