]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix hostname usage in hfilter
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 25 Mar 2017 12:28:46 +0000 (12:28 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 25 Mar 2017 12:28:46 +0000 (12:28 +0000)
src/plugins/lua/hfilter.lua

index 3916f8de6af8beafdeed8642664126486f9e57e2..69fa09e4f06f5cb420fab5e5d45e3e038df2b21c 100644 (file)
@@ -378,8 +378,9 @@ local function hfilter(task)
 
   -- Check's HOSTNAME
   local weight_hostname = 0
+  local hostname = task:get_hostname()
+
   if config['hostname_enabled'] then
-    local hostname = task:get_hostname()
     if hostname then
       -- Check regexp HOSTNAME
       if hostname == 'unknown' then