From: Vsevolod Stakhov Date: Thu, 9 Oct 2014 00:11:28 +0000 (+0100) Subject: Honor one_shot setting for symbols. X-Git-Tag: 0.7.2~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04adaf3f61052fbd6f59b6a1fad35f3ec7d22a1f;p=thirdparty%2Frspamd.git Honor one_shot setting for symbols. --- diff --git a/src/libmime/filter.c b/src/libmime/filter.c index c7258f1bfd..0918878395 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));