This error usually occurs when a mail client is using using a secure connection to the mail server under a custom hostname.
For example, this could occur where you have imap.yourdomain.com pointing to imap.stackmail.com. This allows you to make a secure IMAP connection, but the SSL certificate installed on our mail servers uses the ‘*.stackmail.com’ hostname – and not ‘yourdomain.com’.
It’s nothing to worry about, the certificate for ‘*.stackmail.com’ is expected so you can trust the certificate with the knowledge that the connection will remain encrypted. Once the ceritifcate is trusted you should not receive any further warnings, unless the certificate changes.