aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCarsten Rosenberg <c.rosenberg@heinlein-support.de>2018-09-28 10:24:26 +0200
committerCarsten Rosenberg <c.rosenberg@heinlein-support.de>2018-09-28 10:24:26 +0200
commit02bcd241a401e8777ecd28fdec65a0f50efac431 (patch)
treeae72d978d5508ef211a19bce9dcb02914efb837a /src
parentbb58fb5440a4bc4dc02abbf7f61faa9bf01f17b6 (diff)
downloadrspamd-02bcd241a401e8777ecd28fdec65a0f50efac431.tar.gz
rspamd-02bcd241a401e8777ecd28fdec65a0f50efac431.zip
[Minor] Antivirus - workaround for removed attachments_only
Diffstat (limited to 'src')
-rw-r--r--src/plugins/lua/antivirus.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua
index 047035fc1..760a26dcc 100644
--- a/src/plugins/lua/antivirus.lua
+++ b/src/plugins/lua/antivirus.lua
@@ -829,6 +829,14 @@ local function add_antivirus_rule(sym, opts)
opts['symbol_fail'] = string.upper(opts['type']) .. '_FAIL'
end
+ -- WORKAROUND for deprecated attachments_only
+ if opts['attachments_only'] ~= nil then
+ opts['scan_mime_parts'] = opts['attachments_only']
+ rspamd_logger.warnx(rspamd_config, '%s [%s]: Using attachments_only is deprecated. '..
+ 'Please use scan_mime_parts = %s instead', opts['symbol'], opts['type'], opts['attachments_only'])
+ end
+ -- WORKAROUND for deprecated attachments_only
+
if not cfg then
rspamd_logger.errx(rspamd_config, 'unknown antivirus type: %s',
opts['type'])