I am checking the dkim key generated by opendkim and I keep getting an error of key not valid. Here is the output of mail.txt key file:
I replaced my domain with example.com in this scenario.
mail._domainkey IN TXT ( "v=DKIM1; h=sha256; k=rsa; "
"p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnfDZPCPKymA9ybytg9YS9yhS4ui118UCJTYC9AeI36bsuLKgcYqJJYVQiaJ8m7zyOrD0UDtR/OIAMmzI9XWK0S9rt10JSr8XYq7Ewz8zMiTzyECtqtCzYlg6NUxbmmSkf6XMgpPBF2ttZ7fa0WroumAgULZmA6+X4APoOQHnWFi7wg0AJ47dMkqIY1RXBBt9/ncMuBlPL7DllH"
"4SgKyGiKssXbIZwGryO0bDU7eOgKmpFOZk4rjp6cQN/6xG7dl8mKKh6AWhUo7aT9fbqAbg5xJCE8SuvshX8EyoxXFPFfow1RiKBkXWyRQB9NaCbFeOQ+kZSdBUJWrjPzsd+Iz3xwIDAQAB" ) ; ----- DKIM key mail for example.com
I am assuming that my text record should look something like the following:
"v=DKIM1; h=sha256; k=rsa;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnfDZPCPKymA9ybytg9YS9yhS4ui118UCJTYC9AeI36bsuLKgcYqJJYVQiaJ8m7zyOrD0UDtR/OIAMmzI9XWK0S9rt10JSr8XYq7Ewz8zMiTzyECtqtCzYlg6NUxbmmSkf6XMgpPBF2ttZ7fa0WroumAgULZmA6+X4APoOQHnWFi7wg0AJ47dMkqIY1RXBBt9/ncMuBlPL7DllH"
Where I use the p value in the text record. But I also get a second value in double quotes and I don't see that in any other tutorials I have read but I tried to use that value instead of the p value and no luck also I tried a combo of both. Not sure what I am doing wrong here but it is starting to get frustrating. I have also tried to generate new keys but the problem persists.
When I check the key with opendkim-testkey -d example.com -s mail -vvv
I get:
opendkim-testkey: using default configfile /etc/opendkim.conf
opendkim-testkey: checking key 'mail._domainkey.example.com'
opendkim-testkey: key not secure
opendkim-testkey: key OK
So idk what is the deal. Any help would be appreciated.