1 |
vip-ire |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.96/lib/Qpsmtpd/Plugin.pm mezzanine_patched_qpsmtpd-0.96/lib/Qpsmtpd/Plugin.pm |
2 |
|
|
--- qpsmtpd-0.96/lib/Qpsmtpd/Plugin.pm 2016-02-16 23:52:02.000000000 +0100 |
3 |
|
|
+++ mezzanine_patched_qpsmtpd-0.96/lib/Qpsmtpd/Plugin.pm 2016-04-15 17:08:29.174840108 +0200 |
4 |
|
|
@@ -10,7 +10,7 @@ |
5 |
|
|
our @hooks = qw( |
6 |
|
|
logging config user_config post-fork pre-connection connect ehlo_parse ehlo |
7 |
|
|
helo_parse helo auth_parse auth auth-plain auth-login auth-cram-md5 |
8 |
|
|
- rcpt_parse rcpt_pre rcpt mail_parse mail mail_pre |
9 |
|
|
+ valid_auth set_hooks rcpt_parse rcpt_pre rcpt mail_parse mail mail_pre |
10 |
|
|
data data_headers_end data_post_headers data_post queue_pre queue queue_post vrfy noop |
11 |
|
|
quit reset_transaction disconnect post-connection |
12 |
|
|
unrecognized_command deny ok received_line help |
13 |
|
|
diff -Nur -x '*.orig' -x '*.rej' qpsmtpd-0.96/lib/Qpsmtpd/SMTP.pm mezzanine_patched_qpsmtpd-0.96/lib/Qpsmtpd/SMTP.pm |
14 |
|
|
--- qpsmtpd-0.96/lib/Qpsmtpd/SMTP.pm 2016-04-15 17:08:57.630842467 +0200 |
15 |
|
|
+++ mezzanine_patched_qpsmtpd-0.96/lib/Qpsmtpd/SMTP.pm 2016-04-15 17:07:45.577836505 +0200 |
16 |
|
|
@@ -96,6 +96,11 @@ |
17 |
|
|
|
18 |
|
|
# this should maybe be called something else than "connect", see |
19 |
|
|
# lib/Qpsmtpd/TcpServer.pm for more confusion. |
20 |
|
|
+ my ($rc, $msg) = $self->run_hooks("set_hooks"); |
21 |
|
|
+ if ($rc == DENY) { |
22 |
|
|
+ $self->respond(550, ($msg || 'Connection from you denied, bye bye.')); |
23 |
|
|
+ return $rc; |
24 |
|
|
+ } |
25 |
|
|
$self->run_hooks("connect"); |
26 |
|
|
return DONE; |
27 |
|
|
} |
28 |
|
|
@@ -309,7 +314,9 @@ |
29 |
|
|
&& $self->transaction->notes('tls_enabled')); |
30 |
|
|
|
31 |
|
|
if (exists $auth_mechanisms{uc($mechanism)}) { |
32 |
|
|
- return $self->{_auth} = Qpsmtpd::Auth::SASL($self, $mechanism, @stuff); |
33 |
|
|
+ $self->{_auth} = Qpsmtpd::Auth::SASL( $self, $mechanism, @stuff ); |
34 |
|
|
+ $self->run_hooks("valid_auth") if $self->{_auth} == OK; |
35 |
|
|
+ return $self->{_auth}; |
36 |
|
|
} |
37 |
|
|
|
38 |
|
|
# no plugin implementing this auth mechanism |