I just started using acme.sh after having used "certbot --manual --preferred-challenges dns certonly" for many years. Most of my domains are with cloudns, but two are proxied/cached and managed by cloudflare. The two domains with cloudflare have webservers and email servers associated with the domain, while the other 10+ domains with cloudns only have postfix servers associated with them.
The problem I'm having is that a mail server may be responsible for receiving mail for one of the domains from cloudns as well as one of the domains managed by cloudflare. It used to be that I could manually add the _acme-challenge TXT record to the corresponding DNS provider and certbot would just query the TXT record and receive the response. Now I'm not so sure that is happening.
Using acme.sh with "--dns dns_cloudns" succeeds in producing a working certificate for the domains managed by cloudns, and using "--dns dns_cf" succeeds in producing a working certificate for the domains managed by cloudflare, but combining the two --dns options apparently causes it to go through the process of updating the cloudflare certificate, but ultimately it fails.
Just to be clear, I'm successfully using the cloudflare and cloudns APIs separately, so I don't think it's an authentication issue.
What could I possibly be doing wrong? There doesn't seem to be any single error message that I can point to to help troubleshoot this. Is this the expected behavior? acme.sh appears to produce a series of timeouts:
[Tue Sep 6 04:35:37 PM EDT 2022] d='www.dom1.org'
[Tue Sep 6 04:35:37 PM EDT 2022] txtdomain='_acme-challenge.www.dom1.org'
[Tue Sep 6 04:35:37 PM EDT 2022] aliasDomain='_acme-challenge.www.dom1.org'
[Tue Sep 6 04:35:37 PM EDT 2022] txt='hanFYdBvtIzJ1N2bp77PGswQGTylKsxU2PBZVY1IZmk'
[Tue Sep 6 04:35:37 PM EDT 2022] d_api='/etc/letsencrypt/acme.sh-master/dnsapi/dns_cloudns.sh'
[Tue Sep 6 04:35:37 PM EDT 2022] Checking www.dom1.org for _acme-challenge.www.dom1.org
[Tue Sep 6 04:35:37 PM EDT 2022] Already success, continue next one.
[Tue Sep 6 04:35:37 PM EDT 2022] d='www.dom2.org'
[Tue Sep 6 04:35:37 PM EDT 2022] txtdomain='_acme-challenge.www.dom2.org'
[Tue Sep 6 04:35:37 PM EDT 2022] aliasDomain='_acme-challenge.www.dom2.org'
[Tue Sep 6 04:35:37 PM EDT 2022] txt='PhN_Zflss56jiJmcRHep27I8YEZh8sN4V_Ghf_SM1yo'
[Tue Sep 6 04:35:37 PM EDT 2022] d_api='/etc/letsencrypt/acme.sh-master/dnsapi/dns_cloudns.sh'
[Tue Sep 6 04:35:37 PM EDT 2022] Checking www.dom2.org for _acme-challenge.www.dom2.org
[Tue Sep 6 04:35:37 PM EDT 2022] Already success, continue next one.
[Tue Sep 6 04:35:37 PM EDT 2022] Let's wait 10 seconds and check again.
[Tue Sep 6 04:35:48 PM EDT 2022] Timed out waiting for DNS.
[Tue Sep 6 04:35:48 PM EDT 2022] check dns error.
[Tue Sep 6 04:35:48 PM EDT 2022] _on_issue_err
[Tue Sep 6 04:35:48 PM EDT 2022] Please check log file for more details: /home/alex/.acme.sh/acme.sh.log
It looks like it doesn't have the intelligence to know which DNS provider to add the TXT record? Here's an example of acme.sh adding a TXT record for cloudns when it should have added it to cloudflare:
Tue Sep 6 05:04:16 PM EDT 2022] Adding txt value: klzv72XYWH0GoGHqpAONnFPnWfUvtk6-oCO1f5O80rc for domain: _acme-challenge.portal.dom3.com
[Tue Sep 6 05:04:16 PM EDT 2022] Using cloudns
[Tue Sep 6 05:04:18 PM EDT 2022] Adding the TXT record for _acme-challenge.portal.dom3.com
[Tue Sep 6 05:04:18 PM EDT 2022] Added.
[Tue Sep 6 05:04:18 PM EDT 2022] The txt record is added: Success.
It later then proceeds to remove the record, apparently after a timeout or inability to resolve the record.
Ideas greatly appreciated