0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

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.
This commit is contained in:
Phil Jaenke 2020-05-15 16:06:59 -04:00 committed by GitHub
parent 864065cd37
commit d3a5db394c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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));
}