From 04adaf3f61052fbd6f59b6a1fad35f3ec7d22a1f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 9 Oct 2014 01:11:28 +0100 Subject: [PATCH] Honor one_shot setting for symbols. --- src/libmime/filter.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libmime/filter.c b/src/libmime/filter.c index c7258f1bf..091887839 100644 --- a/src/libmime/filter.c +++ b/src/libmime/filter.c @@ -138,6 +138,13 @@ insert_metric_result (struct rspamd_task *task, /* Add metric score */ if ((s = g_hash_table_lookup (metric_res->symbols, symbol)) != NULL) { + if (sdef && sdef->one_shot) { + /* + * For one shot symbols we do not need to add them again, so + * we just force single behaviour here + */ + single = TRUE; + } if (s->options && opts && opts != s->options) { /* Append new options */ s->options = g_list_concat (s->options, g_list_copy (opts)); -- 2.39.5