summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/antivirus.lua8
-rw-r--r--src/plugins/lua/external_services.lua8
2 files changed, 16 insertions, 0 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua
index c73e4fa2f..dba472c50 100644
--- a/src/plugins/lua/antivirus.lua
+++ b/src/plugins/lua/antivirus.lua
@@ -197,6 +197,14 @@ if opts and type(opts) == 'table' then
t.type = 'normal'
end
+ t.augmentations = {}
+
+ if type(m.timeout) == 'number' then
+ -- Here, we ignore possible DNS timeout and timeout from multiple retries
+ -- as these situations are not usual nor likely for the antivirus module
+ table.insert(t.augmentations, string.format("timeout=%f", m.timeout))
+ end
+
local id = rspamd_config:register_symbol(t)
rspamd_config:register_symbol({
diff --git a/src/plugins/lua/external_services.lua b/src/plugins/lua/external_services.lua
index bafcc9eec..96e6b9e94 100644
--- a/src/plugins/lua/external_services.lua
+++ b/src/plugins/lua/external_services.lua
@@ -227,6 +227,14 @@ if opts and type(opts) == 'table' then
t.type = 'normal'
end
+ t.augmentations = {}
+
+ if type(m.timeout) == 'number' then
+ -- Here, we ignore possible DNS timeout and timeout from multiple retries
+ -- as these situations are not usual nor likely for the external_services module
+ table.insert(t.augmentations, string.format("timeout=%f", m.timeout))
+ end
+
local id = rspamd_config:register_symbol(t)
if m.symbol_fail then