Commit 2d07e00e authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Pulled in r327 from trunk

* Fixed logging of verdict in quotas module
parent e1b95b9f
......@@ -458,22 +458,56 @@ sub check {
$sessionData->{'Helo'},
$sessionData->{'Sender'},
$sessionData->{'Recipient'});
return CBP_CONTINUE;
} if ($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);
} if ($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'");
$server->maillog("module=Quotas, action=none, host=%s, helo=%s, from=%s, to=%s, reason=invalid_verdict",
$sessionData->{'ClientAddress'},
$sessionData->{'Helo'},
$sessionData->{'Sender'},
$sessionData->{'Recipient'});
return $server->protocol_response(PROTO_DATA_ERROR);
}
}
......
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