DKIM fail in DMARC report

ladass

New Member
Mar 17, 2025
4
2
3
Hi everybody,

I would like to ask, how to properly set DKIM on PMG. The problem description: Few weeks ago I set DMARC record for our domain and set rua parameters to get aggregate reports about functionality. Microsoft and Google servers send back "fail" for DKIM. I tried to search for some information and discovered that our PMG has unusual DKIM record. When I click the View DNS Record button in PMG GUI, I can see:
mail.ourdomain.com._domainkey IN TXT ( "v=DKIM1; h=sha256; k=rsa; "
"p=MIIBIjANBgkqh ..... S"

"L79Nj3vzkkmQ ..... B" ) ; ----- DKIM key mail.ourdomain.com

including empty raw in the middle. But when I look at other DKIM records, they have no brackets () and second key. I tried to remove middle empty raw (it is a TAB) in TXT DNS record, but it did not helped.

Can somebody give me advice, how can I correct our PMG DKIM record, please? I predict it must corespond to private key in /etc/pmg/dkim/mail.ourdomain.com.private or generate new, correct one? At PMG documentation is nothing about generating new one.
 
mail.ourdomain.com._domainkey IN TXT ( "v=DKIM1; h=sha256; k=rsa; "
"p=MIIBIjANBgkqh ..... S"

"L79Nj3vzkkmQ ..... B" ) ; ----- DKIM key mail.ourdomain.com
Hi, @ladass
I don't know how the PMG GUI presents DNS records but the form shown in your post is unusual when it comes to DNS generally.
Usually this has the form:

<selector>._domainkey.ourdomain.com. IN TXT ...

I mean the order: first is the selector., then the string _domainkey. , then the domain.
 
IME the DKIM TXT record presented in the PMG UI needs to be edited prior to pasting in DNS records. I am not sure why, mine (1024) was displayed with additional line breaks.
I second Onslow's suggestion of generating a new DKIM without periods in the selector. In PMG, you can generate a new DKIM, using a new selector, and the old one's preserved should you wish to switch back to it.
Also my understanding is, keys greater than 1024 may need to split across multiple DNS records, though I don't know how one does that.
Once you have it configured, test alignment using one of the various online tools.