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.

Email from php script are not having DKIM and SPF in headers

Discussion in 'E-mail Discussions' started by hetch, Oct 4, 2012.

  1. hetch

    hetch Active Member

    Joined:
    Feb 4, 2009
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I enabled DKIM and SPF in cpanel. I am using a php script to send my newsletter. When I am checking in hotmail message source, I am not seeing any DKIM or spf are not added.

    sender-id=pass
    dkim=none
    x-hmca=pass
    X-DKIM-Result: None
    X-SID-Result: Pass
    X-AUTH-Result: PASS


    When I use my webmail to send an email, it is showing these heders:

    sender-id=pass
    dkim=pass
    x-hmca=pass
    X-DKIM-Result: Pass
    X-SID-Result: Pass
    X-AUTH-Result: PASS

    So my question is, is there anything I can add to email headers in exim or in php script?

    thanks.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    What method are you using in your PHP script to send out email? Is it SMTP authentication, or are you using PHP's mail() function?

    Thank you.
     
  3. hetch

    hetch Active Member

    Joined:
    Feb 4, 2009
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    PHP's mail() function.

    thank you.
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please try switching to SMTP authentication in the script. sendmail binary via exim doesn't have the same parameters on what it provides.
     
  5. hetch

    hetch Active Member

    Joined:
    Feb 4, 2009
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    I can not change the script code.

    Is there anyway I can force adding dkim to email going out of this php script? (which only uses php mail() function)


    When I enable email authentication in cpanel, this is what happens or I can follow these steps seperately after enabling:
    http://www.exim.org/exim-html-current/doc/html/spec_html/ch56.html
     
    #5 hetch, Oct 8, 2012
    Last edited: Oct 8, 2012
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    For the script, what is the return path showing as for the domain? I see discussions that DSO with PHP will cause sendmail to not work for DKIM. I'm uncertain if it shouldn't be working with any other PHP handler, since we only have a case about DSO (57410). In the case of DSO, you will be unable to use PHP mail() function and have the DKIM signatures attached.
     
  7. hetch

    hetch Active Member

    Joined:
    Feb 4, 2009
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    username@host.hostname_here.com

    (If I use smtp with another script, it is showing me@mysite.com as Return-Path)

    What is DSO? Something related to php install? My server API is CGI.
     
  8. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    DSO would be an available PHP handler in WHM > Apache Configuration > PHP and SuExec Configuration area. If the server is using DSO as the PHP handler, then PHP scripts using mail() function cannot send a dkim signature.
     
  9. hetch

    hetch Active Member

    Joined:
    Feb 4, 2009
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    No DSO there. I am seeing this:


    Default PHP Version (.php files) 5
    PHP 5 Handler suphp
    PHP 4 Handler none

    Apache suEXEC on
    Apache Ruid2 off


    So what now?
     
  10. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Could you submit a ticket for us to investigate this issue, since it might be a potential bug that is happening here. I'm uncertain, since again the only case really speaking about sendmail via exim not passing signatures when using PHP's mail() function.
     
Loading...

Share This Page