From 1cfe989b58738f9352fc73e0a9b6a6c31883e1f9 Mon Sep 17 00:00:00 2001 From: Michael Neumann Date: Mon, 30 Nov 2020 20:02:24 +0100 Subject: [PATCH] Explain the usage of the -settings-id parameter --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 7baaded..cb4403a 100644 --- a/README.md +++ b/README.md @@ -62,5 +62,34 @@ filter "rspamd" proc-exec "filter-rspamd -url http://example.org:11333" listen on all filter "rspamd" ``` +Optionally a `-settings-id` parameter can be used to select a specific rspamd +setting. One usecase is for example to apply different rspamd rules to incoming +and outgoing emails: + +``` +filter "rspamd-incoming" proc-exec "filter-rspamd" +filter "rspamd-outgoing" proc-exec "filter-rspamd -settings-id outgoing" + +listen on all filter "rspamd-incoming" +listen on all port submission filter "rspamd-outgoing" +``` + +And in `rspamd/local.d/settings.conf`: + +``` +outgoing { + id = "outgoing"; + apply { + enable_groups = ["dkim"]; + actions { + reject = 100.0; + greylist = 100.0; + "add header" = 100.0; + } + } +} +``` + +Every email passed through the `rspamd-outgoing` filter will use the rspamd `outgoing` rule instead of the default rule. Any configuration with regard to thresholds or enabled modules must be done in rspamd itself.