end
end
- if rule['selector'] then
- local sel = selectors_cache[rule_name]
- if not sel then
- sel = lua_selectors.create_selector_closure(rspamd_config, rule.selector,
- rule.delimiter or "")
-
- if sel then
- selectors_cache[rule_name] = sel
- end
- end
-
- if sel then
- if sel(task) then
- res = true
- end
- end
+ if rule.selector then
+ res = rule.selector(task)
end
if res then
end
end
+ if elt['selector'] then
+ local sel = selectors_cache[name]
+ if not sel then
+ sel = lua_selectors.create_selector_closure(rspamd_config, elt.selector,
+ elt.delimiter or "")
+
+ if sel then
+ selectors_cache[name] = sel
+ end
+ end
+
+ if sel then
+ out['selector'] = sel
+ end
+ end
+
-- Now we must process actions
if elt['symbols'] then out['symbols'] = elt['symbols'] end
if elt['id'] then