1 |
slords |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.40/plugins/rhsbl mezzanine_patched_qpsmtpd-0.40/plugins/rhsbl |
2 |
|
|
--- qpsmtpd-0.40/plugins/rhsbl 2007-06-14 13:57:24.000000000 -0400 |
3 |
|
|
+++ mezzanine_patched_qpsmtpd-0.40/plugins/rhsbl 2007-10-16 17:28:06.000000000 -0400 |
4 |
|
|
@@ -1,4 +1,13 @@ |
5 |
|
|
+sub register { |
6 |
|
|
+ my ($self, $qp, $denial ) = @_; |
7 |
|
|
+ if ( defined $denial and $denial =~ /^disconnect$/i ) { |
8 |
|
|
+ $self->{_rhsbl}->{DENY} = DENY_DISCONNECT; |
9 |
|
|
+ } |
10 |
|
|
+ else { |
11 |
|
|
+ $self->{_rhsbl}->{DENY} = DENY; |
12 |
|
|
+ } |
13 |
|
|
|
14 |
|
|
+} |
15 |
|
|
|
16 |
|
|
sub hook_mail { |
17 |
|
|
my ($self, $transaction, $sender, %param) = @_; |
18 |
|
|
@@ -48,12 +57,12 @@ |
19 |
|
|
my $result = $self->process_sockets; |
20 |
|
|
if ($result && defined($self->{_rhsbl_zones_map}{$result})) { |
21 |
|
|
if ($result =~ /^$host\./ ) { |
22 |
|
|
- return (DENY, "Mail from $host rejected because it " . $self->{_rhsbl_zones_map}{$result}); |
23 |
|
|
+ return ($self->{_rhsbl}->{DENY}, "Mail from $host rejected because it " . $self->{_rhsbl_zones_map}{$result}); |
24 |
|
|
} else { |
25 |
|
|
- return (DENY, "Mail from HELO $hello rejected because it " . $self->{_rhsbl_zones_map}{$result}); |
26 |
|
|
+ return ($self->{_rhsbl}->{DENY}, "Mail from HELO $hello rejected because it " . $self->{_rhsbl_zones_map}{$result}); |
27 |
|
|
} |
28 |
|
|
} |
29 |
|
|
- return (DENY, $result) if $result; |
30 |
|
|
+ return ($self->{_rhsbl}->{DENY}, $result) if $result; |
31 |
|
|
return DECLINED; |
32 |
|
|
} |
33 |
|
|
|