static GList *custom_commands = NULL;
- static gchar *
- rspamd_protocol_header_dup (struct rspamd_task *task, GString *h)
- {
- gchar *res;
-
- g_assert (h != NULL);
- g_assert (h->len > 0);
-
- res = rspamd_mempool_alloc (task->task_pool, h->len + 1);
- rspamd_strlcpy (res, h->str, h->len + 1);
-
- return res;
- }
-
/*
* Remove <> from the fixed string and copy it to the pool
*/
};
static struct chartable_ctx *chartable_module_ctx = NULL;
-
-static gint chartable_mime_filter (struct rspamd_task *task);
static void chartable_symbol_callback (struct rspamd_task *task, void *unused);
gint
chartable_module_ctx->threshold = DEFAULT_THRESHOLD;
}
- register_symbol (&cfg->cache,
+ register_symbol (cfg->cache,
chartable_module_ctx->symbol,
1,
chartable_symbol_callback,
"trusted_only option is set and no trusted domains are defined; disabling dkim module completely as it is useless in this case");
}
else {
- register_symbol (&cfg->cache,
+ register_symbol (cfg->cache,
dkim_module_ctx->symbol_reject,
1,
dkim_symbol_callback,
NULL);
- register_virtual_symbol (&cfg->cache,
+ register_virtual_symbol (cfg->cache,
dkim_module_ctx->symbol_tempfail,
1);
- register_virtual_symbol (&cfg->cache,
+ register_virtual_symbol (cfg->cache,
dkim_module_ctx->symbol_allow,
1);
/* Add flag to hash table */
g_hash_table_insert (rule->mappings,
GINT_TO_POINTER (map->fuzzy_flag), map);
- register_virtual_symbol (&cfg->cache, map->symbol, 1.0);
+ register_virtual_symbol (cfg->cache, map->symbol, 1.0);
}
else {
msg_err ("fuzzy_map parameter has no flag definition");
fuzzy_module_ctx->fuzzy_rules,
rule);
if (rule->symbol != fuzzy_module_ctx->default_symbol) {
- register_virtual_symbol (&cfg->cache, rule->symbol, 1.0);
+ register_virtual_symbol (cfg->cache, rule->symbol, 1.0);
}
}
}
if (fuzzy_module_ctx->fuzzy_rules != NULL) {
- register_callback_symbol (&cfg->cache, fuzzy_module_ctx->default_symbol,
+ register_callback_symbol (cfg->cache, fuzzy_module_ctx->default_symbol,
1.0, fuzzy_symbol_callback, NULL);
}
else {
res = FALSE;
}
else {
- register_symbol (&cfg->cache,
+ register_symbol (cfg->cache,
cur_item->symbol,
1,
process_regexp_item,
sizeof (struct regexp_module_item));
cur_item->symbol = ucl_object_key (value);
cur_item->lua_function = ucl_object_toclosure (value);
- register_symbol (&cfg->cache,
+ register_symbol (cfg->cache,
cur_item->symbol,
1,
process_regexp_item,
}
}
- register_symbol (&cfg->cache,
+ register_symbol (cfg->cache,
spf_module_ctx->symbol_fail,
1,
spf_symbol_callback,
NULL);
- register_virtual_symbol (&cfg->cache, spf_module_ctx->symbol_softfail, 1);
- register_virtual_symbol (&cfg->cache, spf_module_ctx->symbol_neutral, 1);
- register_virtual_symbol (&cfg->cache, spf_module_ctx->symbol_allow, 1);
+ register_virtual_symbol (cfg->cache, spf_module_ctx->symbol_softfail, 1);
+ register_virtual_symbol (cfg->cache, spf_module_ctx->symbol_neutral, 1);
+ register_virtual_symbol (cfg->cache, spf_module_ctx->symbol_allow, 1);
spf_module_ctx->spf_hash = rspamd_lru_hash_new (
cache_size,
while (g_hash_table_iter_next (&it, &k, &v)) {
bit = v;
- register_virtual_symbol (&cfg->cache, bit->symbol, 1);
+ register_virtual_symbol (cfg->cache, bit->symbol, 1);
msg_debug ("bit: %d", bit->bit);
}
}
else if (suffix->bits != NULL) {
for (i = 0; i < suffix->bits->len; i++) {
bit = &g_array_index (suffix->bits, struct surbl_bit_item, i);
- register_virtual_symbol (&cfg->cache, bit->symbol, 1);
+ register_virtual_symbol (cfg->cache, bit->symbol, 1);
}
}
else {
- register_virtual_symbol (&cfg->cache, suffix->symbol, 1);
+ register_virtual_symbol (cfg->cache, suffix->symbol, 1);
}
}
rspamd_config_get_module_opt (cfg, "surbl",
"redirector_symbol")) != NULL) {
surbl_module_ctx->redirector_symbol = ucl_obj_tostring (value);
- register_virtual_symbol (&cfg->cache,
+ register_virtual_symbol (cfg->cache,
surbl_module_ctx->redirector_symbol,
1.0);
}
surbl_module_ctx->suffixes = g_list_prepend (
surbl_module_ctx->suffixes,
new_suffix);
- register_callback_symbol (&cfg->cache,
+ register_callback_symbol (cfg->cache,
new_suffix->symbol,
1,
surbl_test_url,