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!

DKIM - bad signature

Discussion in 'E-mail Discussion' started by sehh, May 18, 2016.

  1. sehh

    sehh Well-Known Member

    Feb 11, 2006
    Likes Received:
    Trophy Points:
    Hello everyone,

    I'm having problems with our cPanel/WHM server and DKIM with outgoing emails. Every time the server sends an email (via a PHP script), the receiving server rejects the email because it fails to verify DKIM.

    For example, here is what a remote server with postfix/opendkim reports:
    opendkim: bad signature data

    I tried an online DKIM test tool ( and that also reports something similar:
    result = fail
    Details: message has been altered

    I'm at a loss as to what causes this. My PHP script sends a pretty basic email with minimal headers (From, To, Reply-To, Date, Message-ID, etc). I can see that all the proper DKIM header lines are added by cPanel's exim and I can also verify that cPanel's dns properly resolves the public key (default._domainkey.).

    I've created 3 domain accounts in this server, all 3 of them exhibit this problem with outgoing emails :(

    Any help would be appreciated.

    Running cPanel/WHM stable channel (

    I forgot to mention that the same script is working fine on another cPanel/WHM server and the emails sent from that one validate DKIM fine.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator

    Is this only happening when sending email via the PHP script, or can you reproduce the issue when sending email from an email client? Is the PHP script using SMTP authentication to send the message?

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

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