Let us start with SPF, what is this stands for?
Sender Policy Framework is abbreviated as SPF. This’s an email authentication measure. It’s designed to protect email spoofing by validating emails from a domain with its host’s reputed IP addresses. The authorised hosts details are addedd into the DNS (Domain Name System) of a domain as TXT record.
We already discussed the command to install/enable the SPF record for an account under the WHM server. Please refer this topic for more details, “How to add/enable SPF record for an account – cPanel server command line option“
Here I am explaining the method for installing the SPF record for all accounts under your cPanel server. We need username of all accounts to enable the SPF record. We can fetch the user name from the location “/var/cpanel/users”.
Please do follow the steps below to enable the SPF for all accounts on the server.
Step I : Login to server as root.
Step II : Change the directory to “/var/cpanel/users“
# cd /var/cpanel/users
Step III : Execute the following;
for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/spf_installer $i ;done
See this to enable SPF and DKIM for all accounts.
That’s it 🙂