]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Settings: Fix settings check flags
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 25 Jun 2019 08:53:25 +0000 (09:53 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 25 Jun 2019 08:53:25 +0000 (09:53 +0100)
src/plugins/lua/settings.lua
test/functional/cases/108_settings.robot
test/functional/configs/settings.conf

index 990fa47c376ab0b9ce3f9678b4785456b1e04b22..e3e4b8986f532eb17ff03075fa9d421c06534e11 100644 (file)
@@ -159,7 +159,7 @@ local function check_query_settings(task)
           elt.apply = lua_util.override_defaults(nset, elt.apply)
         end
         apply_settings(task, elt['apply'], settings_id)
-        rspamd_logger.infox(task, "applying settings id %s", settings_id)
+        rspamd_logger.infox(task, "applied settings id %s", settings_id)
         return true
       end
     else
@@ -955,8 +955,8 @@ end
 
 rspamd_config:register_symbol({
   name = 'SETTINGS_CHECK',
-  type = 'prefilter,nostat',
+  type = 'prefilter',
   callback = check_settings,
   priority = 10,
-  flags = 'empty',
+  flags = 'empty,nostat,explicit_disable,ignore_passthrough',
 })
index 071ad88d731ba03bddbb2fb450d6f3b9e0d80dd0..2fc27ea701cf545c909d314dc84c2767ce15f231 100644 (file)
@@ -107,7 +107,7 @@ SETTINGS ID - VIRTUAL
 
 SETTINGS ID - VIRTUAL GROUP
   ${result} =  Scan Message With Rspamc  ${MESSAGE}  --header  Settings-Id=id_virtual_group
-  Check Rspamc  ${result}  SIMPLE_VIRTUAL
+  Check Rspamc  ${result}  SIMPLE_VIRTUAL (10
   Should Not Contain  ${result.stdout}  SIMPLE_TEST
   Should Not Contain  ${result.stdout}  SIMPLE_VIRTUAL1
   Should Not Contain  ${result.stdout}  SIMPLE_POST
index 11f7139e5923d98794486a626e79815ae8b6ae60..d46c46b3069c0489226e6bdc73926a85e3720de7 100644 (file)
@@ -23,6 +23,7 @@ settings {
   id_virtual_group {
     apply {
       groups_enabled = ["vg"];
+      SIMPLE_VIRTUAL = 10.0;
     }
   }
 }