Hi, I am using aaPanel, Mailserver (same vps), php8.1, and a joomla website.
Ive added SSL to Mailserver domain, aaPanel subdomain and Main website domain.
I havent added anything else. Those 3 ssl certificates are the same. The mail Server and aaPannel access were the same to enable https access to the panel which is working fine. The Main frontend website is also working fine in https mode.
However, in Joomla (the main website), when I setup SMTP in Global Config > Server, settings,
SMTP
User: admin@maildomain.com
Host: mail.maildomain.com
Port; 587
SMTP Security: STARTTLS
SMTP Authentication: Yes.
I get the following error: I have tried everything I can within my limits of understanding (which is very little - Im a newby), but cant solve the problem.
SMTP Error: Could not connect to SMTP host. Connection failed. stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
I also get the following error:
Verify return code: 21 (unable to verify the first certificate)
Extended master secret: yes
When I use: openssl s_client -connect mail.maildomain.com:587 -starttls smtp
I really dont understand what to do to fix this, being a novice.
So any assistance and basic instruction to solve this is very much appreciated.
Thanks.