Open caspermeijn opened 7 years ago
Agreed - we need better validation of custom DNS records before they get saved. We validate for A records that valid IP addresses are given, for instance, but we don't have validation for all record types. And we don't check that nsd
accepts the records without dying.
I also have this issue, How do I fix?
After removing all custom DNS entries the same dig command returned addresses as expected
@scottnzuk For me the problem was a SSHFP record which was incorrectly formatted. So you need to find the custom DNS entry in your config that is malformed and remove that entry. I believe that it will self-recover after the incorrect record has been removed.
I have this issue and I cannot locate the incorrect record. I am hosting too many domains to spot it manually.
So how can I tell the loop in /root/mailinabox/management/daemon.py
on line 317 to spit out which domain it's failing on?
As in log it to syslog?
@JoshData app.logger didn't fly
@JoshData This problem comes from having lost users. There custom DNS entrires lost the "zone" key since there's no zone they belong to anymore.
So to fix this, I have to add the missing domain (add a user at that domain), delete the custom dns, then remove the user again.
It appear that an invalid custom DNS entry can cause the DNS server to provide empty responses, which leads to unresolvable domains.
This issue came to my attention because I recieved the following status change:
I first blamed by DNS provider for incorrect glue records, but in hindsight these were correct. I found that the DNS server didn't respond. Running from my mail-in-a-box server:
When I ran
sudo mailinabox
it showed the following error message:Which made me think that an DNS entry must be invalid.
After removing all custom DNS entries the same dig command returned addresses as expected.
Reproducing the problem
To reproduce the problem you need to an invalid custom domain and wait for a while. The DNS server problem only appeared after a week for me.
I added a custom domain entry with type SSHFP and value
SSHFP 1 1 e731638dfdbd6a50755e6390fffd7883f892d313
This causes an error message to appear, but the entry is added. This gave me the impressing that all was well, but I think an internal process failed due to the invalid custom domain. The error message is:I hope that you can use this information to improve this wonderful software.