Peer Certificate expired !?

I’ve seen this post [1] and tried postman [2] but I get the same error when I send an email with Thunderbird or with Laravel app: SSL certificate has expired

  • SnappyEmail: OK send/ receive (web email)
  • CyPanel LE Certificates: Valid
  • Thunderbird, Laravel: Certificate has expired (28-Apr)
  • Why 4 certificates? No idea. Everything was fine since last week. When I installed CyPanel all emails (SSL) worked fine, and I didn’t change anything on the server.

Do you know how to fix this issue?
Many thanks

  • Ubuntu 22.04
  • CyPanel 2.3 Build 4
  • Thunderbird: 115.10.1 (latest)

[1] Email Issue: Thunderbird - Peer’s Certificate has expired - #7
[2] postmap -F hash:/etc/postfix/vmail_ssl.map | then I restarted postfix


seems your mail domain has mail site SSL but is not mapped please run this command
postmap -F hash:/etc/postfix/vmail_ssl.map

Thanks Shoaib, but this is what I posted [2]
didn’t work anyway, same error.

can you give me this server access or show me if mail domain SSL is working or not?

Hi @shoaibkk , thanks for your help.

I’m still stuck with this issue and I think very soon all my mail-server’s domains will have the same problem. :frowning:
I cannot give you access to the server, but I can share the domain name privately and we can have a TeamViewer session, so you can access the server.

SSL emails are not working for this domain, I shared the error in Thunderbird, and here is the error in Laravel:

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

When I re-issued SSL Mailserver in CyPanel, the following got updated, but still I’ve cert Error (see scr-shot) and emails are not working.

smtpd_tls_cert_file = /etc/pki/dovecot/certs/dovecot.pem
smtpd_tls_key_file = /etc/pki/dovecot/private/dovecot.pem

laravel.log

[2024-05-04 12:03:18] local.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 {"userId":5,"exception":"[object] (Symfony\Component\Mailer\Exception\TransportException(code: 0): 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 at /home/example.com/laravel/vendor/symfony/mailer/Transport/Smtp/Stream/SocketStream.php:171)
[stacktrace]

laravel .env

MAIL_MAILER=smtp
MAIL_HOST=mail.example.com
MAIL_PORT=587
[email protected] 
MAIL_ENCRYPTION=tls 
MAIL_FROM_ADDRESS="[email protected]"

postfix.log

May  5 19:51:09 server1 postfix/anvil[901637]: statistics: max connection rate 1/60s for (smtp:45.88.90.38) at May  5 19:47:48
May  5 19:51:09 server1 postfix/anvil[901637]: statistics: max connection count 1 for (smtp:45.88.90.38) at May  5 19:47:48
May  5 19:51:09 server1 postfix/anvil[901637]: statistics: max cache size 1 at May  5 19:47:48
May  5 19:52:53 server1 postfix/smtpd[901810]: connect from unknown[xxx.118.xxx.118]
May  5 19:52:54 server1 postfix/smtpd[901810]: warning: unknown[xxx.118.xxx.118]: SASL LOGIN authentication failed: Invalid authentication mechanism
May  5 19:52:54 server1 postfix/smtpd[901810]: lost connection after AUTH from unknown[xxx.118.39.xxx]
May  5 19:52:54 server1 postfix/smtpd[901810]: disconnect from unknown[xxx.118.39.xxx] ehlo=1 auth=0/1 commands=1/2 
May  5 20:08:14 server1 postfix/anvil[902275]: statistics: max cache size 1 at May  5 20:04:54
May  5 20:11:02 server1 postfix/qmgr[807922]: 65404107D65: from=<>, size=3105, nrcpt=1 (queue active)
May  5 20:13:14 server1 postfix/smtp[902555]: 65404107D65: host natwest.co.uk[13.107.213.69] refused to talk to me: 421 Downstream server error
May  5 20:15:07 server1 dovecot: imap-login: Disconnected: Connection closed: SSL_accept() failed: error:0A000102:SSL routines::unsupported protocol (no auth attempts in 1 secs): user=<>, rip=xxx.210.31.172, lip=xxx.254.xxx.239, TLS handshaking: SSL_accept() failed: error:0A000102:SSL routines::unsupported protocol, session=<7UTom7oXjMrN0h+s>
May  5 20:15:20 server1 postfix/smtpd[902677]: connect from unknown[xxx.32.xxx.80]
May  5 20:15:20 server1 postfix/smtpd[902677]: warning: unknown[xxx.32.xxx.80]: SASL LOGIN authentication failed: Invalid authentication mechanism
May  5 20:15:21 server1 postfix/smtpd[902677]: lost connection after AUTH from unknown[xxx.32.xxx.80]

Can you please contact me by email and let me know when you’re available?

Many thanks

@shoaibkk It seems a bug in CyPanel is causing this issue.