diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-08-25 14:00:29 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-08-25 14:00:29 +0100 |
commit | d224a23261ce2de4298f0e846d7b7866d841bf84 (patch) | |
tree | e593413f0eb9c1103eef9648624cdea8a17c7efa /conf/lua/hfilter.lua | |
parent | 3172ef56f69a3733c326455c906b94715ff47d40 (diff) | |
download | rspamd-d224a23261ce2de4298f0e846d7b7866d841bf84.tar.gz rspamd-d224a23261ce2de4298f0e846d7b7866d841bf84.zip |
Adopt config.
Diffstat (limited to 'conf/lua/hfilter.lua')
-rw-r--r-- | conf/lua/hfilter.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/conf/lua/hfilter.lua b/conf/lua/hfilter.lua index 18fc995c1..128c6612c 100644 --- a/conf/lua/hfilter.lua +++ b/conf/lua/hfilter.lua @@ -6,6 +6,8 @@ -- Weight for checks_hellohost and checks_hello: 5 - very hard, 4 - hard, 3 - meduim, 2 - low, 1 - very low. -- From HFILTER_HELO_* and HFILTER_HOSTNAME_* symbols the maximum weight is selected in case of their actuating. + +local rspamd_regexp = require "rspamd_regexp" local checks_hellohost = { ['[.-]dynamic[.-]'] = 5, ['dynamic[.-][0-9]'] = 5, ['[0-9][.-]?dynamic'] = 5, ['[.-]dyn[.-]'] = 5, ['dyn[.-][0-9]'] = 5, ['[0-9][.-]?dyn'] = 5, @@ -53,8 +55,8 @@ local function trim1(s) end local function check_regexp(str, regexp_text) - local re = regexp.get_cached(regexp_text) - if not re then re = regexp.create(regexp_text, 'i') end + local re = rspamd_regexp.get_cached(regexp_text) + if not re then re = rspamd_regexp.create(regexp_text, 'i') end if re:match(str) then return true end return false end |