I have a domain.com virtual server in virtualmin. For using IMAP in secure mode, I need a SSL certificate.
Since MX DNS register needs to be a subdomain, I created mx.domain.com
Now I'd need to add mx.domain.com to the SSL, so I tried to create a sub-virtual server (I also tried with an alias virtual server), with "mx.domain.com"
Now I go to the Manage SSL Certificates > Letsencrypt and I see both to request (domain.com and mx.domain.com)
But when I request it I see:
ssl.CertificateError: hostname 'mx.domain.com' doesn't match either of 'domain.com', 'www.domain.com' DNS-based validation failed : Failed to request certificate : mx.domain.com challenge did not pass: DNS problem: NXDOMAIN looking up TXT for _acme-challenge.mx.domain.com
Why is that ?
Web "mx.domain.com" is working and pointing to the domain.com site (so the sub-virtual server is correctly created) And mx.domain.com points to the same IP of domain.com