DENY_DISCONNECT and DENYSOFT_DISCONNECT instead of *HARD
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@245 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
0e5b4e63ec
commit
ac9dd50928
@ -2,7 +2,9 @@ package Qpsmtpd::Constants;
|
||||
use strict;
|
||||
require Exporter;
|
||||
|
||||
my (@common) = qw(OK DECLINED DONE DENY DENYSOFT DENYHARD DENYSOFTHARD);
|
||||
my (@common) = qw(OK DECLINED DONE DENY DENYSOFT DENYHARD
|
||||
DENY_DISCONNECT DENYSOFT_DISCONNECT
|
||||
);
|
||||
my (@loglevels) = qw(LOGDEBUG LOGINFO LOGNOTICE LOGWARN LOGERROR LOGCRIT LOGALERT LOGEMERG LOGRADAR);
|
||||
|
||||
use vars qw($VERSION @ISA @EXPORT);
|
||||
@ -12,8 +14,9 @@ use vars qw($VERSION @ISA @EXPORT);
|
||||
use constant OK => 900;
|
||||
use constant DENY => 901; # 550
|
||||
use constant DENYSOFT => 902; # 450
|
||||
use constant DENYHARD => 903; # 550 + disconnect
|
||||
use constant DENYSOFTHARD => 904; # 450 + disconnect
|
||||
use constant DENYHARD => 903; # 550 + disconnect (deprecated in 0.29)
|
||||
use constant DENY_DISCONNECT => 903; # 550 + disconnect
|
||||
use constant DENYSOFT_DISCONNECT => 904; # 450 + disconnect
|
||||
use constant DECLINED => 909;
|
||||
use constant DONE => 910;
|
||||
|
||||
|
@ -230,13 +230,13 @@ sub mail {
|
||||
$self->log(LOGINFO, "denysoft mail from " . $from->format . " ($msg)");
|
||||
$self->respond(450, $msg);
|
||||
}
|
||||
elsif ($rc == DENYHARD) {
|
||||
elsif ($rc == DENY_DISCONNECT) {
|
||||
$msg ||= $from->format . ', denied';
|
||||
$self->log(LOGINFO, "deny mail from " . $from->format . " ($msg)");
|
||||
$self->respond(550, $msg);
|
||||
$self->disconnect;
|
||||
}
|
||||
elsif ($rc == DENYSOFTHARD) {
|
||||
elsif ($rc == DENYSOFT_DISCONNECT) {
|
||||
$msg ||= $from->format . ', temporarily denied';
|
||||
$self->log(LOGINFO, "denysoft mail from " . $from->format . " ($msg)");
|
||||
$self->respond(450, $msg);
|
||||
@ -273,13 +273,13 @@ sub rcpt {
|
||||
$msg ||= 'relaying denied';
|
||||
return $self->respond(450, $msg);
|
||||
}
|
||||
elsif ($rc == DENYHARD) {
|
||||
elsif ($rc == DENY_DISCONNECT) {
|
||||
$msg ||= 'delivery denied';
|
||||
$self->log(LOGINFO, "delivery denied ($msg)");
|
||||
$self->respond(550, $msg);
|
||||
$self->disconnect;
|
||||
}
|
||||
elsif ($rc == DENYSOFTHARD) {
|
||||
elsif ($rc == DENYSOFT_DISCONNECT) {
|
||||
$msg ||= 'relaying denied';
|
||||
$self->log(LOGINFO, "delivery denied ($msg)");
|
||||
$self->respond(450, $msg);
|
||||
|
Loading…
Reference in New Issue
Block a user