diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index e75d4dc..192fdc5 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -272,7 +272,9 @@ sub run_hooks { } # should we have a hook for "OK" too? - if ($r[0] == DENY or $r[0] == DENYSOFT) { + if ($r[0] == DENY or $r[0] == DENYSOFT or + $r[0] == DENY_DISCONNECT or $r[0] == DENYSOFT_DISCONNECT) + { $r[1] = "" if not defined $r[1]; $self->log(LOGDEBUG, "Plugin $code->{name}, hook $hook returned $r[0], $r[1]"); $self->run_hooks("deny", $code->{name}, $r[0], $r[1]) unless ($hook eq "deny"); diff --git a/lib/Qpsmtpd/Plugin.pm b/lib/Qpsmtpd/Plugin.pm index 27a2ad0..382814c 100644 --- a/lib/Qpsmtpd/Plugin.pm +++ b/lib/Qpsmtpd/Plugin.pm @@ -1,10 +1,11 @@ package Qpsmtpd::Plugin; use strict; -my %hooks = map { $_ => 1 } qw( +our %hooks = map { $_ => 1 } qw( config queue data data_post quit rcpt mail ehlo helo auth auth-plain auth-login auth-cram-md5 connect reset_transaction unrecognized_command disconnect + deny ); sub new {