Merge pull request #245 from msimerson/frank
badrcpt use reason, and defined-ness test
This commit is contained in:
commit
8f4029481a
@ -66,12 +66,9 @@ sub hook_rcpt {
|
|||||||
if ($self->is_match($to, lc($bad), $host)) {
|
if ($self->is_match($to, lc($bad), $host)) {
|
||||||
$self->adjust_karma(-2);
|
$self->adjust_karma(-2);
|
||||||
if ($reason) {
|
if ($reason) {
|
||||||
return DENY, "mail to $bad not accepted here";
|
return DENY, $reason;
|
||||||
}
|
|
||||||
else {
|
|
||||||
return Qpsmtpd::DSN->no_such_user(
|
|
||||||
"mail to $bad not accepted here");
|
|
||||||
}
|
}
|
||||||
|
return Qpsmtpd::DSN->no_such_user("mail to $bad not accepted here");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$self->log(LOGINFO, 'pass');
|
$self->log(LOGINFO, 'pass');
|
||||||
|
@ -230,7 +230,7 @@ sub hook_connect {
|
|||||||
return DECLINED;
|
return DECLINED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($ENV{RELAYCLIENT}) {
|
if (defined $ENV{RELAYCLIENT}) {
|
||||||
$self->qp->connection->relay_client(1);
|
$self->qp->connection->relay_client(1);
|
||||||
$self->log(LOGINFO, "pass, enabled by env");
|
$self->log(LOGINFO, "pass, enabled by env");
|
||||||
return DECLINED;
|
return DECLINED;
|
||||||
|
Loading…
Reference in New Issue
Block a user