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!

My emails aren't signing GoDaddy VPS

Discussion in 'E-mail Discussion' started by MrCanada, Mar 2, 2018.

  1. MrCanada

    MrCanada Member

    Joined:
    Dec 23, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Canada
    cPanel Access Level:
    Root Administrator
    After a lot of research, I still can't seem to figure out why my emails aren't signing. This is what I have attempted so far. Keep in mind, I am using a VPS from GoDaddy. I am trying to send emails from Webmail and from Gmail (I set up Pop there), and neither are signing.


    1. Under cPanel > Authentication I see that DKIM is Status: Enabled Active (DNS Check Passed).


    2. I sent an email to Port25 from one of my domain's emails (support@example.com). This is some of what I got back:
    ==========================================================
    Summary of Results
    ==========================================================
    SPF check: pass
    "iprev" check: pass
    DKIM check: none
    SpamAssassin check: ham

    ----------------------------------------------------------
    DKIM check details:
    ----------------------------------------------------------
    Result: none (message not signed)
    ID(s) verified:

    It is clear that the DKIM is not signing my emails.


    3. I used mxtoolbox.com to check my DKIM and everything seems fine there:

    Screen Shot 2018-03-02 at 5.44.11 AM.png

    4. As discussed in the following thread, under WHM > Exim Configuration Manager > Advanced Editor, I modified the ROUTERSTART section transport from remote_smtp to dkim_remote_smtp. This still didn't solve my issues (emails are still not being signed).
    SOLVED - Is DKIM possible if I'm not running DNS locally?


    5. I use an email service called Sendgrid for my transactional emails (registration confirmations and password resets). Emails that Sendgrid are sending through my domain are having no problem signing DKIM... I think they use something known as "domain keys" instead.


    Does anyone have any idea why my emails are not signing? :(
     
  2. MrCanada

    MrCanada Member

    Joined:
    Dec 23, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Canada
    cPanel Access Level:
    Root Administrator
    Might be making some headway... I checked exim_paniclog and noticed the following:

    unable to open private key file for reading: /var/cpanel/domain_keys/private/s1-2-3-4.secureserver.net
    (replaced my ip with 1-2-3-4)

    also I scrolled up and was also noticing:
    unable to open private key file for reading: /var/cpanel/domain_keys/private/example.com

    So when I went to /var/cpanel/domain_keys/private, there was nothing in there. Then I checked /cpanel/domain_keys/public, and nothing is in there either. Do I need to do something to make my keys appear in public and private? When I search for my dkim on mxtoolbox it looks like it is finding public key so I'm not sure what's wrong?
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,903
    Likes Received:
    1,814
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Can you open a support ticket using the link in my signature so we can take a closer look at your system to see how Exim is configured? Note that you may want to reach out directly to GoDaddy first to see if they can take a closer look.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. MrCanada

    MrCanada Member

    Joined:
    Dec 23, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Canada
    cPanel Access Level:
    Root Administrator
    Thank you for your response. How does the WHM Authentication process work? Under WHM > Authentication > DKIM > Enable, when I press Enable does it attempt to place the DKIM public and private key somewhere on my server, and if so, where? Centos if it matters.

    Edit:
    I found this quote. I am wondering if it is correct?
    Thank you.
     
    #4 MrCanada, Mar 2, 2018
    Last edited: Mar 2, 2018
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,903
    Likes Received:
    1,814
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The "Authentication" option is found in cPanel as opposed to WHM. Using the option to setup DKIM generates the keys, and then populates the TXT record in the DNS zone of the domain names under the account. The DKIM keys are stored in the following directory:

    /var/cpanel/domain_keys/

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    MrCanada likes this.
  6. MrCanada

    MrCanada Member

    Joined:
    Dec 23, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Canada
    cPanel Access Level:
    Root Administrator

    Thank you for your reply. I don't see anything in /var/cpanel/domain_keys/ other than empty public and private folders where the keys should be. Was it the DKIM enable that created these folders? I guess if I just create the keys myself and edit my DNS it should be ok?
     
    #6 MrCanada, Mar 2, 2018
    Last edited: Mar 2, 2018
  7. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,675
    Likes Received:
    84
    Trophy Points:
    328
    cPanel Access Level:
    Root Administrator
    Did you run:

    /usr/local/cpanel/bin/dkim_keys_install <user>

    For the specific owner of the account in question?
     
    MrCanada likes this.
  8. MrCanada

    MrCanada Member

    Joined:
    Dec 23, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Canada
    cPanel Access Level:
    Root Administrator

    Thanks for your response. Since I've never heard of this dkim_keys_install I would say no I've never run it (unless it runs automatically when enabling DKIM in cPanel?). Is running this what will create the keys in /var/cpanel/domain_keys/public and /var/cpanel/domain_keys/private? Shouldn't enabling DKIM in cPanel > Authentication > Enable DKIM have done anything running dkim_keys_install does?
     
    #8 MrCanada, Mar 2, 2018
    Last edited: Mar 2, 2018
  9. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,675
    Likes Received:
    84
    Trophy Points:
    328
    cPanel Access Level:
    Root Administrator
    It's what I do.

    I guess you can also do it from the user's cPanel by clicking on something. I'm much more of a command-line guy myself. Of course, if someone doesn't have root access to the server, then they won't be able to run root commands.

    I've never been really sure how this command takes a user as an argument as opposed to a domain name. It create DKIM keys (public/private) for all of the current domains owned by that user. Does it create DKIM keys for future domains created by that user?

    The server won't automatically create DKIM keys for accounts unless you enable the option some where in WHM's tweak settings (I'm too lazy to look up that option name at the moment... again, I'm more command line than GUI).
     
    MrCanada likes this.
  10. MrCanada

    MrCanada Member

    Joined:
    Dec 23, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Canada
    cPanel Access Level:
    Root Administrator
    Thanks! Running the dkim_keys_install script put the keys in my public and private folders. A step forward for sure. I will post an update to see how the rest goes.
     
    cPanelMichael likes this.
  11. MrCanada

    MrCanada Member

    Joined:
    Dec 23, 2017
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Canada
    cPanel Access Level:
    Root Administrator
    Problem solved!

    For future reference anyone looking at this in the future
    As @sparek-3 suggested, all I had to do was run the script /usr/local/cpanel/bin/dkim_keys_install <user> and then immediately my emails were being signed (previously they weren't even being signed) and the DKIM is now passing in the emails I send. It should be noted that before running the script I had already enabled DKIM in cPanel > Authentication > Enable DKIM. However, doing it in cPanel didn't create the keys like running the script did. Enabling DKIM in cPanel did however create the correct DNS record.

    Thank you @sparek-3 and @cPanelMichael
     
  12. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,903
    Likes Received:
    1,814
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    On a test server, enabling DKIM via "cPanel >> Authentication" generates the key files in the /var/cpanel/domain_keys/public/ and /var/cpanel/domain_keys/private/ directories. Disabling DKIM removes the keys. I confirmed this works for both the primary domain name associated with the account, and it's addon domain names. What version of cPanel are you using, and did you notice any error messages in /usr/local/cpanel/logs/error_log when using the Authentication option to enable DKIM via cPanel?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. ncpowerbrute

    ncpowerbrute Registered

    Joined:
    Jun 26, 2016
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    DKIM is not working properly as originally reported. The dkim is not only broken for the individuals it is broken at the domain entry in the DNS. Since the enable/disable doesn't work through CPanel itself what is the correct method to fix this if there are multiple domains and multiple users per domain so that it remains persistent?
     
  14. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,903
    Likes Received:
    1,814
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I've not been able to reproduce this behavior. Could you open a support ticket using the link in my signature so we can take a closer look?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  15. ncpowerbrute

    ncpowerbrute Registered

    Joined:
    Jun 26, 2016
    Messages:
    3
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    This is the answer we were looking for. In Cpanel while we were in a ssh session and monitoring the directory we never saw any files deleted when DKIM was disabled from CPanel. However, when a script similar to below was executed it provided the desired result of overwriting the exiting key files with new domainkeys for all of the user accounts. We then need to wait for the DNS to propogate and confirmed the mail clients were using the exact same hostname (for us just the domain name without the hostname) as the MX entry in the DNS record.

    for user in `ls -A /var/cpanel/users` ; do /usr/local/cpanel/bin/dkim_keys_install $user ; done

    We want to credit thecpaneladmin for the solution found here Installing DomainKeys and SPF Records - The cPanel Admin
     
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