From: Vsevolod Stakhov Date: Wed, 26 Jan 2022 20:58:56 +0000 (+0000) Subject: [Minor] Improve documentation X-Git-Tag: 3.2~83 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9716dc82c293895a17fb9be87eac135ebd39f4a3;p=rspamd.git [Minor] Improve documentation --- 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) */