From d3a5db394cb3e028ea8d4ce44ede15c37d8ed445 Mon Sep 17 00:00:00 2001 From: Phil Jaenke Date: Fri, 15 May 2020 16:06:59 -0400 Subject: [PATCH] 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. --- functions.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions.inc.php b/functions.inc.php index 6e74f9c3..3c63ff1c 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -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)); }