Allow [1.2.3.4] for the hostname when checking if the dns resolves

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@12 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Ask Bjørn Hansen 2002-01-27 01:23:42 +00:00
parent 07a4c58558
commit 0a91332bcd
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,6 @@
2002/01/26
Allow [1.2.3.4] for the hostname when checking if the dns resolves
2002/01/21 2002/01/21
assorted fixes; getting dnsbl's to actually work assorted fixes; getting dnsbl's to actually work

View File

@ -339,6 +339,9 @@ sub check_dnsbl {
sub check_dns { sub check_dns {
my $host = shift; my $host = shift;
return 1 if $host =~ m/^\[(\d{1,3}\.){3}\d{1,3}\]$/;
my $res = new Net::DNS::Resolver; my $res = new Net::DNS::Resolver;
return 1 if mx($res, $host); return 1 if mx($res, $host);
my $query = $res->search($host); my $query = $res->search($host);