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.

DKIM - bad signature

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

Tags:
  1. sehh

    sehh Well-Known Member

    Joined:
    Feb 11, 2006
    Messages:
    579
    Likes Received:
    5
    Trophy Points:
    18
    Location:
    Europe
    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 (dkimvalidator.com) 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.

    PS:
    Running cPanel/WHM stable channel (11.54.0.24).

    PSPS:
    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.
     
  2. 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,

    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.
     
Loading...

Share This Page