• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Sending mail by code (roundcube & website) won't work anymore

MatthieuBL

New Pleskian
Since yestarday, it seems that sending email with localhost:25 is no longer possible.
I tried to configure an account with Thunderbird and it's working but both the Magento website and the Plesk Roundcube are "blocked".

I follow both of those kb/support :

But still got the SMTP Error (-1): Connection to server failed
relevant lines in /var/log/maillog and /var/log/plesk-roundcube/errors and
Code:
echo | openssl s_client -connect example.com:465 -servername example.com 2>/dev/null | grep 'Verify return code'
still return
Code:
Verify return code: 10 (certificate has expired)

Seems that even if everything seems got fine with the letsencrypt ssl generation process, it did not fix anything.
I tried restarting postfix service but that does not do the trick...

What can i do next as having a Magento instance who does not send invoices is quite problematic.
Thank you in advance for any help provided !
 
"certificate expired": Have you checked in all detail which domain is used to submit mail and how submission is done? Could it be thinkable that Magento has SMTP login data in its configuration? "localhost" cannot possibly have a valid certificate unless that is self-signed (and then it is not fully qualified either). So maybe that existing self-signed server-certificate expired? Or the cert on the mail domain used to send mails expired.
 
Thank you for your reply !
As a complete inexperimented newbie that i am, that's the first thing that i have tried (renewing the webdomain hosting certificate).
And when you check the domain with a tool like Qualys SSL Labs everything seems working.
Seems legit as the website is in https and a bad certificate would have done worst problems i guess.
As far as i am aware, nothing as changed in the Magento configuration and i think it use no smtp sending but the php mail function (probably enhanced with phpmailer or a zend equivalent).

But that doesn't explain the roundcube bug, even if the url is Roundcube Webmail :: Welcome to Roundcube Webmail it seems to use a localhost certificate ?
In roundcube, showing mailbox works but as soon as i try to send one i got this lines in /var/log/plesk-roundcube/errors
Code:
[15-Jun-2023 11:30:12 UTC] PHP Warning:  stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in /usr/share/psa-roundcube/vendor/pear/net_socket/Net/Socket.php on line 159
[15-Jun-2023 11:30:12 UTC] PHP Warning:  stream_socket_client(): Failed to enable crypto in /usr/share/psa-roundcube/vendor/pear/net_socket/Net/Socket.php on line 159
[15-Jun-2023 11:30:12 UTC] PHP Warning:  stream_socket_client(): unable to connect to ssl://localhost:465 (Unknown error) in /usr/share/psa-roundcube/vendor/pear/net_socket/Net/Socket.php on line 159
[15-Jun-2023 11:30:12 UTC] ERROR: stream_socket_client(): unable to connect to ssl://localhost:465 (Unknown error) (0)
[15-Jun-2023 11:30:12 UTC] ERROR: Failed to connect socket: stream_socket_client(): unable to connect to ssl://localhost:465 (Unknown error) ()
[15-Jun-2023 11:30:12 +0000]: <s0gutbjj> SMTP Error: Connection failed: Failed to connect socket: stream_socket_client(): unable to connect to ssl://localhost:465 (Unknown error) in /usr/share/psa-roundcube/program/lib/Roundcube/rcube.php on line 1667 (POST /roundcube/?_task=mail&_unlock=loading1686828611258&_lang=fr_FR&_framed=1&_action=send)

Maybe it's two different bug (not sure anyone has used the roundcube before, it may be have never worked) and just a coincidence.

I will continue searching for a Magento workaround but hope to have some more advices for the server configuration...
 
Back
Top