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:
parent
07a4c58558
commit
0a91332bcd
3
Changes
3
Changes
@ -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
|
||||||
|
3
qpsmtpd
3
qpsmtpd
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user