Introduction
When using the WHM interface, there is a global option to enable SPF & DKIM records to all domains on the server. This interface inside WHM is the following:
"WHM: Home -> DNS Functions -> Enable DKIM/SPF Globally"
However, using the cPanel API calls, you can enable or disable the DKIM record on individual domains. There is no way to do this through the WHM interface.
Procedure
For this procedure, you would need to be familiar with the cPanel API calls. The API calls can be used by command-line, also reachable by the WHM: Terminal Feature, to run certain cPanel functions.
To enable or disable a DKIM record for a domain, you will want to reference the following WHM API documentation:
- https://documentation.cpanel.net/display/DD/WHM+API+1+Functions+-+enable_dkim
- https://documentation.cpanel.net/display/DD/WHM+API+1+Functions+-+disable_dkim
Both of these API calls have a "command-line" component. Below are examples you can use.
Example domain:
cptest-2.com
To enable DKIM:
whmapi1 enable_dkim domain=cptest-2.com
To disable DKIM:
whmapi1 disable_dkim domain=cptest-2.com
That's it.