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.
 
To put a long TXT record in a DNS zone you cut it into pieces, each surrounded with " (a quotation character), and put a space between these pieces.

A longer explanation and an example:
https://www.akamai.com/cloud/commun...ke-a-txt-record-more-than-255-characters-long

"
In order to apply a TXT record longer than the 255 character limit, you must “concatenate” multiple strings of characters together. To do this, I would recommend opening up a text editor and placing in your 255+ character DNS record. Once you have the full record in the text editor, place quotes around the first 250 or so characters. This will section off the first set of characters into their own string. Do this again for the next section of your record and repeat for every chunk of about 250 characters thereafter. Be sure to put a space in between the quotes for each set of strings. For instance, if your TXT record is 700 characters long, it would be best to section off each string to be around 233 characters.

Example:

“xxxx....xxxx” “xxxx....xxxx” “xxxx....xxxx”

"
 
  • Like
Reactions: keeka