How To Add SPF Records For All Accounts On Linux Centos CPanel/WHM Servers

cPanel has been providing with script with which we can add SPF Records on our cpanel/whm account.

Steps to add SPF Record:

Step1: you must have one ‘Linux server’ with ‘root’ user and run following script on server.

/usr/local/cpanel/bin/SPF_installer yourcpaneluser

Step2: Replace “yourcpaneluser” with actual username for which you want to enable SPF records. But if you want to enable SPF records for multiple accounts or all accounts on cPanel server then it is much time consuming process while you add spf records one by one on each account.

Here is simple bash script with which you can add SPF records:

#!/bin/bash
cd /var/cpanel/users
for i in `ls /var/cpanel/users` ; do
/usr/local/cpanel/bin/spf_installer $i ;

Congratulation your SPF record have added successfully.

We will be happy to hear your thoughts

Leave a reply

Serverbasket Help
Logo
Compare items
  • Total (0)
Compare