The problem isn't the server hostname certificate.
Client was able to connect using SSL to his domain name. e.g. mail.domain.com, not the server name.
Now it;s asking for the server name for IMAP access, but is OK for SMTP.
Which is weird, and seems backwards.