Closed starsoccer closed 5 months ago
It looks like you have your caddy file misconfigured. From this log, I can see that caddy is trying to get a wildcard cert for the domain some.domain
from your box dns server at https://xxx.xxx.xxxxxxx
. Since some.domain
isn't a real TLD, I'm guessing this is a mistake. The wildcard part of the config should say *.xxx.xxxxxxx
instead of *.some.domain
If you don't see the mistake, post your caddy file here with the sensitive stuff masked (passwords, email address, maybe ip addresses,) and I'll see if I can help.
@luv2code Thanks for reply. Would you mind removing the domain from your reply. I meant to edit it out to all XXXXX. Ive updated my original post to do that.
As for the domain, I was using some.domain
as a place holder for my actual domain. It was indeed the correct domain. Caddy file below.
http://some domain:some port{
reverse_proxy some ip:some port
}
*.some.domain:some port{
reverse_proxy localip:port
tls {
dns mailinabox {
api_url https://domain here/admin/dns/custom
email_address email here
password password here
}
}
}
Would you mind removing the domain from your reply.
done.
so you figured it out?
Would you mind removing the domain from your reply.
done.
so you figured it out?
Thank you. Would you mind also deleting the edit revision history. If you click the little edited arrow and then click the old one and then click delete revision.
No I never got it working. It just continued to get the below error:
This DNS provider (https://XXXXXX/admin/dns/custom) does not control the specified zone
I am not really sure how to debug further as I am 100% sure it does control the domain. I am using acme.sh and the cerbot dns-multi now with mailinabox and it works fine
Would you mind also deleting the edit revision history.
done.
If your box address is https://box.business.com
, the log message says:
This DNS provider (https://box.business.com/admin/dns/custom) does not control the specified zone (business.com)
If your box is at box.business.com
, and you're trying to get a wildcard for *.shop.com
, it won't work because multi-zone mail-in-a-box dns isn't supported by this plugin yet.
the code that is throws this error is here: https://github.com/libdns/mailinabox/blob/e163e289a4429e66fd270f32bef22450539cbe1d/provider.go#L40
It checks that the zone, "business.com", is contained withing the API string, "https://box.business.com/admin/dns/custom". If it isn't, this error is logged and it doesn't work.
Ah okay well that would explain the issue I am having then. I assumed as long as my mail in the box(MIAB) had the domain it would work. I didnt think there was any difference really. Just to make sure I am understanding correctly though I am going to give an example of what I ideally want and just confirm its not supported.
So, I have the domain lets call it miab.com
, and my mail in a box server(MIAB) is configured on this domain such that the admin interface is at box.miab.com
. This same MIAB server also hosts another domain, lets call it caddy.com
. Now I want to use this addon to get a certificate for proxy.caddy.com
. Even though caddy.com
is hosted on a MIAB server, because the admin domain does not match the domain of the certificate it will not work.
You got it right.
It only doesn't work because I don't have the inclination to make it work. My box only hosts a single domain. To make it work with multiple, I'd want to set my own box up to with multiple zones to test. I just don't need or want to do that.
I did add a note to the readme so maybe others can avoid this confusion.
Okay cool noted. Shall I close this issue for the time being then noted its not supported?
Logs below