]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Try all hostname regexps to find the most significant one
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 20 Apr 2017 19:09:06 +0000 (20:09 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 20 Apr 2017 19:09:06 +0000 (20:09 +0100)
src/plugins/lua/hfilter.lua

index 80d289d45a988054df8aaf9b02a7992e2508e096..cbbb9c2eee98c9f6e54bd437963a89068f8e3b17 100644 (file)
@@ -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