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

hetch

Active Member
Feb 4, 2009
28
0
51
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
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.
 

hetch

Active Member
Feb 4, 2009
28
0
51
Please try switching to SMTP authentication in the script. sendmail binary via exim doesn't have the same parameters on what it provides.
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
 
Last edited:

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
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.
 

hetch

Active Member
Feb 4, 2009
28
0
51
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?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
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.