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.6.0~352 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=02fcaa6b27444c0993eaf6ceaff6faecdeefe2c0;p=rspamd.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 80d289d45..cbbb9c2ee 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