SPF (Sender Policy Framework) :

The SPF recognizes the thing that which Mail Servers are allowed to send Emails on your domain's behalf. This is used to keep spammers away from sending messages with forged "From Addresses" at your domain.

DKIM (DomainKeys Identified Mail) :

The DKIM is an Email acceptance framework. This framework identifies email spoofing by providing a mechanism which allows receiving mail exchangers to check that incoming mail from a domain is approved by that domain’s administrators as well as the email content is not altered during the exchange process

How to Enable/Disable SPF and DKIM for All cPanel Accounts?

SPF and DKIM Records can be easily enabled from cPanel >> Home >> Mail >> Email Authentication. If there is a need to enable SPF and DKIM for all Accounts in cPanel then you should use the following script -:

Code:
cat /etc/trueuserdomains | cut -d: -f2 >> /root/users.txt
for i in `cat /root/users.txt` ;do
/usr/local/cpanel/bin/dkim_keys_install $i ;done
for i in `cat /root/users.txt` ;do
/usr/local/cpanel/bin/spf_installer $i ;done
If there is a need to disable SPF and DKIM for all Accounts in cPanel then you should use the following script -:

Code:
cat /etc/trueuserdomains | cut -d: -f2 >> /root/users.txt
for i in `cat /root/users.txt` ;do
/usr/local/cpanel/bin/dkim_keys_uninstall $i ;done
for i in `cat /root/users.txt` ;do
/usr/local/cpanel/bin/spf_uninstaller $i ;done
How to Enable/Disable SPF and DKIM for All New Creating cPanel Accounts via WHM?

For enabling SPF and DKIM by-default for all newly created cPanel Accounts you should perform the following tasks -:
  • Login to WHM.
  • Click on “Tweak Settings” under ”Server Configuration”.
tweak.png

  • Here you can enable the DKIM and SPF on domains for newly created accounts.
dkim.png
Author
Bhawani Singh
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Bhawani Singh

Top