Merge from trunk r540:541
git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@542 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
6f23c46e93
commit
0d8d9f03b8
17
plugins/tls
17
plugins/tls
@ -41,6 +41,21 @@ sub init {
|
|||||||
# now extract the password...
|
# now extract the password...
|
||||||
|
|
||||||
$self->ssl_context($ssl_ctx);
|
$self->ssl_context($ssl_ctx);
|
||||||
|
|
||||||
|
# Check for possible AUTH mechanisms
|
||||||
|
HOOK: foreach my $hook ( keys %{$qp->{hooks}} ) {
|
||||||
|
if ( $hook =~ m/^auth-?(.+)?$/ ) {
|
||||||
|
if ( defined $1 ) {
|
||||||
|
my $hooksub = "hook_$hook";
|
||||||
|
$hooksub =~ s/\W/_/g;
|
||||||
|
*$hooksub = \&bad_ssl_hook;
|
||||||
|
}
|
||||||
|
else { # at least one polymorphous auth provider
|
||||||
|
*hook_auth = \&bad_ssl_hook;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub hook_ehlo {
|
sub hook_ehlo {
|
||||||
@ -133,4 +148,4 @@ sub bad_ssl_hook {
|
|||||||
return DENY, "Command refused due to lack of security" if $transaction->notes('ssl_failed');
|
return DENY, "Command refused due to lack of security" if $transaction->notes('ssl_failed');
|
||||||
return DECLINED;
|
return DECLINED;
|
||||||
}
|
}
|
||||||
*hook_helo = *hook_data = *hook_rcpt = *hook_mail = *hook_auth = \&bad_ssl_hook;
|
*hook_helo = *hook_data = *hook_rcpt = *hook_mail = \&bad_ssl_hook;
|
||||||
|
Loading…
Reference in New Issue
Block a user