From e31bb83889c11f408609b16461b821a07385cc7d Mon Sep 17 00:00:00 2001 From: Andrew Lewis Date: Mon, 22 Dec 2025 18:26:07 +0200 Subject: [PATCH] [Minor] confighelp: Lua compatibility, remove bogus elements --- lualib/rspamadm/confighelp.lua | 2 +- src/plugins/lua/antivirus.lua | 1 - src/plugins/lua/external_services.lua | 3 +-- src/plugins/lua/p0f.lua | 4 ++-- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lualib/rspamadm/confighelp.lua b/lualib/rspamadm/confighelp.lua index dedc844ca9..0d01030bee 100644 --- a/lualib/rspamadm/confighelp.lua +++ b/lualib/rspamadm/confighelp.lua @@ -25,7 +25,7 @@ parser:flag "--no-examples" local function maybe_print_color(key) if not opts['no-color'] then - return ansicolors.white .. key .. ansicolors.reset + return string.format('%s%s%s', ansicolors.white, key, ansicolors.reset) else return key end diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 1d4b834935..a846f077d5 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -59,7 +59,6 @@ if confighelp then # if `patterns` is specified virus name will be matched against provided regexes and the related # 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. diff --git a/src/plugins/lua/external_services.lua b/src/plugins/lua/external_services.lua index 489b0af7d6..b43fefba26 100644 --- a/src/plugins/lua/external_services.lua +++ b/src/plugins/lua/external_services.lua @@ -46,12 +46,11 @@ if confighelp then # if `patterns` is specified virus name will be matched against provided regexes and the related # 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 { - #GEN1 = "application\/octet-stream"; + GEN1 = "application\/octet-stream"; DOC2 = "application\/msword"; DOC3 = "application\/vnd\.ms-word.*"; XLS = "application\/vnd\.ms-excel.*"; diff --git a/src/plugins/lua/p0f.lua b/src/plugins/lua/p0f.lua index 727e6d1bb4..8c681fa4e3 100644 --- a/src/plugins/lua/p0f.lua +++ b/src/plugins/lua/p0f.lua @@ -45,8 +45,8 @@ if confighelp then # Symbol will be yielded on OS string, link type or distance matches patterns = { WINDOWS = '^Windows.*'; - #DSL = '^DSL$'; - #DISTANCE10 = '^distance:10$'; + DSL = '^DSL$'; + DISTANCE10 = '^distance:10$'; } # Cache lifetime in seconds (default - 2 hours) -- 2.47.3