-- The ASF licenses this file to you under the Apache License, Version 2.0
-- (the "License"); you may not use this file except in compliance with
-- the License. You may obtain a copy of the License at:
---
+--
-- http://www.apache.org/licenses/LICENSE-2.0
---
+--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- The ASF licenses this file to you under the Apache License, Version 2.0
-- (the "License"); you may not use this file except in compliance with
-- the License. You may obtain a copy of the License at:
---
+--
-- http://www.apache.org/licenses/LICENSE-2.0
---
+--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- The ASF licenses this file to you under the Apache License, Version 2.0
-- (the "License"); you may not use this file except in compliance with
-- the License. You may obtain a copy of the License at:
---
+--
-- http://www.apache.org/licenses/LICENSE-2.0
---
+--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
fun.each(function(v) table.insert(spec_st,v) end, st_longsubj)
end
end
-
+
if #spec_st > 1 then
return spec_st
else
if not st:get_label() then
local st_l = st:get_param('language')
if st_l and st_l == language then
- -- Insert statfile with specified language
+ -- Insert statfile with specified language
table.insert(selected, st)
end
end
if #selected > 1 then
return selected
end
-
+
return nil
end
if plen > 0 and url_len > 0 then
local rel = url_len / plen
if rel > 0.8 then
- task:insert_result('HFILTER_URL_ONLY', (rel - 0.8) * 5.0)
+ task:insert_result('HFILTER_URL_ONLY', (rel - 0.8) * 5.0)
local lines = plain_text_part:get_lines_count()
if lines > 0 and lines < 2 then
task:insert_result('HFILTER_URL_ONELINE', 1.00)
configure = graphite_config,
push = graphite_push,
},
-}
+}
local function configure_metric_exporter()
local opts = rspamd_config:get_all_opt('metric_exporter')
local opts = rspamd_config:get_all_opt('replies')
if not (opts and type(opts) == 'table') then
rspamd_logger.infox(rspamd_config, 'module is unconfigured')
- return
+ return
end
if opts then
redis_params = rspamd_parse_redis_server('replies')
task:insert_result('DEP' .. tostring(num + 1), 1.0)
end
end
-
+
return cb_dep
end