commit 5f19fa6: [Minor] Add some docs

Vsevolod Stakhov vsevolod at highsecure.ru
Sun Mar 15 21:00:07 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-03-15 20:57:07 +0000
URL: https://github.com/rspamd/rspamd/commit/5f19fa64711cd73f6ce5defc3eb23ddf94983ed2 (HEAD -> master)

[Minor] Add some docs

---
 src/plugins/lua/greylist.lua      | 19 +++++++++++++++++++
 src/plugins/lua/history_redis.lua | 13 +++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/src/plugins/lua/greylist.lua b/src/plugins/lua/greylist.lua
index 671b2be69..faeaaf897 100644
--- a/src/plugins/lua/greylist.lua
+++ b/src/plugins/lua/greylist.lua
@@ -36,6 +36,25 @@ greylist {
 --]]
 
 if confighelp then
+  rspamd_config:add_example(nil, 'greylist',
+      "Performs adaptive greylisting using Redis",
+      [[
+greylist {
+  expire = 1d; # Buckets expire (1 day by default)
+  timeout = 5m; # Greylisting timeout
+  key_prefix = 'rg'; # Redis prefix
+  max_data_len = 10k; # Use boy hash up to this value of bytes for greylisting
+  message = 'Try again later'; # Default greylisting message
+  symbol = 'GREYLIST'; # Append symbol
+  action = 'soft reject'; # Default action change (for Exim use `greylist`)
+  whitelist_symbols = []; # Skip greylisting if one of the following symbols has been found
+  ipv4_mask = 19; # Mask bits for ipv4
+  ipv6_mask = 64; # Mask bits for ipv6
+  report_time = false; # Tell when greylisting is expired (appended to `message`)
+  check_local = false; # Greylist local messages
+  check_authed = false; # Greylist authenticated users
+}
+  ]])
   return
 end
 
diff --git a/src/plugins/lua/history_redis.lua b/src/plugins/lua/history_redis.lua
index cc26a281e..b05df4e5d 100644
--- a/src/plugins/lua/history_redis.lua
+++ b/src/plugins/lua/history_redis.lua
@@ -15,6 +15,19 @@ limitations under the License.
 ]]--
 
 if confighelp then
+  rspamd_config:add_example(nil, 'history_redis',
+      "Store history of checks for WebUI using Redis",
+      [[
+redis_history {
+  key_prefix = 'rs_history', # default key name
+  nrows = 200; # default rows limit
+  compress = true; # use zstd compression when storing data in redis
+  subject_privacy = false; # subject privacy is off
+  subject_privacy_alg = 'blake2'; # default hash-algorithm to obfuscate subject
+  subject_privacy_prefix = 'obf'; # prefix to show it's obfuscated
+  subject_privacy_length = 16; # cut the length of the hash
+}
+  ]])
   return
 end
 


More information about the Commits mailing list