aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-03-01 16:04:37 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-03-01 16:04:37 +0000
commitac376efeeee2c2cb603fa2a9feca84d8f7c9a478 (patch)
tree471741e6138f7f8f03abcc37e6741bfb848d0d11
parentb14e9419ca91f289fa717ce27da99819197ee57f (diff)
downloadrspamd-ac376efeeee2c2cb603fa2a9feca84d8f7c9a478.tar.gz
rspamd-ac376efeeee2c2cb603fa2a9feca84d8f7c9a478.zip
[Minor] Dmarc: Properly name a symbol
-rw-r--r--src/libserver/rspamd_symcache.c8
-rw-r--r--src/plugins/lua/dmarc.lua9
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,13 +1381,16 @@ 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,
group = 'policies',