Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domain DNS check fails when DNS servers don't support ANY as a query type #6581

Closed
disturbio opened this issue Jan 8, 2019 · 4 comments
Closed

Comments

@disturbio
Copy link

Hi,

After moving from DNS servers from bind to knot, roundcube started to fail validating e-mail addresses of some random, but valid domains. The reason is that checkdnsrr($domain_part, 'ANY') fails when asking to the knot dns server. There are reasons for DNS services to not support the ANY query type, and Cloudflare details their reasons they deprecated it 1, and also there is also work at IETF about this 2.

The effect of this failing is that the user cannot send an e-mail, as the check fails. The way to solve currently is to disable the dns_check, but would it be possible to use the check A and AAAA records directly instead of ANY and keep the function working as expected instead of breaking compatibility with the DNS Servers that will not implement that query type?

A quick way to test this is to set "1.1.1.1" as the dns server (as that's provided by cloudflare).

Thanks in advance.

@alecpl
Copy link
Member

alecpl commented Jan 8, 2019

We should check SOA record.

@alecpl alecpl added this to the 1.4.0 milestone Jan 8, 2019
@disturbio
Copy link
Author

Checking the SOA record will work for the root domain, but it can fail for the subdomains (at least it will fail against bind and knot). As it's very common for universities or mailing lists, the check really should be a different one.

I looked up for a #2175 and e4acbbd I don't get a clear idea what's the goal with ANY there. But the idea of checking SOA makes me think it can be for reducing the number of queries).

As if a domain doesn't have MX records set, the mail system will try the A record, it may be possible to remove the MX dns check (the mail system will use if exists, there seems to be no benefit that is there at a very superficial look), and then check for A || AAAA and if it doesn't find those try a CNAME one? This should minimize at least a little the possible performance problems.

@alecpl
Copy link
Member

alecpl commented Jan 9, 2019

Looks like you're right about SOA. We should try A, MX, CNAME, AAAA. In that order.

disturbio added a commit to disturbio/roundcubemail that referenced this issue Jan 16, 2019
…#6581)

As query type ANY is not used by all dns servers, the domain validation
function checks for an A, MX, CNAME, and AAAA record (in that order).
@alecpl alecpl modified the milestones: 1.4.0, 1.4-rc Jan 16, 2019
alecpl added a commit that referenced this issue Jan 16, 2019
alecpl added a commit that referenced this issue Jan 16, 2019
@alecpl
Copy link
Member

alecpl commented Jan 16, 2019

Fixed.

@alecpl alecpl closed this as completed Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants