]> source.dussan.org Git - rspamd.git/commitdiff
[Conf] Slashing change: add settings configuration to the vanilla set
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 18 Sep 2018 16:01:32 +0000 (17:01 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 18 Sep 2018 16:01:32 +0000 (17:01 +0100)
conf/common.conf
conf/settings.conf [new file with mode: 0644]

index 6a50099f97e364c7998fbf827f7cba246e4c1c18..549af73a0cc4cc83f9283f704cf1a61a094e0706 100644 (file)
@@ -25,6 +25,9 @@ lua = "$RULESDIR/rspamd.lua"
 
 .include "$CONFDIR/modules.conf"
 
+# Include users settings
+.include "$CONFDIR/settings.conf"
+
 # User local settings
 .include(try=true) "$LOCAL_CONFDIR/rspamd.conf.local"
 .include(try=true,priority=10) "$LOCAL_CONFDIR/rspamd.conf.local.override"
diff --git a/conf/settings.conf b/conf/settings.conf
new file mode 100644 (file)
index 0000000..c03c134
--- /dev/null
@@ -0,0 +1,64 @@
+# You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine
+# parameters defined on the top level
+#
+# You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add
+# parameters defined on the top level
+#
+# For specific modules or configuration you can also modify
+# '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults
+# '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults
+#
+# See https://rspamd.com/doc/tutorials/writing_rules.html for details
+
+# If you want to use settings map, then please define something like:
+#
+#   settings = "http://example.com/settings.json"
+#
+# in rspamd.conf.override
+
+settings {
+/* Commented out
+  # Some examples below (define in local.d/settings.conf without `settings {}`!)
+  some_users {
+    id = "some_users";
+    priority = high;
+    from = "@example.com";
+    rcpt = "admin";
+    rcpt = "/user.*/";
+    ip = "172.16.0.0/16";
+    user = "@example.net";
+    request_header = {
+      "MTA-Tag" = "\.example\.net$";
+    }
+    apply {
+      symbol1 = 10.0;
+      symbol2 = 0.0;
+      actions {
+        reject = 100.0;
+        greylist = 10.0;
+        "add header" = 5.0; # Please note the space, NOT an underscore
+      }
+    }
+    # Always add these symbols when settings rule has matched
+    symbols [
+      "symbol2", "symbol4"
+    ]
+  }
+  whitelist {
+    priority = low;
+    rcpt = "postmaster@example.com";
+    want_spam = yes;
+  }
+  # Disable some checks for authenticated users
+  authenticated {
+    priority = high;
+    authenticated = yes;
+    apply {
+      groups_disabled = ["rbl", "spf"];
+    }
+  }
+  # End of example
+*/
+  .include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/settings.conf"
+  .include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/settings.conf"
+}
\ No newline at end of file