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:
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.
Recent Posts

How to Get Current Route Name in Laravel
2020-11-08 08:57:11
How to check the logs of running and crashed pods in Kubernetes?
2020-10-28 09:01:44
Top 10 VScode Shortcuts For Mac and Windows to Help You be More Productive
2020-10-28 07:12:51
How to install the latest stable Nginx version on CentOS 8
2020-10-25 16:10:48