9.1 Mail issue.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kevin de Bie
    Junior Member
    • Sep 2023
    • 2

    #1

    9.1 Mail issue.

    Since updating 9.1 outbound mail functionality broke for me.
    Found in a another topic mail component was changed to symfony.

    Had a bit of a time getting that to work with my (local) SMTP gateway so figured I'd supply some freedback.

    First, the option of turning off encryption does not seem to work, even with it set to the empty (none) value I can see in the logs it keeps trying STARTTLS.

    Ignoring that, it trips over the the fact the server has a self signed certificate:
    Code:
    [2025-05-12 10:15:39] ERROR: (0) Email sending error: Unable to connect with STARTTLS: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:0A000086:SSL routines::certificate verify failed :: /var/www/vhosts/[...]/[...]/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php(171)
    [2025-05-12 10:15:39] WARNING: Email sending:unknownError; 0
    And after I fed my mail gateway a trusted certificate it took issue with using an IP instead of a hostname.
    Code:
    [2025-05-12 10:52:26] ERROR: (0) Email sending error: Unable to connect with STARTTLS: stream_socket_enable_crypto(): Peer certificate CN=`[...]' did not match expected CN=`192.168.xxx.xxx' :: /var/www/vhosts/[...]/[...]/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php(171)
    [2025-05-12 10:52:26] WARNING: Email sending:unknownError; 0
    Which I could also address with an internal resolve to the the same ip using the name in the cert and changing this in Espo.

    This new situation seems very geared toward using some kind of external service?

    I think turning off encryption should work, and I feel there needs to be an option to disable verifying the certificate.
    AFAIK self signed certs on SMTP servers are still fairly common as mailservers don't really validate certificates.
    Last edited by Kevin de Bie; Today, 11:51 AM. Reason: smtp selfhosted certificate
  • yuri
    Member
    • Mar 2014
    • 8929

    #2
    I think this comment concerns to your case https://github.com/espocrm/espocrm/b...arator.php#L62

    We use Symfony v6 as we have another dependent library which is still tied to v6. v6 has auto TLS enforced IIRC.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    Working...