aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dkim_check.c3
-rw-r--r--src/plugins/fuzzy_check.c9
-rw-r--r--src/plugins/regexp.c2
-rw-r--r--src/plugins/spf.c3
-rw-r--r--src/plugins/surbl.c2
5 files changed, 19 insertions, 0 deletions
diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c
index da42fe14f..30dbe7b02 100644
--- a/src/plugins/dkim_check.c
+++ b/src/plugins/dkim_check.c
@@ -1235,6 +1235,9 @@ dkim_symbol_callback (struct rspamd_task *task,
rspamd_symcache_item_async_inc (task, item);
dkim_module_check (res);
}
+ else {
+ rspamd_symbols_cache_finalize_item (task, item);
+ }
}
static void
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 79ae230cf..751ee2aff 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -2897,6 +2897,8 @@ fuzzy_symbol_callback (struct rspamd_task *task,
struct fuzzy_ctx *fuzzy_module_ctx = fuzzy_get_context (task->cfg);
if (!fuzzy_module_ctx->enabled) {
+ rspamd_symbols_cache_finalize_item (task, item);
+
return;
}
@@ -2907,10 +2909,14 @@ fuzzy_symbol_callback (struct rspamd_task *task,
msg_info_task ("<%s>, address %s is whitelisted, skip fuzzy check",
task->message_id,
rspamd_inet_address_to_string (task->from_addr));
+ rspamd_symbols_cache_finalize_item (task, item);
+
return;
}
}
+ rspamd_symcache_item_async_inc (task, item);
+
PTR_ARRAY_FOREACH (fuzzy_module_ctx->fuzzy_rules, i, rule) {
commands = fuzzy_generate_commands (task, rule, FUZZY_CHECK, 0, 0, 0);
@@ -2918,6 +2924,8 @@ fuzzy_symbol_callback (struct rspamd_task *task,
register_fuzzy_client_call (task, rule, commands);
}
}
+
+ rspamd_symcache_item_async_dec_check (task, item);
}
void
@@ -3040,6 +3048,7 @@ fuzzy_process_handler (struct rspamd_http_connection_entry *conn_ent,
rspamd_task_free (task);
rspamd_controller_send_error (conn_ent, 400,
"Message processing error");
+
return;
}
diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c
index eec25fffd..c08568839 100644
--- a/src/plugins/regexp.c
+++ b/src/plugins/regexp.c
@@ -453,4 +453,6 @@ process_regexp_item (struct rspamd_task *task,
if (res) {
rspamd_task_insert_result (task, item->symbol, res, NULL);
}
+
+ rspamd_symbols_cache_finalize_item (task, symcache_item);
}
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index 1ec30b4ee..eb8b6947f 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -594,6 +594,7 @@ spf_symbol_callback (struct rspamd_task *task,
if (rspamd_match_radix_map_addr (spf_module_ctx->whitelist_ip,
task->from_addr) != NULL) {
+ rspamd_symbols_cache_finalize_item (task, item);
return;
}
@@ -601,6 +602,7 @@ spf_symbol_callback (struct rspamd_task *task,
|| (!spf_module_ctx->check_local &&
rspamd_inet_address_is_local (task->from_addr, TRUE))) {
msg_info_task ("skip SPF checks for local networks and authorized users");
+ rspamd_symbols_cache_finalize_item (task, item);
return;
}
@@ -623,6 +625,7 @@ spf_symbol_callback (struct rspamd_task *task,
spf_module_ctx->symbol_dnsfail,
1,
"(SPF): spf DNS fail");
+ rspamd_symbols_cache_finalize_item (task, item);
}
else {
rspamd_symcache_item_async_inc (task, item);
diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c
index 0717b4679..e2bf97703 100644
--- a/src/plugins/surbl.c
+++ b/src/plugins/surbl.c
@@ -1893,6 +1893,8 @@ surbl_test_url (struct rspamd_task *task,
if (!rspamd_monitored_alive (suffix->m)) {
msg_info_surbl ("disable surbl %s as it is reported to be offline",
suffix->suffix);
+ rspamd_symbols_cache_finalize_item (task, item);
+
return;
}