Author Topic: Mail sent with PHP mail not signed  (Read 9336 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Mail sent with PHP mail not signed
« on: August 28, 2019, 10:39:30 AM »
Hello,

I have this issue with every email sent through PHP mail function (like contact forms), the DKIM signature is missing.

I have the last versioni of CWPpro, how can I solve?

Thank you

Re: Mail sent with PHP mail not signed
« Reply #1 on: August 28, 2019, 11:21:33 AM »
I mentioned the lack of DKIM for hostname, some time ago and was ignored.
Good luck with getting a solution.

Offline
*****
Re: Mail sent with PHP mail not signed
« Reply #2 on: August 28, 2019, 03:18:38 PM »
Guys,

DKIM signatures are only added when you use SMTP AUTH. The mail() function of php doesn't require authentication (user/pass) to send messages.

Instead, it is best to use a php framework to send via SMTP AUTH as phpMailer:
https://github.com/PHPMailer/PHPMailer

;)

Offline
*
Re: Mail sent with PHP mail not signed
« Reply #3 on: August 29, 2019, 09:42:23 AM »
Thanks ejsolutions,

I managed to solve, actually the configuration was already correct, I just needed to restart the OpenDKIM service.

In my /etc/postfix/main.cf I added these lines:

smtpd_milters = inet:127.0.0.1:8891
non_smtpd_milters = inet:127.0.0.1:8891
milter_default_action = accept
milter_protocol = 2

@AlnorkA

I said mail() function, but I actually use Wordpress for my websites and I think it already uses PHPMailer for sending email, anyway I don't use SMTP authentication but still it works and emails are signed correctly, so it IS possible.
« Last Edit: August 29, 2019, 10:02:06 AM by NychosX »