]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Dmarc: Properly name a symbol
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 1 Mar 2021 16:04:37 +0000 (16:04 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 1 Mar 2021 16:04:37 +0000 (16:04 +0000)
src/libserver/rspamd_symcache.c
src/plugins/lua/dmarc.lua

index 1b02b62a8d9e68f4c94d43b7429b90d219b962d3..6615cb14ec2df75faa7f6738567aaa74e5551dfc 100644 (file)
@@ -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) {
index 2ef82a0e549205843350069c875648cf0024b801..63c92d64f48e8b747fb02e160134045aa3ce1a2f 100644 (file)
@@ -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,