Email Postfix certificate error match


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
A record * to IP

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

Now when try to configure external email client like Thunderbird it discovers 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?

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:
which caused first one to create directory domainameeu and rearnage all configs. When configuring email account it ponts to for some reason. Probably not all configs where ammended. Also can’t copy SSL certificate to deovecot within:

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