aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2022-01-26 20:58:56 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2022-01-26 20:59:31 +0000
commit9716dc82c293895a17fb9be87eac135ebd39f4a3 (patch)
treee3e3a4e1f8b5727a28ff5891766f25c14322a816
parent5ab519244d62ac4f0b915e196a06b2f161df88c2 (diff)
downloadrspamd-9716dc82c293895a17fb9be87eac135ebd39f4a3.tar.gz
rspamd-9716dc82c293895a17fb9be87eac135ebd39f4a3.zip
[Minor] Improve documentation
-rw-r--r--src/lua/lua_config.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c
index 8b0a4a46c..414f06f36 100644
--- a/src/lua/lua_config.c
+++ b/src/lua/lua_config.c
@@ -426,8 +426,18 @@ LUA_FUNCTION_DEF (config, get_key);
* @return {boolean} true if condition has been added
* @example
+local condition_map = rspamd_config:add_map{
+ type = "hash",
+ urls = ['file:///path/to/file'],
+ description = 'SMTP from map that allows FUZZY_DENIED skip for the listed addresses'
+}
rspamd_config:add_condition('FUZZY_DENIED', function(task)
- if some_map:find_key(task:get_from()) then return false end
+ local E = {}
+ -- Check for the smtp from address adding fail safe checks
+ if condition_map:find_key(((task:get_from('smtp') or E)[1] or E).addr) then
+ return false
+ end
+ -- Allow execution otherwise
return true
end)
*/