plugins/tls: work-around for failed connections in -prefork after STARTTLS
connection (Stefan Priebe, Hanno Hecker) git-svn-id: https://svn.perl.org/qpsmtpd/trunk@805 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
1d4eca3ab3
commit
275fce4764
14
plugins/tls
14
plugins/tls
@ -105,6 +105,9 @@ HOOK: foreach my $hook ( keys %{$qp->{hooks}} ) {
|
||||
}
|
||||
}
|
||||
|
||||
# work-around for failed connections in -prefork after STARTTLS connection:
|
||||
$self->register_hook('post-connection', 'prefork_workaround')
|
||||
if $qp->isa('Qpsmtpd::SMTP::Prefork');
|
||||
}
|
||||
|
||||
sub hook_ehlo {
|
||||
@ -224,3 +227,14 @@ sub bad_ssl_hook {
|
||||
return DECLINED;
|
||||
}
|
||||
*hook_helo = *hook_data = *hook_rcpt = *hook_mail = \&bad_ssl_hook;
|
||||
|
||||
# work-around for failed connections in -prefork after STARTTLS connection:
|
||||
sub prefork_workaround {
|
||||
my $self = shift;
|
||||
# nothing to do on SSL only (SMTPS) and clear text communications
|
||||
return (DECLINED) if $self->connection->local_port == 465;
|
||||
return (DECLINED) unless $self->connection->notes('tls_enabled');
|
||||
|
||||
$self->log(LOGWARN, "Exiting because 'tls_enabled' was true.");
|
||||
exit;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user