1 |
diff -up smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers.qpsmtpd83 smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers |
diff -up smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers.qpsmtpd83 smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers |
2 |
--- smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers.qpsmtpd83 2009-10-29 14:03:00.000000000 -0600 |
--- smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers.qpsmtpd83 2008-10-07 09:02:36.000000000 -0600 |
3 |
+++ smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers 2009-10-29 14:02:37.000000000 -0600 |
+++ smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers 2009-10-29 18:34:26.000000000 -0600 |
4 |
@@ -54,7 +54,7 @@ sub init { |
@@ -54,7 +54,7 @@ sub init { |
5 |
if (-e "$dir/$plugin") { |
if (-e "$dir/$plugin") { |
6 |
Qpsmtpd::Plugin->compile($plugin_name, $package, |
Qpsmtpd::Plugin->compile($plugin_name, $package, |
10 |
unless $plugin_line =~ /logging/; |
unless $plugin_line =~ /logging/; |
11 |
last PLUGIN_DIR; |
last PLUGIN_DIR; |
12 |
} |
} |
13 |
@@ -69,10 +69,8 @@ sub init { |
@@ -68,8 +68,11 @@ sub init { |
14 |
|
|
15 |
sub _peer_plugins { |
sub _peer_plugins { |
16 |
my $qp = shift; |
my $qp = shift; |
17 |
|
+ my $hook = shift; |
18 |
my $config = shift; |
my $config = shift; |
19 |
- $qp->{hooks} = {}; |
- $qp->{hooks} = {}; |
20 |
|
+ |
21 |
|
+ my $hooks; |
22 |
|
+ $hooks->{$_} = delete $qp->hooks->{$_} foreach keys %{$qp->hooks}; |
23 |
|
|
24 |
my @plugins = $qp->config($config); |
my @plugins = $qp->config($config); |
25 |
- unshift @plugins, "peers $config"; |
unshift @plugins, "peers $config"; |
26 |
my @loaded; |
@@ -80,6 +83,12 @@ sub _peer_plugins { |
27 |
|
push @loaded, $this_plugin if $this_plugin; |
28 |
|
} |
29 |
|
|
30 |
|
+ if ($hook eq 'set_hooks') { |
31 |
|
+ foreach my $c (@{$hooks->{connect}}) { |
32 |
|
+ unshift @{$qp->hooks->{connect}}, $c unless grep { $c->{name} eq $_->{name} } @{$hooks->{connect}}; |
33 |
|
+ } |
34 |
|
+ } |
35 |
|
+ |
36 |
|
return @loaded; |
37 |
|
} |
38 |
|
|
39 |
for my $plugin_line (@plugins) { |
@@ -91,13 +100,13 @@ sub hook_set_hooks { |
40 |
|
my $client_ip = $qp->connection->remote_ip; |
41 |
|
while ($client_ip) { |
42 |
|
if (-f "config/peers/$client_ip") { |
43 |
|
- _peer_plugins($qp, "peers/$client_ip"); |
44 |
|
+ _peer_plugins($qp, "set_hooks", "peers/$client_ip"); |
45 |
|
return (DECLINED); |
46 |
|
} |
47 |
|
$client_ip =~ s/\.?\d+$//; # strip off another 8 bits |
48 |
|
} |
49 |
|
if (-f "config/peers/0") { |
50 |
|
- _peer_plugins($qp, "peers/0"); |
51 |
|
+ _peer_plugins($qp, "set_hooks", "peers/0"); |
52 |
|
return (DECLINED); |
53 |
|
} |
54 |
|
return (DENY); |
55 |
|
@@ -106,6 +115,6 @@ sub hook_set_hooks { |
56 |
|
sub hook_valid_auth { |
57 |
|
my ( $self, $transaction) = @_; |
58 |
|
my $qp = $self->qp; |
59 |
|
- _peer_plugins($qp, "peers/local") if (-f "config/peers/local"); |
60 |
|
+ _peer_plugins($qp, "valid_auth", "peers/local") if (-f "config/peers/local"); |
61 |
|
return (DECLINED); |
62 |
|
} |
63 |
diff -up smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins.qpsmtpd83 smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins |
diff -up smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins.qpsmtpd83 smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins |
64 |
--- smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins.qpsmtpd83 2008-10-07 09:02:36.000000000 -0600 |
--- smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins.qpsmtpd83 2008-10-07 09:02:36.000000000 -0600 |
65 |
+++ smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins 2009-10-29 13:50:03.000000000 -0600 |
+++ smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins 2009-10-29 13:50:03.000000000 -0600 |
68 |
hosts_allow |
hosts_allow |
69 |
peers |
peers |
70 |
+tls ssl/cert.pem ssl/cert.pem ssl/cert.pem |
+tls ssl/cert.pem ssl/cert.pem ssl/cert.pem |
71 |
|
diff -up smeserver-qpsmtpd-2.0.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/plugins/04tls.qpsmtpd83 smeserver-qpsmtpd-2.0.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/plugins/04tls |
72 |
|
--- smeserver-qpsmtpd-2.0.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/plugins/04tls.qpsmtpd83 2009-10-29 21:03:34.000000000 -0600 |
73 |
|
+++ smeserver-qpsmtpd-2.0.0/root/etc/e-smith/templates/var/service/qpsmtpd/config/plugins/04tls 2009-10-29 21:03:28.000000000 -0600 |
74 |
|
@@ -0,0 +1 @@ |
75 |
|
+tls ssl/cert.pem ssl/cert.pem ssl/cert.pem |
76 |
diff -up smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/tls_before_auth.qpsmtpd83 smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/tls_before_auth |
diff -up smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/tls_before_auth.qpsmtpd83 smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/tls_before_auth |
77 |
--- smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/tls_before_auth.qpsmtpd83 2009-10-29 13:51:39.000000000 -0600 |
--- smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/tls_before_auth.qpsmtpd83 2009-10-29 13:51:39.000000000 -0600 |
78 |
+++ smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/tls_before_auth 2009-10-29 13:51:39.000000000 -0600 |
+++ smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/tls_before_auth 2009-10-29 13:51:39.000000000 -0600 |