/[smeserver]/rpms/qpsmtpd/sme8/qpsmtpd-0.32-dnsbl-checkanswer.patch
ViewVC logotype

Contents of /rpms/qpsmtpd/sme8/qpsmtpd-0.32-dnsbl-checkanswer.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download)
Thu Jun 14 20:07:19 2007 UTC (17 years, 5 months ago) by slords
Branch: MAIN
CVS Tags: qpsmtpd-0_40-1_11_el5_sme, qpsmtpd-0_40-1_10_el5_sme, qpsmtpd-0_40-1_1_el5_sme, qpsmtpd-0_40-1_5_el5_sme, qpsmtpd-0_40-1_2_el5_sme, qpsmtpd-0_40-1_9_el5_sme, qpsmtpd-0_40-1_3_el5_sme, qpsmtpd-0_40-1_6_el5_sme, qpsmtpd-0_40-1_0_el5_sme, qpsmtpd-0_40-1_7_el5_sme, qpsmtpd-0_40-1_4_el5_sme
Import on branch sme8 of package qpsmtpd-0.40-1.0.el5.sme.src.rpm

1 --- plugins/dnsbl.dnsbl-checkanswer Sun Feb 26 13:22:16 2006
2 +++ plugins/dnsbl Sat Mar 18 23:15:33 2006
3 @@ -46,8 +46,10 @@
4
5 my $sel = IO::Select->new();
6
7 + my $dom;
8 for my $dnsbl (keys %dnsbl_zones) {
9 # fix to find A records, if the dnsbl_zones line has a second field 20/1/04 ++msp
10 + $dom->{"$reversed_ip.$dnsbl"} = 1;
11 if (defined($dnsbl_zones{$dnsbl})) {
12 $self->log(LOGDEBUG, "Checking $reversed_ip.$dnsbl for A record in the background");
13 $sel->add($res->bgsend("$reversed_ip.$dnsbl"));
14 @@ -58,6 +60,7 @@
15 }
16
17 $self->qp->connection->notes('dnsbl_sockets', $sel);
18 + $self->qp->connection->notes('dnsbl_domains', $dom);
19
20 return DECLINED;
21 }
22 @@ -77,6 +80,7 @@
23 $res->udp_timeout(30);
24
25 my $sel = $conn->notes('dnsbl_sockets') or return "";
26 + my $dom = $conn->notes('dnsbl_domains');
27 my $remote_ip = $self->qp->connection->remote_ip;
28
29 my $result;
30 @@ -99,11 +103,13 @@
31 if ($query) {
32 my $a_record = 0;
33 foreach my $rr ($query->answer) {
34 - $a_record = 1 if $rr->type eq "A";
35 my $name = $rr->name;
36 + $self->log(LOGDEBUG, "name $name");
37 + next unless $dom->{$name};
38 + $self->log(LOGDEBUG, "name $name was queried");
39 + $a_record = 1 if $rr->type eq "A";
40 ($dnsbl) = ($name =~ m/(?:\d+\.){4}(.*)/) unless $dnsbl;
41 $dnsbl = $name unless $dnsbl;
42 - $self->log(LOGDEBUG, "name ", $rr->name);
43 next unless $rr->type eq "TXT";
44 $self->log(LOGDEBUG, "got txt record");
45 $result = $rr->txtdata and last;

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed