diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-08 11:42:44 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-08 11:42:44 +0100 |
commit | 19598026fd121cc6b9aa2bd4eda14b5ebf616866 (patch) | |
tree | 9227755b7bdd253cb8f9dcc31b0ad1ffb6fb0c6d /src | |
parent | ac9751f06a1fd97d264772b294c4c4de3728fee9 (diff) | |
download | rspamd-19598026fd121cc6b9aa2bd4eda14b5ebf616866.tar.gz rspamd-19598026fd121cc6b9aa2bd4eda14b5ebf616866.zip |
[Feature] Improve AV results caching
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/antivirus.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index dbc235eeb..8d84887d0 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -91,6 +91,9 @@ local function add_antivirus_rule(sym, opts) if not opts.symbol_encrypted then opts.symbol_encrypted = opts.symbol .. '_ENCRYPTED' end + if not opts.symbol_macro then + opts.symbol_macro = opts.symbol .. '_MACRO' + end -- WORKAROUND for deprecated attachments_only if opts.attachments_only ~= nil then @@ -180,6 +183,13 @@ if opts and type(opts) == 'table' then score = 0.0, group = N }) + rspamd_config:register_symbol({ + type = 'virtual', + name = m['symbol_macro'], + parent = id, + score = 0.0, + group = N + }) has_valid = true if type(m['patterns']) == 'table' then if m['patterns'][1] then |