It appears that some domains that do not have MX records pass the Net::DNS mx check routine (I haven't checked if the same issue occurs with the nslookup routine).
The following change makes the Net::DNS MX record check fail correctly for these domains:
sub _net_dns_query {
my $self = shift;
my $host = shift;
$Resolver = Net::DNS::Resolver->new unless defined $Resolver;
my @mx_entries = Net::DNS::mx($Resolver,$host);
if (@mx_entries) {
foreach my $mx (@mx_entries) {
my $mxhost = $mx->exchange;
my $query = $Resolver->search($mxhost);
foreach my $a_rr ($query->answer) {
return 1 unless $a_rr->type ne 'A';
}
}
}
return $self->details('mx');
}
It appears that some domains that do not have MX records pass the
Net::DNS
mx check routine (I haven't checked if the same issue occurs with thenslookup
routine).The following change makes the
Net::DNS
MX record check fail correctly for these domains: