@davidcolombogit opened this Issue on October 28th 2019

Hey,

It seems like either Zend Mail itself or the implementation in Matomo is broken.

The email reports do not work in version "3.11.0" because of the following OpenSSL error error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

Caused in /var/www/html/analytics.example.com/libs/Zend/Mail/Protocol/Smtp.php(206)

sudo ./console core:test-email test<a class='mention' href='https://github.com/example'>@example</a>.com
Output

[Zend_Mail_Protocol_Exception]  
  Unable to connect via TLS

The CA path in php.ini and environment variables are already set and neither Openssl itself or PHPmailer have issues with validating SSL/TLS certificates.

This happened on multiple systems running

  • Ubuntu 16.04.6 LTS

  • Matomo 3.11.0

  • PHP 7.2.24

  • OpenSSL 1.1.1d 10 Sep 2019

All available updates of Ubuntu, Matomo, PHP & OpenSSL are installed.

The only recommendation I saw in the forum was to "just disable certificate verification", but I'm pretty sure there's a better fix for that!

@Findus23 commented on October 28th 2019 Member

The ideal solution one day would be https://github.com/matomo-org/matomo/issues/14841

But until then can you maybe make sure that used root certificate is valid?

But maybe the server is using a "too new" version, so that might also not work.

@davidcolombogit commented on October 28th 2019

The ideal solution one day would be #14841

Oh yep :D That would be the best solution!

But until then can you maybe make sure that used root certificate is valid?

But maybe the server is using a "too new" version, so that might also not work.

Well, I'm not quite sure what Zend Mail is doing, because neither with OpenSSL itself nor with PHPMailer I have this issue.

So in fact OpenSSL & PHPmailer can successfully verify the certificate of the smtp server.

And because Zend Mail is also supposed to use OpenSSL I think it should theoretically work.
But as experienced it does not...

@tsteur commented on October 28th 2019 Member

@davidcolombogit @Findus23 I'll close this issue as we have https://github.com/matomo-org/matomo/issues/14841 and we have it scheduled for Matomo 4 already. Hope that's fine. Feel free to comment otherwise and we can reopen in case there's an easy fix for Zend Mail (PR welcome)

This Issue was closed on October 28th 2019
Powered by GitHub Issue Mirror