diff --git a/plugins/dnsbl b/plugins/dnsbl index 8c0be1a..353a918 100644 --- a/plugins/dnsbl +++ b/plugins/dnsbl @@ -67,6 +67,9 @@ sub process_sockets { my %dnsbl_zones = map { (split /:/, $_, 2)[0,1] } $self->qp->config('dnsbl_zones'); my $res = new Net::DNS::Resolver; + $res->tcp_timeout(30); + $res->udp_timeout(30); + my $sel = $conn->notes('dnsbl_sockets') or return ""; my $remote_ip = $self->qp->connection->remote_ip; diff --git a/plugins/queue/qmail-queue b/plugins/queue/qmail-queue index e426759..b7bf475 100644 --- a/plugins/queue/qmail-queue +++ b/plugins/queue/qmail-queue @@ -1,3 +1,4 @@ +# -*- perl -*- =head1 NAME qmail-queue diff --git a/plugins/require_resolvable_fromhost b/plugins/require_resolvable_fromhost index c0869fb..a122bda 100644 --- a/plugins/require_resolvable_fromhost +++ b/plugins/require_resolvable_fromhost @@ -7,7 +7,7 @@ sub register { sub mail_handler { my ($self, $transaction, $sender) = @_; - + $sender->format ne "<>" and $self->qp->config("require_resolvable_fromhost") and !check_dns($sender->host) @@ -30,6 +30,8 @@ sub check_dns { return 1 if $host =~ m/^\[(\d{1,3}\.){3}\d{1,3}\]$/; my $res = new Net::DNS::Resolver; + $res->tcp_timeout(30); + $res->udp_timeout(30); return 1 if mx($res, $host); my $query = $res->search($host); if ($query) {