/[smeserver]/rpms/smeserver-qpsmtpd/sme8/smeserver-qpsmtpd-2.2.0-qpsmtpd83.patch
ViewVC logotype

Contents of /rpms/smeserver-qpsmtpd/sme8/smeserver-qpsmtpd-2.2.0-qpsmtpd83.patch

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


Revision 1.3 - (show annotations) (download)
Fri Oct 30 00:35:38 2009 UTC (14 years, 7 months ago) by slords
Branch: MAIN
Changes since 1.2: +27 -3 lines
Fix patch

1 diff -up smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers.t smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers
2 --- smeserver-qpsmtpd-2.0.0/root/usr/share/qpsmtpd/plugins/peers.t 2008-10-07 09:02:36.000000000 -0600
3 +++ 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 {
5 if (-e "$dir/$plugin") {
6 Qpsmtpd::Plugin->compile($plugin_name, $package,
7 "$dir/$plugin", $self->{_test_mode}, $plugin);
8 - $self->log(LOGDEBUG, "Loading $plugin_line from $dir/$plugin")
9 + Qpsmtpd->varlog(LOGDEBUG, "init", "peers", "Loading $plugin_line from $dir/$plugin")
10 unless $plugin_line =~ /logging/;
11 last PLUGIN_DIR;
12 }
13 @@ -69,7 +69,9 @@ sub init {
14 sub _peer_plugins {
15 my $qp = shift;
16 my $config = shift;
17 - $qp->{hooks} = {};
18 +
19 + my $hooks;
20 + $hooks->{$_} = delete $qp->hooks->{$_} foreach keys %{$qp->hooks};
21
22 my @plugins = $qp->config($config);
23 unshift @plugins, "peers $config";
24 @@ -79,6 +81,7 @@ sub _peer_plugins {
25 my $this_plugin = $qp->_load_plugin($plugin_line, $qp->plugin_dirs);
26 push @loaded, $this_plugin if $this_plugin;
27 }
28 + unshift @{$qp->hooks->{connect}}, @{$hooks->{connect}} if exists $hooks->{connect} && $hook eq 'set_hooks';
29
30 return @loaded;
31 }
32 @@ -91,13 +94,13 @@ sub hook_set_hooks {
33 my $client_ip = $qp->connection->remote_ip;
34 while ($client_ip) {
35 if (-f "config/peers/$client_ip") {
36 - _peer_plugins($qp, "peers/$client_ip");
37 + _peer_plugins($qp, "set_hooks", "peers/$client_ip");
38 return (DECLINED);
39 }
40 $client_ip =~ s/\.?\d+$//; # strip off another 8 bits
41 }
42 if (-f "config/peers/0") {
43 - _peer_plugins($qp, "peers/0");
44 + _peer_plugins($qp, "set_hooks", "peers/0");
45 return (DECLINED);
46 }
47 return (DENY);
48 @@ -106,6 +109,6 @@ sub hook_set_hooks {
49 sub hook_valid_auth {
50 my ( $self, $transaction) = @_;
51 my $qp = $self->qp;
52 - _peer_plugins($qp, "peers/local") if (-f "config/peers/local");
53 + _peer_plugins($qp, "valid_auth", "peers/local") if (-f "config/peers/local");
54 return (DECLINED);
55 }
56 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
57 --- smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins.qpsmtpd83 2008-10-07 09:02:36.000000000 -0600
58 +++ smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/plugins 2009-10-29 13:50:03.000000000 -0600
59 @@ -5,3 +5,4 @@
60 #------------------------------------------------------------
61 hosts_allow
62 peers
63 +tls ssl/cert.pem ssl/cert.pem ssl/cert.pem
64 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
65 --- smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/tls_before_auth.qpsmtpd83 2009-10-29 13:51:39.000000000 -0600
66 +++ smeserver-qpsmtpd-2.0.0/root/var/service/qpsmtpd/config/tls_before_auth 2009-10-29 13:51:39.000000000 -0600
67 @@ -0,0 +1 @@
68 +1
69 diff -up smeserver-qpsmtpd-2.0.0/root/var/service/sqpsmtpd/run.qpsmtpd83 smeserver-qpsmtpd-2.0.0/root/var/service/sqpsmtpd/run
70 --- smeserver-qpsmtpd-2.0.0/root/var/service/sqpsmtpd/run.qpsmtpd83 2006-02-05 07:38:30.000000000 -0700
71 +++ smeserver-qpsmtpd-2.0.0/root/var/service/sqpsmtpd/run 2009-10-29 13:48:34.000000000 -0600
72 @@ -1,37 +1,47 @@
73 #!/bin/sh
74 #----------------------------------------------------------------------
75 -# copyright (C) 1999-2003 Mitel Networks Corporation
76 -#
77 +# copyright (C) 1999-2005 Mitel Networks Corporation
78 +# Copyright (C) 2005-2006 Gordon Rowell <gordonr@gormand.com.au>
79 +#
80 # This program is free software; you can redistribute it and/or modify
81 # it under the terms of the GNU General Public License as published by
82 # the Free Software Foundation; either version 2 of the License, or
83 # (at your option) any later version.
84 -#
85 +#
86 # This program is distributed in the hope that it will be useful,
87 # but WITHOUT ANY WARRANTY; without even the implied warranty of
88 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
89 # GNU General Public License for more details.
90 -#
91 +#
92 # You should have received a copy of the GNU General Public License
93 # along with this program; if not, write to the Free Software
94 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
95 -#
96 -# Technical support for this program is available from Mitel Networks
97 -# Please visit our web site www.mitel.com/sme/ for details.
98 #----------------------------------------------------------------------
99
100 [ -f ./runenv ] && . ./runenv
101
102 export QPSMTPD_CONFIG=/var/service/qpsmtpd/config
103
104 -exec 2>&1
105 -exec /usr/bin/tcpsvd \
106 - -v \
107 - -i ../qpsmtpd/peers \
108 - -c ${INSTANCES:-10} \
109 - -C ${INSTANCES_PER_IP:-5}:'421 per host concurrency limit reached\r\n' \
110 - -l ${TCPLOCALHOST:-0} \
111 - ${LISTENIP:-0} \
112 - ${PORT:-465} \
113 - ./sqpsmtpd
114 +../qpsmtpd/control/1
115
116 +exec /usr/local/bin/softlimit -d ${SOFTLIMIT:-25000000} -s ${SOFTLIMIT:-25000000} -l ${SOFTLIMIT:-25000000} \
117 + /usr/bin/qpsmtpd-forkserver \
118 + -u qpsmtpd \
119 + -l 0.0.0.0 \
120 + -p ${PORT:-465} \
121 + -c ${INSTANCES:-40} \
122 + -m ${INSTANCES_PER_IP:-5} \
123 + 2>&1
124 +
125 +#sub usage {
126 +# print <<"EOT";
127 +#usage: qpsmtpd-forkserver [ options ]
128 +# -l, --listen-address addr : listen on a specific address; default 0.0.0.0
129 +# -p, --port P : listen on a specific port; default 2525
130 +# -c, --limit-connections N : limit concurrent connections to N; default 15
131 +# -u, --user U : run as a particular user (defualt 'smtpd')
132 +# -m, --max-from-ip M : limit connections from a single IP; default 5
133 +#EOT
134 +# exit 0;
135 +#}
136 +#

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