]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not load ARC plugin if dkim module is disabled
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 12 Jul 2017 07:11:56 +0000 (08:11 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 12 Jul 2017 07:40:32 +0000 (08:40 +0100)
src/plugins/lua/arc.lua

index f8ff800e037176106fdae35a0dedc5bd9531b6f3..997551c0807c0662eefcc52901cd896903838b24 100644 (file)
@@ -29,11 +29,22 @@ if confighelp then
 end
 
 local N = 'arc'
+
+if not rspamd_plugins.dkim then
+  rspamd_logger.errx(rspamd_config, "cannot enable arc plugin: dkim is disabled")
+  return
+end
+
 local dkim_verify = rspamd_plugins.dkim.verify
 local dkim_sign = rspamd_plugins.dkim.sign
 local dkim_canonicalize = rspamd_plugins.dkim.canon_header_relaxed
 local redis_params
 
+if not dkim_verify or not dkim_sign or not dkim_canonicalize then
+  rspamd_logger.errx(rspamd_config, "cannot enable arc plugin: dkim is disabled")
+  return
+end
+
 local arc_symbols = {
   allow = 'ARC_ALLOW',
   invalid = 'ARC_INVALID',