Symptoms
-
When connecting to a mailbox
[email protected]
using a mail client the following warning is shown:The certificate for this server is invalid
certificate belongs to a different site, which could mean that someone is trying to impersonate this site
The target principal name is incorrect
Mail can't verify the identity of the server "mail.example.com".
stream_socket_client(): Peer cartificate CN='example.com' did not match expected CN='example.org'
Certificate subject and hostname mismatch
-
The error shows that the certificate from the error belongs to
serverhostname.com
. -
Certificate in Tools & Settings > SSL/TLS Certificates > Certificate for securing mail is set to
serverhostname.com
.
Cause
Incorrect configuration of the mail client - mail server hostname does not match the one secured with a certificate.
Resolution
For Plesk Onyx:
Configure a mail client following the article.
For Plesk Obsidian:
Secure the mail server for domain according to the instructions from the article.