aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-09-14 16:44:00 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-09-14 16:44:00 +0100
commitf60551256f51150dde730f80b7e64cc976cebbc7 (patch)
tree3aca7916b5c46994c25b463448d74f75122826c8 /src
parente6a0b8970bd39ad1fab4cbcc7a49a16f98c52cb5 (diff)
downloadrspamd-f60551256f51150dde730f80b7e64cc976cebbc7.tar.gz
rspamd-f60551256f51150dde730f80b7e64cc976cebbc7.zip
Rework dmarc to the dependencies system.
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/dmarc.lua14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua
index ee24794dc..9a852c370 100644
--- a/src/plugins/lua/dmarc.lua
+++ b/src/plugins/lua/dmarc.lua
@@ -319,8 +319,12 @@ if dkim_opts then
check_mopt('dkim_allow_symbol', 'symbol_allow')
end
-rspamd_config:register_virtual_symbol('DMARC_POLICY_ALLOW', -1)
-rspamd_config:register_virtual_symbol('DMARC_POLICY_REJECT', 1)
-rspamd_config:register_virtual_symbol('DMARC_POLICY_QUARANTINE', 1)
-rspamd_config:register_virtual_symbol('DMARC_POLICY_SOFTFAIL', 1)
-rspamd_config:register_post_filter(dmarc_callback)
+local id = rspamd_config:register_callback_symbol('DMARC_CALLBACK', 1.0,
+ dmarc_callback)
+rspamd_config:register_virtual_symbol('DMARC_POLICY_ALLOW', -1, id)
+rspamd_config:register_virtual_symbol('DMARC_POLICY_REJECT', 1, id)
+rspamd_config:register_virtual_symbol('DMARC_POLICY_QUARANTINE', 1, id)
+rspamd_config:register_virtual_symbol('DMARC_POLICY_SOFTFAIL', 1, id)
+rspamd_config:register_dependency(id, opts['spf_allow_symbol'])
+rspamd_config:register_dependency(id, opts['dkim_allow_symbol'])
+