summaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorAlexey <AlexeySa@users.noreply.github.com>2014-01-31 09:49:50 -0800
committerAlexey <AlexeySa@users.noreply.github.com>2014-01-31 09:49:50 -0800
commit2330c14b922648d36df4dfdc55c4ba03a0b14c12 (patch)
tree85509fdb0b3e737447b73d720d9592bc1b2086f7 /conf
parentd117ad0fb7fec8daa45a0d6f4dc4c5d571fc05f7 (diff)
downloadrspamd-2330c14b922648d36df4dfdc55c4ba03a0b14c12.tar.gz
rspamd-2330c14b922648d36df4dfdc55c4ba03a0b14c12.zip
Optimize Hfilter
Diffstat (limited to 'conf')
-rw-r--r--conf/lua/hfilter.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/conf/lua/hfilter.lua b/conf/lua/hfilter.lua
index 3a7f812b1..db940343d 100644
--- a/conf/lua/hfilter.lua
+++ b/conf/lua/hfilter.lua
@@ -207,15 +207,16 @@ local function hfilter(task)
local weight_hostname = 0
if hostname then
-- Check regexp HOSTNAME
- for regexp,weight in pairs(checks_hellohost) do
- if check_regexp(hostname, regexp) then
- weight_hostname = weight
- break
+ if hostname == 'unknown' then
+ task:insert_result('HFILTER_HOSTNAME_NOPTR', 1.00)
+ else
+ for regexp,weight in pairs(checks_hellohost) do
+ if check_regexp(hostname, regexp) then
+ weight_hostname = weight
+ break
+ end
end
end
- if hostname == 'unknown' then
- task:insert_result('HFILTER_HOSTNAME_NOPTR', 1.00)
- end
end
--Insert weight's for HELO or HOSTNAME