Bulk add remote SPF record to accounts

Mauritz

Well-Known Member
Apr 29, 2015
62
0
6
Johannesburg
cPanel Access Level
Root Administrator
We need to append a remote SPF entry to all of the SPF records for our accounts in cPanel. Is there a way to bulk add an entry to the SPF records of all current customers and how would we deal with new accounts. Can we edit the template for SPF records to always include the entry we wish to append?
 

pwhjenny

Well-Known Member
Aug 31, 2012
138
0
91
cPanel Access Level
Root Administrator
You can use command /usr/local/cpanel/bin/spf_installer with for loop. If you want to add custom values in spf record you can view different options you can use with this command.
 

24x7server

Well-Known Member
Apr 17, 2013
1,911
97
78
India
cPanel Access Level
Root Administrator
Twitter
Hi,

You can add the SPF record using the script mentioned above or you can directly append the SPF record into the DNS zones server wide using a bash script. However, you have to make sure you are doing it properly because it may mess up things on the DNS zone if you choose too. In both the cases, you will have to use a bash shell script to do it serverwide...
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,220
463
  • Like
Reactions: postcd