From ac376efeeee2c2cb603fa2a9feca84d8f7c9a478 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 1 Mar 2021 16:04:37 +0000 Subject: [PATCH] [Minor] Dmarc: Properly name a symbol --- src/libserver/rspamd_symcache.c | 8 +++++--- src/plugins/lua/dmarc.lua | 9 ++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c index 1b02b62a8..6615cb14e 100644 --- a/src/libserver/rspamd_symcache.c +++ b/src/libserver/rspamd_symcache.c @@ -1441,9 +1441,11 @@ rspamd_symcache_validate_cb (gpointer k, gpointer v, gpointer ud) } if (!ghost && skipped) { - item->type |= SYMBOL_TYPE_SKIPPED; - msg_warn_cache ("symbol %s has no score registered, skip its check", - item->symbol); + if (!(item->type & SYMBOL_TYPE_SKIPPED)) { + item->type |= SYMBOL_TYPE_SKIPPED; + msg_warn_cache ("symbol %s has no score registered, skip its check", + item->symbol); + } } if (ghost) { diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index 2ef82a0e5..63c92d64f 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -1381,12 +1381,15 @@ if dkim_opts then end local id = rspamd_config:register_symbol({ - name = 'DMARC_CALLBACK', -- why is it called 'CALLBACK' not 'CHECK' :( + name = 'DMARC_CHECK', type = 'callback', - group = 'policies', - groups = {'dmarc'}, callback = dmarc_callback }) +rspamd_config:register_symbol({ + name = 'DMARC_CALLBACK', -- compatibility symbol + type = 'virtual,skip', + parent = id, +}) rspamd_config:register_symbol({ name = dmarc_symbols['allow'], parent = id, -- 2.39.5