Installing SPF Record on cpanel server
for information about SPF you may see at http://www.openspf.org/Project_Overview
and to install it very easy
1. login using root to WHM
2. click on zone templates under dns
3. there’ll be 3 option, just choose 1 first
4. add this at the end of line
%domain%. IN TXT “v=spf1 a mx -all”
and repeat for those 2 others templates.
by editing this, you will find every new account you create has a spf record automatically.
then how about my current domain ?
good question!
now we’re going to that step.
login to ssh using root and follow instruction bellow
1. nano add.spf
2. put this code and save it
for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/spf_installer $i ;done
3. chmod 755 add.spf
4. ./add.spf
done!
by doing this all the account’s zone should be updated using spf record.
If you have nothing to do and want to do this 1 by 1 account, simply using code bellow.
/usr/local/cpanel/bin/spf_installer USERNAME
replace USERNAME with the username you want to add the SPF record.