Casbay Knowledge Base

Search our articles or browse by category below

cPanel script to add SPF and DKIM

Last updated: September 8, 2022
Estimated reading time: 1 min

cPanel script to add SPF and DKIM

There is a script available on every cPanel servers by default to enable the SPF and DKIM records via command line.  This will surely help when there is a need of adding the records for many accounts at the same time.

If the SPF is only for a single account, do it like the following:

# /usr/local/cpanel/bin/spf_installer $username

Do not forget to replace $username with the actual cPanel username.


If the DKIM is only for a single account, do it like the following:

# /usr/local/cpanel/bin/dkim_keys_install $username

Replace $username with the actual cPanel username.

These commands will help you to enable email authentications for single cPanel users. If you have many accounts and you want to enable SPF and DKIM for all accounts, please follow the simple for loop.

Check out the next article on How create and remove an Addon Domain.

Was this article helpful?
Dislike 0
Previous: HOW TO: Create contacts in SmarterMail
Next: HOW TO: Change cPanel Password
Discover the perfect balance of performance and budget-friendly Dedicated Server plan !
Discover the perfect balance of performance and budget-friendly Dedicated Server plan !
High performance and low cost Dedicated Server plan 128GB from $185 – upgrade today!
High performance and cheap Dedicated Server plan 128GB from $185 – upgrade today!