The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Trying to setup DKIM with external DNS

Discussion in 'E-mail Discussions' started by MillTech, Sep 9, 2016.

Tags:
  1. MillTech

    MillTech Registered

    Joined:
    Sep 9, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hi,

    I've enabled DKIM on the domain I am sending emails from but we use a third party DNS rather than the one on the web server. So, I went into the DNS in cPanel and there is a TXT entry for default._domainkey that is "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAv9HxBkbrxhaooARNXYW5/lCtTpCAvFxe1UH13oZ65EMMNvlQ4lMT+BmA/FCDZxjuP0lG5Kv4CDoHSGAp5vJYD8u2zaUvgUEOg8BvcBDK9evP+JKbEODHmobbye966C+bhd4ksOIUhFLXxGU2oB8QCBnIUC9JNkyChnBIRsOIiNedYjj3CaHYG9c+zLcKXa"/ps/jlVNTQ1Fs/6BQWHckMavMVKHHhUM5qcqrTHGM3Jaqif6vTyUcLuqB209JS8URznEAoVg1TqzqlmYgtX/ExuYnHVd7HhykGaGVR82BKyJF9Fan85CivtikejwMwIDAQAB\;

    Now, I go to our DNS service and try to setup a TXT entry exactly as this but it rejects it saying that the value contains mismatched quotes.

    My question is, what should I be entering into the DNS service to get this working?

    Thanks
     
    #1 MillTech, Sep 9, 2016
    Last edited by a moderator: Sep 9, 2016
  2. MillTech

    MillTech Registered

    Joined:
    Sep 9, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Okay, I found out the problem. The second part of the string should also be quoted for my DNS server.

    All works now.
     
  3. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    I still haven't figured out why cPanel has chosen to write those 2048-bit DKIM strings to the zonefile in the format that they do. Maybe one of the alternative cPanel DNS choices doesn't support the two halves being double quoted. But bind does support it, and I would find it much more useful if they would write them as two double-quoted strings to begin with. And it would probably save some people from having issues like this, since the most popular nameservers and web interfaces to manage DNS seem to either not allow 2048-bit DKIM records at all or do allow them and want both halves double quoted.

    Mike
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know which DNS service company you are configuring the DKIM record with?

    Thank you.
     
  5. MillTech

    MillTech Registered

    Joined:
    Sep 9, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Yes, it is "DNS made easy"
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  7. MillTech

    MillTech Registered

    Joined:
    Sep 9, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    It offers the same solution as the one I worked out myself.
     
  8. BFFMediaInc

    BFFMediaInc Registered

    Joined:
    Sep 29, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    USA
    cPanel Access Level:
    Reseller Owner
    You most likely need to remove the " at the beginning and the \; at the end before adding it to the text file. If copied from cpanel there is also a ; with a space after it in the middle of the p= section. This is what I did for cloudflare.
     
  9. BFFMediaInc

    BFFMediaInc Registered

    Joined:
    Sep 29, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    USA
    cPanel Access Level:
    Reseller Owner
    Does anyone have trouble getting a DKIM key to work with add-on domains? My email is on .195 and I have multiple cpanels on different IPs, the DKIM key is the same for all the domains, however only the primary domain used to setup the cpanel passes the DKIM tests. All the domains, pri,mary and add-on on my .195 cpanel which is also the primary ip for my mail server pass. Only the add-ons on my other cpanel fail. the SPF records and dmarc are all good, DKIM fail.

    Ideas?

    Thanks.
     
  10. BFFMediaInc

    BFFMediaInc Registered

    Joined:
    Sep 29, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    USA
    cPanel Access Level:
    Reseller Owner
    Also, I tried to edit my post for errors and to be more easily read and I was flagged for "potential spam" being new here I don't want to have trouble or get flagged for anything, this is what I was doing. cpanel spam claim.jpg cpanel edits.jpg

    I tried to contact a moderator but I can't figure that out either. Sorry, this forum software is different to me.

    Thanks again.
     
  11. BFFMediaInc

    BFFMediaInc Registered

    Joined:
    Sep 29, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    USA
    cPanel Access Level:
    Reseller Owner
    I think I have this resolved. the dkim record in cpanel is only for the domain that the cpanel was setup for. it does not work for the add-on domains so if you have a client with cpanel access and not whm, they need to contact the admin to get those records from the whm dns zone. I would think cpanel would list dkim for each domain but apparently not.
     
  12. ruzbehraja

    ruzbehraja Well-Known Member

    Joined:
    May 19, 2011
    Messages:
    383
    Likes Received:
    7
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Thats right. See: DKIM recipe with 3rd party / external DNS

    find out your server's DKIM public key by going to /var/cpanel/domain_keys/public/ Type "more mywebsite.com" to see the public key. Copy the public key, not including the BEGIN/END lines.​
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Enabling DKIM for an account via the "Authentication" option in cPanel should add DKIM records to the DNS zones for the addon domain names linked to the account. Could you verify which version of cPanel is installed on the system if this is not happening?

    Thank you.
     
Loading...

Share This Page