From: Vsevolod Stakhov Date: Sat, 25 Mar 2017 12:28:46 +0000 (+0000) Subject: [Minor] Fix hostname usage in hfilter X-Git-Tag: 1.5.4~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d502e5a2f9a6bffdedc76d260c1d77374eaa92d1;p=thirdparty%2Frspamd.git [Minor] Fix hostname usage in hfilter --- diff --git a/src/plugins/lua/hfilter.lua b/src/plugins/lua/hfilter.lua index 3916f8de6a..69fa09e4f0 100644 --- a/src/plugins/lua/hfilter.lua +++ b/src/plugins/lua/hfilter.lua @@ -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