From: Vsevolod Stakhov Date: Thu, 20 Apr 2017 19:09:06 +0000 (+0100) Subject: [Minor] Try all hostname regexps to find the most significant one X-Git-Tag: 1.5.7~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22a544eec85560a54fedce85c24a2c7925bcd6cc;p=thirdparty%2Frspamd.git [Minor] Try all hostname regexps to find the most significant one --- diff --git a/src/plugins/lua/hfilter.lua b/src/plugins/lua/hfilter.lua index 80d289d45a..cbbb9c2eee 100644 --- a/src/plugins/lua/hfilter.lua +++ b/src/plugins/lua/hfilter.lua @@ -389,8 +389,9 @@ local function hfilter(task) else for regexp,weight in pairs(checks_hellohost) do if check_regexp(hostname, regexp) then - weight_hostname = weight - break + if weight > weight_hostname then + weight_hostname = weight + end end end end