Pārlūkot izejas kodu

[Minor] Dmarc: Properly name a symbol

tags/3.0
Vsevolod Stakhov pirms 3 gadiem
vecāks
revīzija
ac376efeee
2 mainītis faili ar 11 papildinājumiem un 6 dzēšanām
  1. 5
    3
      src/libserver/rspamd_symcache.c
  2. 6
    3
      src/plugins/lua/dmarc.lua

+ 5
- 3
src/libserver/rspamd_symcache.c Parādīt failu

@@ -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) {

+ 6
- 3
src/plugins/lua/dmarc.lua Parādīt failu

@@ -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,

Notiek ielāde…
Atcelt
Saglabāt