add DENYSOFTHARD status
git-svn-id: https://svn.perl.org/qpsmtpd/trunk@240 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
7cc66cdf75
commit
48d753ca25
@ -10,11 +10,13 @@ use vars qw($VERSION @ISA @EXPORT);
|
|||||||
@EXPORT = (@common, @loglevels);
|
@EXPORT = (@common, @loglevels);
|
||||||
|
|
||||||
use constant OK => 900;
|
use constant OK => 900;
|
||||||
use constant DENY => 901;
|
use constant DENY => 901; # 550
|
||||||
use constant DENYSOFT => 902;
|
use constant DENYSOFT => 902; # 450
|
||||||
|
use constant DENYHARD => 903; # 550 + disconnect
|
||||||
|
use constant DENYSOFTHARD => 904; # 450 + disconnect
|
||||||
use constant DECLINED => 909;
|
use constant DECLINED => 909;
|
||||||
use constant DONE => 910;
|
use constant DONE => 910;
|
||||||
use constant DENYHARD => 903;
|
|
||||||
|
|
||||||
# log levels
|
# log levels
|
||||||
use constant LOGDEBUG => 8;
|
use constant LOGDEBUG => 8;
|
||||||
|
@ -236,6 +236,12 @@ sub mail {
|
|||||||
$self->respond(550, $msg);
|
$self->respond(550, $msg);
|
||||||
$self->disconnect;
|
$self->disconnect;
|
||||||
}
|
}
|
||||||
|
elsif ($rc == DENYSOFTHARD) {
|
||||||
|
$msg ||= $from->format . ', temporarily denied';
|
||||||
|
$self->log(LOGINFO, "denysoft mail from " . $from->format . " ($msg)");
|
||||||
|
$self->respond(450, $msg);
|
||||||
|
$self->disconnect;
|
||||||
|
}
|
||||||
else { # includes OK
|
else { # includes OK
|
||||||
$self->log(LOGINFO, "getting mail from ".$from->format);
|
$self->log(LOGINFO, "getting mail from ".$from->format);
|
||||||
$self->respond(250, $from->format . ", sender OK - how exciting to get mail from you!");
|
$self->respond(250, $from->format . ", sender OK - how exciting to get mail from you!");
|
||||||
|
Loading…
Reference in New Issue
Block a user