Hi,

I enabled DKIM and SPF in my 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.

    miss.fine;11014471 wrote:

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

    Well since DKIM works based on the "DKIM-Signature" header added by the client sending the e-mail, yes, you could add a "DKIM-Signature" header.

      Can you tell me how to add it? What is the format?

        miss.fine;11014493 wrote:

        Can you tell me how to add it?

        That would depend on how your PHP script is sending mail (e.g. whether it's using the built-in [man]mail/man command, a PEAR module, a 3rd party class/library, ... ?). Regardless, the documentation for your method of choice should explain how you can specify additional headers to be included with the message.

        miss.fine;11014493 wrote:

        What is the format?

        It's defined in the RFC I linked to above. In addition, the corresponding Wikipedia article's How it works section also appears to do a decent job at defining the format of that header.

        EDIT: Since you mentioned cPanel, it sounds like you have a good amount of access to the server where your website is hosted. If that's the case, note that you can also add DKIM capability at the MTA layer (e.g. the server daemon that PHP talks to when it sends mail) unless you're connecting to some external SMTP server.

        There also appear to be PHP classes such as PHP Mail Domain Signer and DKIM and Domain Keys class for PHP that provide the ability to generate a DKIM signature for you.

        EDIT2: Just found this tidbit in case you aren't using an external SMTP server:

        In Cpanel, you can enable DKIM support. Once enabled, you do not need to digitally sign any emails you send out if you are using the outbound mail services of your web account.
        - Login to cpanel in the normal way and click on 'E-Mail Authentication'.
        - Click enable for DomainKeys and SPF
        - cPanel will generate the entries and update your DNS all at the same time

          In Cpanel, you can enable DKIM support. Once enabled, you do not need to digitally sign any emails you send out if you are using the outbound mail services of your web account.
          - Login to cpanel in the normal way and click on 'E-Mail Authentication'.
          - Click enable for DomainKeys and SPF
          - cPanel will generate the entries and update your DNS all at the same time

          Thank you brad!

          I did that already. But still email out of php script are not going out with dkim. (LIke I said in the my OP).

            Write a Reply...