Manually add DKIM public and private key to your cPanel/WHM server

Manually add DKIM public and private key to your cPanel/WHM server

 

There would be some cases when you would need to add a custom DKIM key. This doesn't happen often as cPanel has automated the procedure, however here are a few simple steps that you need to follow in case you need to set that up.

Generate a Domain key

If needed you can generate the key via this or any other site:

DKIM Wizard

Find the location of the domain keys folder in exim

Edit the exim conf and look for DKIM.

There you should see the path were the keys are stored example:

/var/cpanel/domain_keys/private

Updating the domain keys

Find the domain in question and update the DKIM private key there. For example I would say that my domain is bobbyiliev.com

Add the private key to:

/var/cpanel/domain_keys/private/bobbyiliev.com

Add the public key to:

/var/cpanel/domain_keys/public/bobbyiliev.com

Setting up your DNS

You will need to add a record to your DNS server with the public key as standard.

Restart Exim

To be on the safe side just give your exim instance a quick restart so that you would be sure that exim would read the new DKIM.

Hope that this helps someone.

 

Materialize

The Real-Time Data Platform for Developers

Buy me a coffeeBuy me a coffee