From: Andrew Lewis Date: Mon, 22 Dec 2025 16:26:07 +0000 (+0200) Subject: [Minor] confighelp: Lua compatibility, remove bogus elements X-Git-Tag: 3.14.3~34^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5805%2Fhead;p=thirdparty%2Frspamd.git [Minor] confighelp: Lua compatibility, remove bogus elements --- 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)