diff options
Diffstat (limited to 'mail-mta/qpsmtpd/files/qpsmtpd-0.40-peer_hooks.patch')
-rw-r--r-- | mail-mta/qpsmtpd/files/qpsmtpd-0.40-peer_hooks.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/mail-mta/qpsmtpd/files/qpsmtpd-0.40-peer_hooks.patch b/mail-mta/qpsmtpd/files/qpsmtpd-0.40-peer_hooks.patch new file mode 100644 index 000000000000..fd6ccbfc79ad --- /dev/null +++ b/mail-mta/qpsmtpd/files/qpsmtpd-0.40-peer_hooks.patch @@ -0,0 +1,36 @@ +--- qpsmtpd-0.40/lib/Qpsmtpd/SMTP.pm.peer_hooks 2007-06-14 11:57:27.000000000 -0600 ++++ qpsmtpd-0.40/lib/Qpsmtpd/SMTP.pm 2007-06-14 13:44:52.000000000 -0600 +@@ -95,6 +95,11 @@ + my $self = shift; + # this should maybe be called something else than "connect", see + # lib/Qpsmtpd/TcpServer.pm for more confusion. ++ my ($rc, $msg) = $self->run_hooks("set_hooks"); ++ if ($rc == DENY) { ++ $self->respond(550, ($msg || 'Connection from you denied, bye bye.')); ++ return $rc; ++ } + $self->run_hooks("connect"); + return DONE; + } +@@ -278,7 +283,9 @@ + + # if we don't have a plugin implementing this auth mechanism, 504 + if( exists $auth_mechanisms{uc($mechanism)} ) { +- return $self->{_auth} = Qpsmtpd::Auth::SASL( $self, $mechanism, @stuff ); ++ $self->{_auth} = Qpsmtpd::Auth::SASL( $self, $mechanism, @stuff ); ++ $self->run_hooks("valid_auth") if $self->{_auth} == OK; ++ return $self->{_auth}; + } else { + $self->respond( 504, "Unimplemented authentification mechanism: $mechanism" ); + return DENY; +--- qpsmtpd-0.40/lib/Qpsmtpd/Plugin.pm.peer_hooks 2007-06-14 11:57:27.000000000 -0600 ++++ qpsmtpd-0.40/lib/Qpsmtpd/Plugin.pm 2007-06-14 13:43:53.000000000 -0600 +@@ -6,7 +6,7 @@ + our @hooks = qw( + logging config pre-connection connect ehlo_parse ehlo + helo_parse helo auth_parse auth auth-plain auth-login auth-cram-md5 +- rcpt_parse rcpt_pre rcpt mail_parse mail mail_pre ++ valid_auth set_hooks rcpt_parse rcpt_pre rcpt mail_parse mail mail_pre + data data_post queue_pre queue queue_post + quit reset_transaction disconnect post-connection + unrecognized_command deny ok received_line |