Commit 65b4502d authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Sucked in r369 from trunk, reversion of r327

- We already output logs regarding the verdict, no use doing it again
parent 248ecb0b
......@@ -80,11 +80,11 @@ sub check {
# Check valid state & that we have our policy data
return CBP_SKIP if (!
(
($sessionData->{'ProtocolState'} eq "RCPT" && defined($sessionData->{'Policy'})) ||
($sessionData->{'ProtocolState'} eq "END-OF-MESSAGE" && defined($sessionData->{'_Recipient_To_Policy'}))
)
);
(
($sessionData->{'ProtocolState'} eq "RCPT" && defined($sessionData->{'Policy'})) ||
($sessionData->{'ProtocolState'} eq "END-OF-MESSAGE" && defined($sessionData->{'_Recipient_To_Policy'}))
)
);
# Our verdict and data
my ($verdict,$verdict_data);
......@@ -462,46 +462,16 @@ sub check {
$sessionData->{'Recipient'});
return CBP_CONTINUE;
} elsif ($verdict =~ /^defer$/i) {
$server->maillog("module=Quotas, action=defer, host=%s, helo=%s, from=%s, to=%s, reason=verdict",
$sessionData->{'ClientAddress'},
$sessionData->{'Helo'},
$sessionData->{'Sender'},
$sessionData->{'Recipient'});
return $server->protocol_response(PROTO_DEFER,$verdict_data);
} elsif ($verdict =~ /^hold$/i) {
$server->maillog("module=Quotas, action=hold, host=%s, helo=%s, from=%s, to=%s, reason=verdict",
$sessionData->{'ClientAddress'},
$sessionData->{'Helo'},
$sessionData->{'Sender'},
$sessionData->{'Recipient'});
return $server->protocol_response(PROTO_HOLD,$verdict_data);
} elsif ($verdict =~ /^reject$/i) {
$server->maillog("module=Quotas, action=reject, host=%s, helo=%s, from=%s, to=%s, reason=verdict",
$sessionData->{'ClientAddress'},
$sessionData->{'Helo'},
$sessionData->{'Sender'},
$sessionData->{'Recipient'});
return $server->protocol_response(PROTO_REJECT,$verdict_data);
} elsif ($verdict =~ /^discard$/i) {
$server->maillog("module=Quotas, action=discard, host=%s, helo=%s, from=%s, to=%s, reason=verdict",
$sessionData->{'ClientAddress'},
$sessionData->{'Helo'},
$sessionData->{'Sender'},
$sessionData->{'Recipient'});
return $server->protocol_response(PROTO_DISCARD,$verdict_data);
} elsif ($verdict =~ /^filter$/i) {
$server->maillog("module=Quotas, action=filter, host=%s, helo=%s, from=%s, to=%s, reason=verdict",
$sessionData->{'ClientAddress'},
$sessionData->{'Helo'},
$sessionData->{'Sender'},
$sessionData->{'Recipient'});
return $server->protocol_response(PROTO_FILTER,$verdict_data);
} elsif ($verdict =~ /^redirect$/i) {
$server->maillog("module=Quotas, action=redirect, host=%s, helo=%s, from=%s, to=%s, reason=verdict",
$sessionData->{'ClientAddress'},
$sessionData->{'Helo'},
$sessionData->{'Sender'},
$sessionData->{'Recipient'});
return $server->protocol_response(PROTO_REDIRECT,$verdict_data);
} else {
$server->log(LOG_ERR,"[QUOTAS] Unknown Verdict specification in access control '$verdict'");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment