summaryrefslogtreecommitdiffstats
path: root/src/libmime
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-25 18:14:36 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-25 18:14:36 +0100
commit09e125bdc94c80b0582155d45b055fa84627e20d (patch)
treefac0db24c254d50fa46cac819bd07e005c01e03e /src/libmime
parent2edb82c0e02cab3f2111ac5a8d792c2eeeb18642 (diff)
downloadrspamd-09e125bdc94c80b0582155d45b055fa84627e20d.tar.gz
rspamd-09e125bdc94c80b0582155d45b055fa84627e20d.zip
Fix settings for actions other than reject
Diffstat (limited to 'src/libmime')
-rw-r--r--src/libmime/filter.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libmime/filter.c b/src/libmime/filter.c
index 4d8e15e48..c24f42f35 100644
--- a/src/libmime/filter.c
+++ b/src/libmime/filter.c
@@ -372,13 +372,17 @@ get_specific_action_score (const ucl_object_t *metric,
struct metric_action *action)
{
const ucl_object_t *act, *sact;
+ const gchar *act_name;
double score;
if (metric) {
act = ucl_object_find_key (metric, "actions");
if (act) {
- sact = ucl_object_find_key (act, rspamd_action_to_str (action->action));
+ act_name = rspamd_action_to_str (action->action);
+ sact = ucl_object_find_key (act, act_name);
if (sact != NULL && ucl_object_todouble_safe (sact, &score)) {
+ msg_debug ("found override score %.2f for action %s in settings",
+ score, act_name);
return score;
}
}