Email Postfix certificate error match

Hi,

Can someone please explain to me how should I configure mail / domain to match let’s encrypt mail certificate?

On domain configuration I have:
MX record mail.domain.com
A record *.domain.com to IP

Virtualmin hosts does have alias with mail.domain.com and lets’s encrypt certificate for this alias.

Now when try to configure external email client like Thunderbird it discovers mail.domain.com and ports but certificate matches completely different domain on my server? How to match certificates for each domain?

on Postfix:
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

What to check?

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.5
Virtualmin version 7.2-1

Anyone? Please help

you need to add domain certificate to postfix.
Webmin → Servers → Postfix → Certificate Mapping.

add a map (eg. hash:/etc/postfix/sni_map) and then add records for each domain…
name as mail.domain, which maps to your certificate+key files path.
you can find examples online, maybe in this forum too.

Thanks, just checked and ssl certificates are matched for the domains where error appears.

I have a clue I had imported virtualhost with same name:
domainame.eu
domainame.host.com
which caused first one to create directory domainameeu and rearnage all configs. When configuring email account it ponts to domainame.host.com for some reason. Probably not all configs where ammended. Also can’t copy SSL certificate to deovecot within: domainame.eu

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.