aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAmish <3330468+amishmm@users.noreply.github.com>2023-01-26 15:54:27 +0530
committerAmish <3330468+amishmm@users.noreply.github.com>2023-01-26 15:54:27 +0530
commit05d04ed46c4c9e7e79f89b19ea4151c8dc6f0a30 (patch)
tree52ef94509336ffb843b4811ba7f07654c6b8ff68 /src
parent5da9cdea9b2dc8f6947e1a32ac79252b8e724800 (diff)
downloadrspamd-05d04ed46c4c9e7e79f89b19ea4151c8dc6f0a30.tar.gz
rspamd-05d04ed46c4c9e7e79f89b19ea4151c8dc6f0a30.zip
Set required_score = reject score and minor change to the report
Diffstat (limited to 'src')
-rw-r--r--src/client/rspamc.cxx19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/client/rspamc.cxx b/src/client/rspamc.cxx
index fc1ba0cc1..47362a5e3 100644
--- a/src/client/rspamc.cxx
+++ b/src/client/rspamc.cxx
@@ -971,14 +971,19 @@ rspamc_metric_output(FILE *out, const ucl_object_t *obj)
const auto *thresholds_obj = ucl_object_lookup(obj, "thresholds");
if (thresholds_obj && ucl_object_type(thresholds_obj) == UCL_OBJECT) {
- const auto *greylist_obj = ucl_object_lookup(thresholds_obj, "greylist");
- if (greylist_obj) {
- greylist_score = ucl_object_todouble(greylist_obj);
+ const auto *action_obj = ucl_object_lookup(thresholds_obj, "greylist");
+ if (action_obj) {
+ greylist_score = ucl_object_todouble(action_obj);
}
- const auto *add_header_obj = ucl_object_lookup(thresholds_obj, "add header");
- if (add_header_obj) {
- addheader_score = ucl_object_todouble(add_header_obj);
+ action_obj = ucl_object_lookup(thresholds_obj, "add header");
+ if (action_obj) {
+ addheader_score = ucl_object_todouble(action_obj);
+ }
+
+ action_obj = ucl_object_lookup(thresholds_obj, "reject");
+ if (action_obj) {
+ required_score = ucl_object_todouble(action_obj);
}
}
@@ -1075,7 +1080,7 @@ rspamc_metric_output(FILE *out, const ucl_object_t *obj)
if (humanreport) {
fmt::print(out, "Content analysis details: ({} points, {} required)\n\n",
emphasis_argument(score, 2),
- emphasis_argument(required_score, 2));
+ emphasis_argument(addheader_score, 2));
fmt::print(out, " pts rule name description\n");
fmt::print(out, "---- ---------------------- --------------------------------------------------\n");
}