aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Rosenberg <c.rosenberg@heinlein-support.de>2019-04-02 06:38:54 +0200
committerCarsten Rosenberg <c.rosenberg@heinlein-support.de>2019-04-02 06:38:54 +0200
commit2f118ada4e5ea26ab6d395346661f713668b099b (patch)
treebd638290b7a8c8a5361d9e0fdf64b6328774067f
parent633e5513e27b1ea14b6f152ef72a5498b6b1f825 (diff)
downloadrspamd-2f118ada4e5ea26ab6d395346661f713668b099b.tar.gz
rspamd-2f118ada4e5ea26ab6d395346661f713668b099b.zip
[Minor] fix some warnings
-rw-r--r--conf/modules.d/external_services.conf2
-rw-r--r--lualib/lua_scanners/oletools.lua4
-rw-r--r--src/plugins/lua/spamtrap.lua2
3 files changed, 3 insertions, 5 deletions
diff --git a/conf/modules.d/external_services.conf b/conf/modules.d/external_services.conf
index a4f9a6aea..98c79b4d0 100644
--- a/conf/modules.d/external_services.conf
+++ b/conf/modules.d/external_services.conf
@@ -29,7 +29,6 @@ external_services {
# symbol will be yielded if a match is found. If no match is found, default symbol is yielded.
patterns {
# symbol_name = "pattern";
- JUST_EICAR = "^Eicar-Test-Signature$";
}
# mime-part regex matching in content-type or filename
mime_parts_filter_regex {
@@ -83,7 +82,6 @@ external_services {
# symbol will be yielded if a match is found. If no match is found, default symbol is yielded.
patterns {
# symbol_name = "pattern";
- JUST_EICAR = "^Eicar-Test-Signature$";
}
# `whitelist` points to a map of IP addresses. Mail from these addresses is not scanned.
whitelist = "/etc/rspamd/antivirus.wl";
diff --git a/lualib/lua_scanners/oletools.lua b/lualib/lua_scanners/oletools.lua
index a17840305..d16c1877f 100644
--- a/lualib/lua_scanners/oletools.lua
+++ b/lualib/lua_scanners/oletools.lua
@@ -130,10 +130,10 @@ local function oletools_check(task, content, digest, rule)
rspamd_logger.errx(task, '%s: Error message: %s',
rule.log_prefix, result[2]['message'])
oletools_requery(oletools_rc[result[3]['return_code']])
- elseif #result[2]['analysis'] == 0 and #result[2]['macros'] == 0 then
+ elseif type(result[2]['analysis']) == 'table' and #result[2]['analysis'] == 0 and #result[2]['macros'] == 0 then
rspamd_logger.warnx(task, '%s: maybe unhandled python or oletools error', rule.log_prefix)
common.yield_result(task, rule, 'oletools unhandled error', 0.0, 'fail')
- elseif result[2]['analysis'] == 'null' and #result[2]['macros'] == 0 then
+ elseif type(result[2]['analysis']) ~= 'table' and #result[2]['macros'] == 0 then
common.save_av_cache(task, digest, rule, 'OK')
common.log_clean(task, rule, 'No macro found')
elseif #result[2]['macros'] > 0 then
diff --git a/src/plugins/lua/spamtrap.lua b/src/plugins/lua/spamtrap.lua
index 97107c275..ab39b42e6 100644
--- a/src/plugins/lua/spamtrap.lua
+++ b/src/plugins/lua/spamtrap.lua
@@ -184,7 +184,7 @@ if opts then
local id = rspamd_config:register_symbol({
name = "SPAMTRAP_CHECK",
- type = "postfilter",
+ type = "callback,postfilter",
callback = spamtrap_cb
})
rspamd_config:register_symbol({