The server's certificate cannot be checked
What it means when Mail says a mail server's certificate is self-signed or made for another name, how to trust it by its fingerprint, how to stop trusting it, and the better fix on the hosting side.
Mail connects to your mail server over an encrypted connection and first checks who is at the other end: the server shows a certificate, and the certificate must be issued by a known certificate authority (Let's Encrypt, Sectigo …) for the very name you typed — mail.example.com, example.com. Then nobody in between can pretend to be your server and read your password.
Some hosting companies give their mail servers a certificate that does not pass this check:
- it is self-signed — the server made it itself, nobody vouches for it;
- it is made for another name — usually the hosting server's own name, such as
s2544.hostname.net, not your domain; - it has expired.
Then the mailbox form shows, under the server's field, for example: IMAP: Its certificate is made for s2544.hostname.net, not for example.com. The certificate is self-signed… — and a yellow card The server's certificate under it.
Typing another name for the same server (mail., imap., the domain itself) or its IP address does not help: it is the same server and it shows the same certificate. An IP address is not in the certificate either.
Trust the certificate
- Open Mail → the gear → Mailboxes, add the mailbox (or open it and press Change), type the address and the password, press Save.
- Under Mail server settings the yellow card shows the certificate: whose name it is made for, who issued it, its dates and its SHA-256 fingerprint.
- If you can, compare the fingerprint with the one your hosting panel shows for the mail server (or ask the hosting company). It must be the same, letter for letter.
- Press Trust this certificate and connect. Mail saves the form again with this certificate trusted.
- The incoming (IMAP) and the outgoing (SMTP) servers often have different certificates — then the card comes a second time for the outgoing server; trust it the same way.
From then on the server's field shows Trusted certificate AB:12:CD… and the short lines of the servers a yellow shield.
What it protects: Mail connects to that server only while it shows exactly this certificate. If someone put another server in between, or the server's certificate changed, the connection is refused and the form says The server now shows another certificate than the one you trusted. — check the new one before you trust it.
Stop trusting
Open the mailbox, under Mail server settings press Stop trusting beside the trusted certificate, and Save. Changing the server's name, port or encryption forgets its trusted certificate too.
The better fix: a real certificate for the mail server
If the hosting is yours (FASTPANEL, cPanel, Plesk …), give the mail server a free Let's Encrypt certificate and nothing has to be trusted by hand:
- FASTPANEL: open Mail, the domain's settings (the gear), and choose its SSL certificate — the site's Let's Encrypt certificate for
example.comis enough. Then type the domain itself as both servers in Mail:example.com, 993 SSL/TLS incoming, 465 SSL/TLS outgoing. Nothing namedmail.is needed — the mail server shows the certificate of the name it is asked for. - cPanel: AutoSSL gives
mail.example.coma certificate by itself — typemail.example.com. - Elsewhere: give the mail server a certificate for the name you type in Mail.
When it does not work
- No card, only "Cannot reach the mail server" — the server does not answer on that port: check the name and the port.
- After trusting, "The mail server refused the login or password" — the certificate is fine now; the login or the password is wrong.
- The mailbox stopped syncing after months — the hosting renewed its certificate. Open the mailbox, press Save, look at the new certificate and trust it.
See also: Adding a mailbox, Mail providers, Troubleshooting.