Make pInvalidDomainDNS more forgiving

Make the pInvalidDomainDNS check more forgiving to accommodate newly created domains which also do not have an A record for the domain (which is generally not a best practice) or MX configured yet.
This adds a check for an `NS` record; if the NS exists, then the domain is valid and can be assumed to have just not been configured to receive email yet.
pull/355/head
Phil Jaenke 6 years ago committed by GitHub
parent 864065cd37
commit d3a5db394c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -248,6 +248,8 @@ function check_domain($domain) {
$retval = '';
} elseif (checkdnsrr($domain, 'MX')) {
$retval = '';
} elseif (checkdnsrr($domain, 'NS')) {
$retval = '';
} else {
$retval = sprintf(Config::lang('pInvalidDomainDNS'), htmlentities($domain));
}

Loading…
Cancel
Save