diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-10-09 01:11:28 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-10-09 01:11:28 +0100 |
commit | 04adaf3f61052fbd6f59b6a1fad35f3ec7d22a1f (patch) | |
tree | 86681d5a707bbb702f1100cb24ac2ca3eb76d0ea /src/libmime | |
parent | aeb484cac64fbdc876f0e1a58efa1490cdf029f5 (diff) | |
download | rspamd-04adaf3f61052fbd6f59b6a1fad35f3ec7d22a1f.tar.gz rspamd-04adaf3f61052fbd6f59b6a1fad35f3ec7d22a1f.zip |
Honor one_shot setting for symbols.
Diffstat (limited to 'src/libmime')
-rw-r--r-- | src/libmime/filter.c | 7 |
1 files changed, 7 insertions, 0 deletions
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)); |