• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question DKIM: where is the public key stored?

onlinesolutions

Basic Pleskian
When enabling DKIM, there is a private key stored on your server and a public key that is stored in the DNS. I don´t have DNS installed in Plesk, so where would I find the information that needs to be set up as a DNS record?
 
As a text record you copy a part of the contents from the file /etc/opendkim/keys/yourdomain.com/mail.txt (or default.txt), it data should start from v=DKIM1; k=rsa; to the end, without the quotes as you can see it’s in quotes.

It'll look like this example:
Code:
v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPzE0GmvFwAQsgcFzopy4zMNWUbL6JM5XIyjBy3bUnANI5axeb/Lw/GBjUoSFLEiO80Tt8m3A5YrBKcodRQQURYiW6/YtElhLupHyfcxQhfNLU4z9JUOJKPjcpMZCj0Xv873QgVOl+7U605JdBHSPOx4ybBZwDq68cw9YFYRPmEwIDAQAB

You'll copy this code as a txt record to your DNS host.
 
Last edited:
As a text record you copy a part of the contents from the file /etc/opendkim/keys/yourdomain.com/mail.txt (or default.txt), it data should start from v=DKIM1; k=rsa; to the end, without the quotes as you can see it’s in quotes.

It'll look like this example:
Code:
v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDPzE0GmvFwAQsgcFzopy4zMNWUbL6JM5XIyjBy3bUnANI5axeb/Lw/GBjUoSFLEiO80Tt8m3A5YrBKcodRQQURYiW6/YtElhLupHyfcxQhfNLU4z9JUOJKPjcpMZCj0Xv873QgVOl+7U605JdBHSPOx4ybBZwDq68cw9YFYRPmEwIDAQAB

You'll copy this code as a txt record to your DNS host.
Thank you for your response. It is not stored there, but I figured out I can generate the key byopenssl rsa -in default -pubout -out public as the private keys are in fact stored in etc/domainkeys/DOMAIN.com
 
Back
Top