This article will show you step-by-step DKIM key generation.
In this article, we will assume that your domain is
yourdomain.com and we will be using the DKIM selector
On your computer (or on your server), on the command line, execute this command:
openssl genrsa -out m1.yourdomain.com.pem 2048
This command generates a file containing the private key for the DKIM signature.
Now, generate the public key based on this private key:
openssl rsa -in m1.yourdomain.com.pem -out m1.yourdomain.com.pub -pubout
Now, you have two files:
m1.yourdomain.com.pemis the private key.
m1.yourdomain.com.pubis the public key.
Edit your public key and merge lines into one. Be careful about not changing any character inside the file.
Set your DKIM private key on your MTA configuration. This process may vary depending on what MTA you’re using.
As the last step, go to your
yourdomain.com DNS control panel and add a TXT record with;
- Record type:
k=rsa; p=.......(replace the dot area with the public key one-line content)
That’s all. Now you have your DKIM signature ready.
If you want to use a DKIM generator service instead of running commands shown above, you can try this one: Sparkpost DKIM Wizard
- The article was helpful
- The article was not helpful