[svn:qpsmtpd] rev 476 - trunk/lib/Qpsmtpd

[email protected] 6 Jul 2005 22:16:08 -0000
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
Author: msergeant
Date: Wed Jul  6 15:16:08 2005
New Revision: 476

Modified:
   trunk/lib/Qpsmtpd/SMTP.pm
Log:
Allow DENY to be returned from unrecognised_command again


Modified: trunk/lib/Qpsmtpd/SMTP.pm
==============================================================================
--- trunk/lib/Qpsmtpd/SMTP.pm	(original)
+++ trunk/lib/Qpsmtpd/SMTP.pm	Wed Jul  6 15:16:08 2005
@@ -52,12 +52,13 @@ sub dispatch {
 
   if ($cmd !~ /^(\w{1,12})$/ or !exists $self->{_commands}->{$1}) {
     my ($rc, $msg) = $self->run_hooks("unrecognized_command", $cmd);
-    if ($rc == DENY_DISCONNECT or $rc == DENY) {
-      $self->log(LOGWARN, "Returning DENY for the unrecognized_command hook is deprecated; use DENY_DISCONNECT")
-	if $rc == DENY;
+    if ($rc == DENY_DISCONNECT) {
       $self->respond(521, $msg);
       $self->disconnect;
     }
+    elsif ($rc == DENY) {
+      $self->respond(521, $msg);
+    }
     elsif ($rc == DONE) {
       1;
     }