PDA

View Full Version : Enable SPF and DKIM for Existing cPanel Accounts



aaronbrad
03-18-2016, 09:38 AM
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


# /usr/local/cpanel/bin/spf_installer $username
Where $username is the account name of your cPanel account

script to enable DKIM


# /usr/local/cpanel/bin/dkim_keys_install $username
Where $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

# 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