DKIM signature not valid

Posted June 21, 2021 143 views
ApacheEmailDNSUbuntu 20.04

I am using one server for my main domain and another server for as my email server. The email domain is Mail server is working fine but it says that it does not have a valid DKIM signature. My email sending address is
I have tried to generate DKIM keys and update my DNS records for main domain) but all in vain.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi @usmanabid283,

There is a very good and useful answer to a similar question in the community here:

It provides good examples on how you can deal with DKIM records in DigitalOcean.

Additionally, upon checking in Google, I found a couple of tutorials outside of DigitalOcean that outline the process needed as well - Add DKIM to DigitalOcean

Please give them a read and let me know if they were helpful.

  • Hi KFSys,
    Thanks for responding. I have checked the link that you shared it did not helped my case. In my case my email and domain servers are different i.e., (main domain), server). Now I have configured my mail server to use the email like (AND NOT
    Now my first question is on which domain I need to setup my DKIM signature or
    Secondly, When I try to enter the DKIM key in it says the key is not valid.
    When I create the DKIM for, it has no impact on the testing website.

    I am testing my email on