commit 9716dc8: [Minor] Improve documentation
Vsevolod Stakhov
vsevolod at highsecure.ru
Wed Jan 26 21:00:04 UTC 2022
Author: Vsevolod Stakhov
Date: 2022-01-26 20:58:56 +0000
URL: https://github.com/rspamd/rspamd/commit/9716dc82c293895a17fb9be87eac135ebd39f4a3 (HEAD -> master)
[Minor] Improve documentation
---
src/lua/lua_config.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
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)
*/
More information about the Commits
mailing list