1

I setup dkim record using following tutorial.

But when I check the mx records using googleapps toolbox and dkimcore cheking tool it gives error

google says dkim is not setup, dkimcore says A public-key (p=) is required

All my configuration is same with above document, only different I change my domain name with example.com.

Only different that I see when the guy who write document, when he say sudo opendkim-genkey -s mail -d example.com it returns

"v=DKIM1; k=rsa; p=key"

But when run the exact command it gives me this.

"v=DKIM1; h=sha256; k=rsa" "-p=key" "andAnotherKey"

What may cause this difference ? And how to I solve or how to use ?

2 Answers2

1

I got the exact same issue when i configured DKIM for my server, and from what I remember, you had to generate a DKIM record manually from this command and get a result like :

"v=DKIM1; h=sha256; k=rsa; p=<key><andAnotherKey>"

Example for my own server, i got this result from the command :

mail._domainkey IN      TXT     ( "v=DKIM1; h=sha256; k=rsa; "
      "p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4j5eGBPD/BvRQS+kn0WciLGXy1qc/BxQRuE//PSo5JlrvwhNDijBh/ug0T19oyVsGrKuYVd1CuITiVAA5LS80XblcMVrbEWd8cFX1QRpn6zv76BzGW3gTrDs13UMTW3njf3wYWHzY2rWgaiF8GHRr2mqjUQUsqkrYrol7LXrlI1+IvdP/fGUjCYM1wNRJUH0qWMHypSQ6j2Xii"
      "2Ldmb74nbnIlBZPsi0t9oEyFTtYYJAQrDmudp3/Jr1wftbAh0R4ezCiyqslyukLjwtDpCNPtSvoQOxbkW5hpMhcFiRWfcs4fRd7wbsvhi4eDOynGVz1+0GX/AXthgQFVKF7n6OVQIDAQAB" )  ; ----- DKIM key mail for redheness.net

and i make this record :

v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4j5eGBPD/BvRQS+kn0WciLGXy1qc/BxQRuE//PSo5JlrvwhNDijBh/ug0T19oyVsGrKuYVd1CuITiVAA5LS80XblcMVrbEWd8cFX1QRpn6zv76BzGW3gTrDs13UMTW3njf3wYWHzY2rWgaiF8GHRr2mqjUQUsqkrYrol7LXrlI1+IvdP/fGUjCYM1wNRJUH0qWMHypSQ6j2Xii2Ldmb74nbnIlBZPsi0t9oEyFTtYYJAQrDmudp3/Jr1wftbAh0R4ezCiyqslyukLjwtDpCNPtSvoQOxbkW5hpMhcFiRWfcs4fRd7wbsvhi4eDOynGVz1+0GX/AXthgQFVKF7n6OVQIDAQAB
                                                                                                                                                                                                                                                                                      ^
                                                                                                                                                                                                                                                                              Start of second key

I can clearly not identify the source of this error and why this command now return this result.

redheness
  • 216
  • 1
  • 7
0

The is how I got 2048 bit dkim to work on AWS route 53. Initially it was this and it failed

"v=DKIM1; k=rsa;" "p=MII...EndofKeyOne" "4tOt...EndofKeyTwo"

This is what worked below:

"v=DKIM1; k=rsa; p=" "MII...EndofKeyOne" "4tOt...EndofKeyTwo"

Note: (1) It just single space that separated the double quotes of key one from key two, not line separation. (2) The first key started on the new line with the double quote sign ( I assumed it could have still start on the same with v & k specifications and would still have work). (3) That p tag (public key tag) was inserted in the open & close double quotes that start the value i.e "v=DKIM1; k=rsa; p=" (4) The point 3 above is actually the missing puzzle that get the configuration done.