SSL constant failure emails for one domain

jigster

Verified User
Joined
Jul 23, 2021
Messages
128
I have a few domains using external nameservers who's DNS resolves to my server for just mail. and webmail. hostnames. All other records (www etc) point elsewhere. This works correctly with the new acme ssl system: the hostnames not resolving to my server fail the ssl http check, and a cert is issued for just mail. and webmail. All good.

Except for one domain, which is constantly sending failure notifications. This domain is set up exactly the same as the others, with mail. and webmail. pointing to my server, and all other records pointing elsewhere. But for this domain, it is constantly trying to provision a cert for ftp., even though this does NOT point to my server. The only difference I can see with this domain is that there is actually no DNS record set up at all for 'ftp' (whereas the other domains have it set up but pointing elsewhere).

If I remove ftp from the DirectAdmin setting letsencrypt_list, everything works correctly for this domain, but I can't do this because that setting is global and i need it in there for other domains.

Why would the automatic certificate provisioning keep trying for a hostname that doesn't even have a DNS record set up? How can I fix this? Thanks for any advice!
 
letsencrypt_list is only the global candidate list; it does not prove every name has an explicit DNS record. I would first query from the DA host, including IPv6 and wildcard DNS:
dig +short ftp.example.tld A
dig +short ftp.example.tld AAAA
dig +short random-test.example.tld A
dig +short random-test.example.tld AAAA
A wildcard A/AAAA record (or stale resolver cache) can make ftp appear resolvable even when there is no explicit ftp record.
On DA 1.710+ also check Account Manager -> SSL/TLS Certificates -> Provisioning history. Open the failed job and confirm the exact SAN list and validation error. That page was added specifically for automatic ACME attempts: DirectAdmin 1.710 changelog.
If ftp is queued while the authoritative result is genuinely NXDOMAIN for both A and AAAA, this looks like a selector bug in the new automatic certificate flow, not something you should solve by removing ftp globally. I would report it with the DA version and provisioning-history details.
 
One thing worth checking that's easy to miss: since the domain's DNS is hosted externally, DirectAdmin's own local zone for that domain may still exist on the server, and it probably still has the default ftp record pointing at the server's IP.

If the server resolves through its own named (e.g. 127.0.0.1 in /etc/resolv.conf), the pre-check can see ftp.domain.tld as resolving to the server even though the public DNS has no such record, so it keeps queuing ftp and then the HTTP challenge fails from Let's Encrypt's side.

You can compare the two views quickly:

dig +short ftp.example.tld A @127.0.0.1
dig +short ftp.example.tld A @<one of the external nameservers>

If the local one returns your IP and the external one returns nothing, removing (or correcting) the ftp record in DA's DNS management for that domain should stop the retries without touching the global letsencrypt_list. That would also explain why the other domains behave: their ftp records exist externally and point elsewhere, so the check fails consistently and ftp gets dropped.

If the local zone is clean, then the wildcard/AAAA check youstable mentioned is the next thing I'd look at.
 
Even AI says: 🙏

Log into DirectAdmin as the user and go to Account Manager -> SSL Certificates.
  1. Select Get automatic certificate from ACME provider / LetsEncrypt.
  2. Under Let's Encrypt Certificate Entries, uncheck the hostname(s) you want to skip.
  3. Click Save and DirectAdmin uses only your checked list for all future automatic renewals.

    So that part is taken care of I guess. Now It happens that, when creation of a certificate does not succeed, domain.san_config does not get updated and you are left hanging in no man's land. Edit /usr/local/directadmin/data/users/username/domains/domain.san_config and remove hostnames you do not serve.
 
Multixnotes’ local-zone theory is the first thing I’d verify, and the fix should target the source rather than san_config. If the domain is externally hosted, check whether DirectAdmin still has DNS management enabled for it; a local zone can keep a default ftp record and make the pre-check see the server’s address. Compare the hostname’s answer from the server’s resolver with the authoritative nameservers. If only the local resolver returns an address, disable local DNS for that domain or remove the zone, then flush the resolver cache and retry. Editing san_config may be overwritten by the next automatic run.
 
Thanks for the replies. The domain was set up on the local nameserver, although 127.0.0.1 is not used in /etc/resolv.conf. I had already tried deleting the relevant records from the local DNS and the cert was still failing on ftp.domain.com even though I had removed that and any wildcard DNS from the local nameservers! Maybe I didn't wait long enough. I resolved it for now by editing /usr/local/directadmin/data/users/username/domains/domain.com.conf + setting acme_skip_dns_names=ftp.domain.com.
 
But for this domain, it is constantly trying to provision a cert for ftp., even though this does NOT point to my server.

I had exactly the same issue with one of my domains. Directadmin tried to add a ftp. domain into a cert. Even though the ftp. prefix is not used on that server and none of domains use it, it does not exist on DNS. All dns zones are managed locally. After several reloads of the ACME page directadmin offered a wildcard certificate and I issued it.

Another server and the same issue, DirectAdmin does not offer a wildcard certificate, but insist on a regular certificate with a fixed list of SANs. I completed several reloads of the ACME page and a wild card was found offered.

I don't know the core reasons, but I faced it several times already.
 
Back
Top