Author: ask
Date: Wed Jul 6 14:52:45 2005
New Revision: 473
Modified:
trunk/Changes
trunk/README.plugins
trunk/lib/Qpsmtpd/SMTP.pm
trunk/plugins/count_unrecognized_commands
Log:
The unrecognized_command hook now understands the DENY_DISCONNECT return
and the DENY return is deprecated.
Modified: trunk/Changes
==============================================================================
--- trunk/Changes (original)
+++ trunk/Changes Wed Jul 6 14:52:45 2005
@@ -2,6 +2,8 @@
qpsmtpd-forkserver: --listen-address may now be given more than once, to
request listening on multiple local addresses (Devin Carraway)
+ (also: no more signal problems making qpsmtpd-forkserver crash/loop
+ when forking).
qpsmtpd-forkserver: add an option for writing a PID file (pjh)
@@ -12,6 +14,11 @@
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.
+
+ Updated documentation
+
0.30 - 2005/07/05
Modified: trunk/README.plugins
==============================================================================
--- trunk/README.plugins (original)
+++ trunk/README.plugins Wed Jul 6 14:52:45 2005
@@ -189,7 +189,7 @@ Works like the "connect" hook.
Called when we get a command that isn't recognized.
- DENY - Return 521 and disconnect the client
+ DENY_DISCONNECT - Return 521 and disconnect the client
DONE - Qpsmtpd won't do anything; the plugin responded
Anything else - Return '500 Unrecognized command'
Modified: trunk/lib/Qpsmtpd/SMTP.pm
==============================================================================
--- trunk/lib/Qpsmtpd/SMTP.pm (original)
+++ trunk/lib/Qpsmtpd/SMTP.pm Wed Jul 6 14:52:45 2005
@@ -52,7 +52,9 @@ sub dispatch {
if ($cmd !~ /^(\w{1,12})$/ or !exists $self->{_commands}->{$1}) {
my ($rc, $msg) = $self->run_hooks("unrecognized_command", $cmd);
- if ($rc == DENY) {
+ 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;
$self->respond(521, $msg);
$self->disconnect;
}
Modified: trunk/plugins/count_unrecognized_commands
==============================================================================
--- trunk/plugins/count_unrecognized_commands (original)
+++ trunk/plugins/count_unrecognized_commands Wed Jul 6 14:52:45 2005
@@ -42,7 +42,7 @@ sub check_unrec_cmd {
if ($badcmdcount >= $self->{_unrec_cmd_max}) {
$self->log(LOGINFO, "Closing connection. Too many unrecognized commands.");
- return (DENY, "Closing connection. $badcmdcount unrecognized commands.
Perhaps you should read RFC 2821?");
+ return (DENY_DISCONNECT, "Closing connection. $badcmdcount unrecognized
commands. Perhaps you should read RFC 2821?");
}
return DECLINED;