I have come across a curious problem, I have built a new Debian 9 server and am currently in the process of migrating everyone over from an older Debian 8 server.
Now the issue I seem to be having is that if i create a new virtual host I get all the correct domains associated with the domain
domain.com www.domain.com mail.domain.com autoconfig.domain.com autodiscover.domain.com
Which is great because I end up with an SSL certificate that covers all the important names, dovecot works well, as well as Usermin and webmin.
What I have noticed however is that the virtual hosts I migrate over have some of their FQDN missing.
for example I have one that has just has
and thats where it ends, and another that has
domain.com www.domain.com autoconfig.domain.com autodiscover.domain.com
as you can see its missing mail.domain.com , this I thought wasn't a big deal I'll just add it below in the box titled "Domain Names Listed here" so I did just that but, Let's Encrypt does not like that and I receive the following error
Validating configuration for domain.com ..
.. no problems found
Requesting a certificate for domain.com, mail.domain.com, www.domain.com, autoconfig.domian.com, autodiscover.domain.com from Let's Encrypt .. .. request failed : Web-based validation failed : Failed to request certificate :
mail.domain.com challenge did not pass: Invalid response from
http://mail.domain.com/.well-known/acme-challenge/nYNGihbLT0R1J4dQ8PuhvDZgyLrqT0u0FQI4PfdGuoM [xxx.xxx.xxx.xxx]: "<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p"
DNS-based validation failed : Failed to request certificate :
Gave up waiting for validation
Though when I go and check the DNS records mail.domain.com is there and I can connect to it on the server, any idea on what is wrong and where I can fix it?
Is there a config file or a text file that the SSL module gets the FQDN from that it offers to Let's Encrypt?