OpenSSL Error When Configuring SMTP2Go with Blesta on AlmaLinux 9


INTRODUCTION

There seems to be a quirk with AlmaLinux 9 running Symfony.

OpenSSL passes tests reading certificates and connecting, but still errors out.


READ ME FIRST

This article is provided as a courtesy.
Installing, configuring, and troubleshooting third-party applications is outside the scope of basic support provided by Starburst Services.

We are not liable for any damages and/or data loss.


REQUIRMENTS

  • SSH credentials or File Manager access Logged In as Root

If you receive one of the following errors in Blesta when trying to configure and SMTP2Go
(Settings -> Company -> Emails -> Mail Settings)

Blesta Mail Settings

After you click on “Test These Settings”:

Unable to connect with STARTTLS: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

Unable to connect with STARTTLS: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

or

Connection cound not be established with host "ssl://mail.smtp2go.com:465': stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

Connection cound not be established with host "ssl://mail.smtp2go.com:465': stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed

PROCEDURE

STEP 1

Login to your server with your SSH credentials.

Using curl, enter the following command:

curl --insecure https://curl.se/ca/cacert.pem -o /etc/ssl/certs/ca-certificates.crt

STEP 2

Set the file permissions:

chmod 444 /etc/ssl/certs/ca-certificates.crt

STEP 3

Edit your php.ini file and add the below content at the end:

[curl]
curl.cainfo = /etc/ssl/certs/ca-certificates.crt

[openssl]
openssl.cafile = /etc/ssl/certs/ca-certificates.crt

STEP 4

Restart your webserver (in this example we use Apache):

systemctl restart httpd

STEP 5

Click on “Test These Settings” again, and now you should see:

SMTP connection was successful!

SMTP2Go Successful Test

Thanks for learning with Starburst Services.

Learn more about our services


KB Article Created: 2024-07-06
KB Article Updated: 2024-07-10

Based on post from forum user WHMCSModuleNetworks at:
https://www.blesta.com/forums/index.php?/topic/24414-how-to-set-up-smtp/

people found this article helpful. What about you?