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

Contents of /rpms/qpsmtpd/sme8/qpsmtpd-0.32-peerhooks.patch

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


Revision 1.2 - (show annotations) (download)
Thu Jun 14 20:07:19 2007 UTC (17 years, 4 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
Import on branch sme8 of package qpsmtpd-0.40-1.0.el5.sme.src.rpm

1 diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.32/lib/Qpsmtpd/Plugin.pm mezzanine_patched_qpsmtpd-0.32/lib/Qpsmtpd/Plugin.pm
2 --- qpsmtpd-0.32/lib/Qpsmtpd/Plugin.pm 2006-02-26 05:22:16.000000000 -0700
3 +++ mezzanine_patched_qpsmtpd-0.32/lib/Qpsmtpd/Plugin.pm 2007-01-11 20:20:14.000000000 -0700
4 @@ -4,8 +4,8 @@
5
6 our @hooks = qw(
7 logging config queue data data_post quit rcpt mail ehlo helo
8 - auth auth-plain auth-login auth-cram-md5
9 - connect reset_transaction unrecognized_command disconnect
10 + auth auth-plain auth-login auth-cram-md5 valid_auth
11 + set_hooks connect reset_transaction unrecognized_command disconnect
12 deny ok pre-connection post-connection
13 );
14 our %hooks = map { $_ => 1 } @hooks;
15 diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.32/lib/Qpsmtpd/SMTP.pm mezzanine_patched_qpsmtpd-0.32/lib/Qpsmtpd/SMTP.pm
16 --- qpsmtpd-0.32/lib/Qpsmtpd/SMTP.pm 2007-01-11 20:22:05.000000000 -0700
17 +++ mezzanine_patched_qpsmtpd-0.32/lib/Qpsmtpd/SMTP.pm 2007-01-11 20:21:14.000000000 -0700
18 @@ -91,6 +91,11 @@
19 my $self = shift;
20 # this should maybe be called something else than "connect", see
21 # lib/Qpsmtpd/TcpServer.pm for more confusion.
22 + my ($rc, $msg) = $self->run_hooks("set_hooks");
23 + if ($rc == DENY) {
24 + $self->respond(550, ($msg || 'Connection from you denied, bye bye.'));
25 + return $rc;
26 + }
27 + ($rc, $msg) = $self->run_hooks("connect");
28 - my ($rc, $msg) = $self->run_hooks("connect");
29 if ($rc == DENY) {
30 $self->respond(550, ($msg || 'Connection from you denied, bye bye.'));
31 @@ -235,7 +241,9 @@
32 return $self->respond( 503, "AUTH not defined for HELO" )
33 if ( $self->connection->hello eq "helo" );
34
35 - return $self->{_auth} = Qpsmtpd::Auth::SASL( $self, $arg, @stuff );
36 + $self->{_auth} = Qpsmtpd::Auth::SASL( $self, $arg, @stuff );
37 + $self->run_hooks("valid_auth") if $self->{_auth} == OK;
38 + return $self->{_auth};
39 }
40
41 sub mail {

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