incorrect DKIM key generated by cPanel

trucmuche

Well-Known Member
Nov 20, 2014
98
4
58
cPanel Access Level
Root Administrator
Hello,

My problem is fully described in the third message of this thread...

[I deleted the original message of this thread because somebody merged another question with this thread, which makes the subject of this thread not clear... To avoid confusion and you wasting time, I delete this message because it's not anymore related to my question]

Thank you for your understanding.

Trucmuche
 
Last edited:

trucmuche

Well-Known Member
Nov 20, 2014
98
4
58
cPanel Access Level
Root Administrator
Ok : I had to remove the middle quote and to remove the \; at the end... The DKIM key
Code:
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4WJUHy1bB[andSoOn]m5gwzS9gpvQe83rD8lJphDVoxzqQIDAQAB
is now validated by http://dkimcore.org/c/keycheck BUT I cannot add it to my dns zone (which is handled by GANDI)...

Does anybody has added a 2048 bits DKIM key to its Gandi zone file ??
 

trucmuche

Well-Known Member
Nov 20, 2014
98
4
58
cPanel Access Level
Root Administrator
Hello,

The problem is now the following :

WHM 11.50 generates 2048bits DKIM keys but I did not manage to add them to gandi's zone file. The following syntax seems correct, the key has been validated by http://dkimcore.org/tools/dkimrecordcheck.html but this entry is rejected by Gandi's interface.
Code:
default._domainkey 10800 IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4WJUHy1bBpoeXurvgZ3IyI/HUw7VB5jdVoWZYYlIRgTeItzVKuC7i2U/6BHcjg/tPAbuE6cyvtvhrnN24erxB986u5S+bb4vsBgzbHT03pD8BYJ[end of the key here]"
Could you help me ?

Thanks in advance !

Best regards,

Trucmuche
 
Last edited:

Wookify

Registered
Sep 12, 2011
3
0
51
cPanel Access Level
Root Administrator
I'm having the same issue except with DNS Made Easy. The record that cPanel generates does not fit within the 255 character limit of a TXT record. It also has a misplaced double quote which their validator doesn't like.

Any suggestions on how to get the cPanel DKIM generated record to comply with these constraints?
 

trucmuche

Well-Known Member
Nov 20, 2014
98
4
58
cPanel Access Level
Root Administrator
I found a solution.

The key provided by CPanel had a double quote (") after 255 characters. This is incorrect : the syntax needs TWO double quote : the first to close the initial double quote before v=DKIM1 and the second to open a second group with the remaining characters of the key.
And my key ended by \; which seems also incorrect because I (think I) had to delete it to have key validated by http://dkimcore.org/tools/dkimrecordcheck.html. I ended the key by a final double quote (") and I could put it in the GANDI's interface.

So. The initial key provided by CPanel was :
Code:
"v=DKIM1; k=rsa; p=MIIB[manycharacters]kyUL/""48N[many characters]DAQAB\;
and I had to modify it to :
Code:
"v=DKIM1; k=rsa; p=MIIB[manycharacters]kyUL/""48N[many characters]DAQAB"
I created a zone file entry in GANDI's interface which is :
Code:
default._domainkey 10800 IN TXT "v=DKIM1; k=rsa; p=MIIB[manycharacters]kyUL/""48N[many characters]DAQAB"
and after the propagation, I checked the validity of DKIM using http://www.port25.com/support/authentication-center/email-verification/ and it get DKIM: PASS !

Hope this helps...
 
  • Like
Reactions: orlando33

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

Internal case CPANEL-794 is open to address the improper handling of quotes and data length for TXT records (DKIM). You can monitor our change logs to see when this case has been resolved:

cPanel - Change Logs

Thank you.