From 254b4fd2b2387f72fea0a0a45e51b4ae33f5ddce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ask=20Bj=C3=B8rn=20Hansen?= Date: Wed, 6 Jul 2005 22:22:29 +0000 Subject: [PATCH] return 500 rather than 521 for DENY in the unrecognized_command hook git-svn-id: https://svn.perl.org/qpsmtpd/trunk@478 958fd67b-6ff1-0310-b445-bb7760255be9 --- Changes | 4 ++-- README.plugins | 2 +- lib/Qpsmtpd/SMTP.pm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index 719b023..4b5a02e 100644 --- a/Changes +++ b/Changes @@ -14,8 +14,8 @@ when disconncting with a temporary failure, return 421 rather than 450 or 451. (Peter J. Holzer) - The unrecognized_command hook now understands the DENY_DISCONNECT return - and the DENY return is deprecated. + The unrecognized_command hook now uses DENY_DISCONNECT return + for disconnecting the user. Updated documentation diff --git a/README.plugins b/README.plugins index e87b56d..edea77b 100644 --- a/README.plugins +++ b/README.plugins @@ -190,7 +190,7 @@ Works like the "connect" hook. Called when we get a command that isn't recognized. DENY_DISCONNECT - Return 521 and disconnect the client - DENY - Return 521 + DENY - Return 500 DONE - Qpsmtpd won't do anything; the plugin responded Anything else - Return '500 Unrecognized command' diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index 536127f..df6ac69 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -57,7 +57,7 @@ sub dispatch { $self->disconnect; } elsif ($rc == DENY) { - $self->respond(521, $msg); + $self->respond(500, $msg); } elsif ($rc == DONE) { 1;