Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Example DKIM record that does not fail

Discussion in 'E-mail Discussion' started by postcd, Nov 30, 2017.

Tags:
  1. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    691
    Likes Received:
    14
    Trophy Points:
    68
    Hello,

    when using cPanel's generated DKIM, e-mail headers says DKIM=fail:

    So i used DKIM checkers like Check a DKIM Core Key and DKIM Key Checker

    and it says my DKIM is invalid: "The p= field must be base64 encoded"

    The checker was also not happy about " mark at the beginning of the record.

    Example DKIM, with quotation mark and spaces (which may be problematic in some cases maybe?):
    - Removed -

    There is related discussion:
    DKIM key split over several records not working
    DKIM Core Key valid when checked but not when added to DNS

    I read it, but that topic is missing an example of valid DKIM or how exactly change the DKIM provided by cPanel in DNS section. Can please anyone give example of a DKIM and example how changed, valid one should look like?

    UPDATE: i solved this and got working (pass) DKIM when i removed all spaces, quotation marks (") and remove backslash ( \ ) that is before last letter ( ; ) of whole DKIM record value.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 postcd, Nov 30, 2017
    Last edited: Nov 30, 2017
    H.Csaba likes this.
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,856
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm glad to see you were able to solve the issue. Thank you for updating us with the outcome.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. vish

    vish Registered

    Joined:
    Dec 9, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    london
    cPanel Access Level:
    Website Owner
    hi i am having issues with my dkim, please could you help with an example of how i can solve this, i put my dkim in cloudflare and do mail-test and comes back as failed. my web hosting cannot help as they just keep providing me with dkim that dont work, been lost for days :S

    here is an example

    "v=DKIM1; k=rsa; p=MIIBIjANBgkshkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JsOyKxKdSJKuwBSh8x1jW6Yvd1aXg7P+YDErG3ruLsjOQWqJb2zINI5fv6+3mLhp7Y3g2eZijy/Iivs5OECqh4fSLw52CnBsdlXJ8jS1UAW8Xv0uGcAe7NlcTTw9XFzaYOgUzQL0gzGRyk44yT93ISR8LdWlIWC0ef0CdVPIaFJ4pazeScCC+dxsdyXa6fR8" PYckP7hrFT/SexR88S6NoeKetURWjv0G9Yhc19uBbOF6gwZS1SQUBbVfbWCOuZZlY+z/mgCJeE5ESzJkmffOmpJLx1w9ZxoftiEhKVqBnYuvbdqhcNtbtFIN/05HwR3t9fB97FswrhoFIQSl9gZFQIDAQAB\;

    how do i need to input it to be valid ?
     
  4. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,342
    Likes Received:
    58
    Trophy Points:
    178
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Cloudflare: How do I add DKIM records?

    Based upon that info, Cloudflare does not want any quotes or parentheses, and Cloudflare wants the record to be one continuous record. The Cloudflare system is obviously smart enough to know how to split up the record so that it is properly served.

    I would recommend trying this (no quotes, no parentheses, one single long record, and no trailing escape chartacter or semicolon)

    v=DKIM1; k=rsa; p=MIIBIjANBgkshkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JsOyKxKdSJKuwBSh8x1jW6Yvd1aXg7P+YDErG3ruLsjOQWqJb2zINI5fv6+3mLhp7Y3g2eZijy/Iivs5OECqh4fSLw52CnBsdlXJ8jS1UAW8Xv0uGcAe7NlcTTw9XFzaYOgUzQL0gzGRyk44yT93ISR8LdWlIWC0ef0CdVPIaFJ4pazeScCC+dxsdyXa6fR8PYckP7hrFT/SexR88S6NoeKetURWjv0G9Yhc19uBbOF6gwZS1SQUBbVfbWCOuZZlY+z/mgCJeE5ESzJkmffOmpJLx1w9ZxoftiEhKVqBnYuvbdqhcNtbtFIN/05HwR3t9fB97FswrhoFIQSl9gZFQIDAQAB


    Depending upon where you are adding the DKIM record, they (whomever is handling DNS) may have a specific way that they want you to enter the DKIM record in. Some examples.

    example 1
    "v=DKIM1; k=rsa; p=MIIBIjANBgkshkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JsOyKxKdSJKuwBSh8x1jW6Yvd1aXg7P+YDErG3ruLsjOQWqJb2zINI5fv6+3mLhp7Y3g2eZijy/Iivs5OECqh4fSLw52CnBsdlXJ8jS1UAW8Xv0uGcAe7NlcTTw9XFzaYOgUzQL0gzGRyk44yT93ISR8LdWlIWC0ef0CdVPIaFJ4pazeScCC+dxsdyXa6fR8" PYckP7hrFT/SexR88S6NoeKetURWjv0G9Yhc19uBbOF6gwZS1SQUBbVfbWCOuZZlY+z/mgCJeE5ESzJkmffOmpJLx1w9ZxoftiEhKVqBnYuvbdqhcNtbtFIN/05HwR3t9fB97FswrhoFIQSl9gZFQIDAQAB\;

    example 2
    "v=DKIM1; k=rsa; p=MIIBIjANBgkshkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JsOyKxKdSJKuwBSh8x1jW6Yvd1aXg7P+YDErG3ruLsjOQWqJb2zINI5fv6+3mLhp7Y3g2eZijy/Iivs5OECqh4fSLw52CnBsdlXJ8jS1UAW8Xv0uGcAe7NlcTTw9XFzaYOgUzQL0gzGRyk44yT93ISR8LdWlIWC0ef0CdVPIaFJ4pazeScCC+dxsdyXa6fR8" "PYckP7hrFT/SexR88S6NoeKetURWjv0G9Yhc19uBbOF6gwZS1SQUBbVfbWCOuZZlY+z/mgCJeE5ESzJkmffOmpJLx1w9ZxoftiEhKVqBnYuvbdqhcNtbtFIN/05HwR3t9fB97FswrhoFIQSl9gZFQIDAQAB\;"

    example 3
    ( "v=DKIM1; k=rsa; p=MIIBIjANBgkshkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA7JsOyKxKdSJKuwBSh8x1jW6Yvd1aXg7P+YDErG3ruLsjOQWqJb2zINI5fv6+3mLhp7Y3g2eZijy/Iivs5OECqh4fSLw52CnBsdlXJ8jS1UAW8Xv0uGcAe7NlcTTw9XFzaYOgUzQL0gzGRyk44yT93ISR8LdWlIWC0ef0CdVPIaFJ4pazeScCC+dxsdyXa6fR8" "PYckP7hrFT/SexR88S6NoeKetURWjv0G9Yhc19uBbOF6gwZS1SQUBbVfbWCOuZZlY+z/mgCJeE5ESzJkmffOmpJLx1w9ZxoftiEhKVqBnYuvbdqhcNtbtFIN/05HwR3t9fB97FswrhoFIQSl9gZFQIDAQAB\;" )

    Notice that examples 2 and 3 have the second part of the key enclosed by " " as well. Notice that example there is additionally enclosed by ( )

    On bind, all three of those ways shown above work fine. Depending upon the interface as well as type of nameserver (Bind, MS, etc), you may have to add it differently.

    Mike
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    texo and cPanelMichael like this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice