@@ -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 |
@@ -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; | |||
} | |||
@@ -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); | |||
} |
@@ -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); |
@@ -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; | |||
} | |||