cvs commit: qpsmtpd/lib/Qpsmtpd Plugin.pm
[email protected] (Matt Sergeant)
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
cvsuser 04/09/19 11:49:05
Modified: lib Qpsmtpd.pm
lib/Qpsmtpd Plugin.pm
Log:
Fix deny plugin which stopped working.
Call deny plugin for _DISCONNECT constants.
Make Plugin.pm %hooks a global rather than lexical so we can do evil things later.
Revision Changes Path
1.44 +3 -1 qpsmtpd/lib/Qpsmtpd.pm
Index: Qpsmtpd.pm
===================================================================
RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd.pm,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -w -r1.43 -r1.44
--- Qpsmtpd.pm 8 Sep 2004 16:26:31 -0000 1.43
+++ Qpsmtpd.pm 19 Sep 2004 18:49:05 -0000 1.44
@@ -272,7 +272,9 @@
}
# 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");
1.13 +2 -1 qpsmtpd/lib/Qpsmtpd/Plugin.pm
Index: Plugin.pm
===================================================================
RCS file: /cvs/public/qpsmtpd/lib/Qpsmtpd/Plugin.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -w -r1.12 -r1.13
--- Plugin.pm 8 Sep 2004 05:14:10 -0000 1.12
+++ Plugin.pm 19 Sep 2004 18:49:05 -0000 1.13
@@ -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 {