Hello everyone,

I’m currently facing an issue with sending emails from my Laravel sites (running on PHP 8.1) via SMTP to Mailcow. The error I’m receiving is:

Connection could not be established with host “ssl://mail.domain.com:465”: stream_socket_client(): SSL: Handshake timed out

Here are some details about my setup:

Mailcow: Up-to-date version (07/11/2024)
Network: Both the Laravel sites and Mailcow are on the same network, but Mailcow is hosted on a separate dedicated server.

I’ve confirmed that Mailcow is properly configured and works well with other services, but this error persists with Laravel.

Does anyone have any suggestions on how to troubleshoot or resolve this issue? Any help would be greatly appreciated.

Thank you in advance for your support!

And what is in postfix logs on mailcow?
How did you configure Laravel? TLS, STARTTLS or unencryted/plain?

    Have something to say?

    Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

    esackbauer

    Thank you for getting back to me!

    I’ve checked the Postfix logs, and here are some details:

      10/11/2024 14:46:57 info initializing the server-side TLS engine
      10/11/2024 14:47:05 info connect from unknown[2a10:****:****::a]
      10/11/2024 14:47:05 info setting up TLS connection from unknown[2a10:****:****::a]
      10/11/2024 14:47:05 info unknown[2a10:****:****::a]: TLS cipher list "aNULL:-aNULL:HIGH:@STRENGTH:!ECDHE-RSA-RC4-SHA:!RC4:!aNULL:!DES-CBC3-SHA:!ECDHE-RSA-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA"
      10/11/2024 14:47:05 info SSL_accept:before SSL initialization
      10/11/2024 14:47:05 info SSL_accept:before SSL initialization
      10/11/2024 14:47:05 info SSL_accept:SSLv3/TLS read client hello
      10/11/2024 14:47:05 info SSL_accept:SSLv3/TLS write server hello
      10/11/2024 14:47:05 info SSL_accept:SSLv3/TLS write change cipher spec
      10/11/2024 14:47:05 info SSL_accept:TLSv1.3 write encrypted extensions
      10/11/2024 14:47:05 info SSL_accept:SSLv3/TLS write certificate
      10/11/2024 14:47:05 info SSL_accept:TLSv1.3 write server certificate verify
      10/11/2024 14:47:05 info SSL_accept:SSLv3/TLS write finished
      10/11/2024 14:47:05 info SSL_accept:TLSv1.3 early data
      10/11/2024 14:47:05 info SSL_accept:error in TLSv1.3 early data
      10/11/2024 14:47:05 info SSL_accept error from unknown[2a10:****:****::a]: lost connection
      10/11/2024 14:47:05 info lost connection after CONNECT from unknown[2a10:****:****::a]
      10/11/2024 14:47:05 info disconnect from unknown[2a10:****:****::a] commands=0/0

    I am using SSL with port 465 for sending emails.
    In my Laravel configuration, I’ve included the following SSL options:

    'ssl' => [
    'allow_self_signed' => true,
    'verify_peer' => false,
    'verify_peer_name' => false,
    ],

    Thank you for your time and assistance.

      cicou02 10/11/2024 14:47:05 info SSL_accept:error in TLSv1.3 early data

      I guess you need to try TLS 1.2 with laravel.

      No one is typing