Open
Description
I have a IONOS and google cloud server and some A records fail to resolve the DNS_A + DNS_MX
part:
php -r 'require_once("vendor/autoload.php"); $dnsCheckValidation = new \Egulias\EmailValidator\Validation\DNSCheckValidation(); var_dump($dnsCheckValidation->isValid("[email protected]", new \Egulias\EmailValidator\EmailLexer())); var_dump($dnsCheckValidation->getError());'
Locally all works like expected.
If I change todo only a MX Lookup and not a A lookup all works like expected:
- $dnsRecordsResult = $this->dnsGetRecord->getRecords($host, DNS_A + DNS_MX);
+ $dnsRecordsResult = $this->dnsGetRecord->getRecords($host, DNS_MX);
So maybe change to something like:
$dnsRecordsResult = $this->dnsGetRecord->getRecords($host, DNS_MX);
$dnsRecords = [];
if (! $dnsRecordsResult->withError()) {
$dnsRecords = $dnsRecordsResult->getRecords();
}
$dnsRecordsResult = $this->dnsGetRecord->getRecords($host, DNS_A);
if (! $dnsRecordsResult->withError()) {
$dnsRecords = array_merge($dnsRecords, $dnsRecordsResult->getRecords());
}
// Combined check for A+MX+AAAA can fail with SERVFAIL, even in the presence of valid A/MX records
$aaaaRecordsResult = $this->dnsGetRecord->getRecords($host, DNS_AAAA);
if (! $aaaaRecordsResult->withError()) {
$dnsRecords = array_merge($dnsRecords, $aaaaRecordsResult->getRecords());
}
Metadata
Metadata
Assignees
Labels
No labels