I have set up an acme-dns server on my own server and am testing the acme-dns-client to use DNS-01 validation. After setting up the _acme-challenge CNAME record in the DNS settings
Registered acme-dns account found!
CNAME record found and set up correctly!
So to test the DNS-01 validation I tried
certbot certonly --dry-run --manual --preferred-challenges dns --manual-auth-hook 'acme-dns-client' -d uniofilm.com
but this produces an error
Incorrect TXT record "v=spf1 a mx ip4:104.238.172.100 ip4:209.250.229.146 ip6:2001:19f0:7402:150:5400:ff:fe70:fb3b a:vezer..." found at _acme-challenge.uniofilm.com
This TXT record was set up for email purposes.
I am no expert on DNS records. Any help on how to sort this would be much appreciated.
When requesting the TXT RR for _acme-challenge.uniofilm.com, your DNS server responds with TWOTHREE (ignoring the NS RRs) results:
_acme-challenge.uniofilm.com. 86400 IN CNAME cd22553e-58fc-4cd8-84aa-d955e97b9f81.auth.vezer.uk.
cd22553e-58fc-4cd8-84aa-d955e97b9f81.auth.vezer.uk. 86400 IN CNAME vezer.uk.
vezer.uk. 86400 IN TXT "v=spf1 a mx ip4:104.238.172.100 ip4:209.250.229.146 ip6:2001:19f0:7402:150:5400:ff:fe70:fb3b a:vezer.uk include:_spf.google.com ~all"
That latter TXT RR shouldn't be there I'm guessing. It should only reply with the CNAME.
Waaait a minute, I missed the middle line. For some reason your first CNAME destination responds with a CNAME of its own, instead of the TXT RR. Weird? Does your DNS zone have catch alls?
I've had a chance to work out what is going on here with this middle line. There is a kind of catch-all in that the TXT RR is being served to any other CNAMEs defined in the DNS zone, but not to any random sub domains. For example:
Sorted several problems now. I did have a catch-all at the domain hosting the acme-dns server, but now this is fixed.
I've checked that the DNS is reachable for auth.vezer.uk, which it is.
I now have a new problem. When running:
certbot certonly --dry-run --manual --preferred-challenges dns --manual-auth-hook 'acme-dns-client' -d uniofilm.com
I get the authorisation failure:
DNS problem: NXDOMAIN looking up TXT for _acme-challenge.uniofilm.com - check that a DNS record exists for this domain
But I thought that only a CNAME RR was needed. I'm confused by this error. Remember reading somewhere that acme-dns-client takes care of converting look-up from TXT to CNAME, but I may be mistaken.
Remember when setting up acme-dns as a delegated name server for a zone (auth) you need to tell DNS to look to that as a nameserver, otherwise it will use your main zone nameservers. So you need an NS record for auth.vezer.uk pointing to the IP of your acme-dns server, if you don't have that already.