Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Enable SPF and DKIM for Existing cPanel Accounts  (Read 4927 times)

0 Members and 1 Guest are viewing this topic.

jominj

  • Guest
Enable SPF and DKIM for Existing cPanel Accounts
« on: June 02, 2015, 03:13:04 pm »
If you have forget to add SPF and DKIM while creating accounts, there is cpanel script available to create SPF and DKIM for existing accounts.

script to enable SPF
Code: [Select]
# /usr/local/cpanel/bin/spf_installer $usernameWhere $username is the account name of your cPanel account

script to enable DKIM
Code: [Select]
#  /usr/local/cpanel/bin/dkim_keys_install $usernameWhere $username is the account name of your cPanel account

To do this in bulk we can use a simple for loop. Use the following script:
Code: [Select]
for username in `ls -A /var/cpanel/users` ; do
       /usr/local/cpanel/bin/dkim_keys_install $username  &&
       /usr/local/cpanel/bin/spf_installer $username ; done
That's it. ;)