ipv6 = true;
checks = ['from', 'received'];
is_whitelist = true;
- matcher = "luapattern";
+ returncodes_matcher = "luapattern";
whitelist_exception = "RCVD_IN_DNSWL";
whitelist_exception = "RCVD_IN_DNSWL_NONE";
whitelist_exception = "RCVD_IN_DNSWL_LOW";
rbl = "dwl.dnswl.org";
checks = ['dkim'];
ignore_whitelist = true;
- matcher = "luapattern";
+ returncodes_matcher = "luapattern";
unknown = false;
returncodes {
selector = "specific_urls_filter_map('surbl_hashbl_map', {limit = 10}).apply_methods('get_host', 'get_path').join_tables('/')",
hash = 'md5';
hash_len = 32;
- matcher = "luapattern";
+ returncodes_matcher = "luapattern";
returncodes = {
SURBL_HASHBL_PHISH = "127.0.0.8";
SURBL_HASHBL_MALWARE = "127.0.0.16";
ipv6 = ts.boolean:is_optional(),
is_whitelist = ts.boolean:is_optional(),
local_exclude_ip_map = ts.string:is_optional(),
- matcher = ts.one_of { "equality", "glob", "luapattern", "radix", "regexp" }:is_optional(),
monitored_address = ts.string:is_optional(),
no_ip = ts.boolean:is_optional(),
process_script = ts.string:is_optional(),
return_codes = return_codes_schema:is_optional(),
returnbits = return_bits_schema:is_optional(),
returncodes = return_codes_schema:is_optional(),
+ returncodes_matcher = ts.one_of { "equality", "glob", "luapattern", "radix", "regexp" }:is_optional(),
selector = ts.one_of { ts.string, ts.table }:is_optional(),
selector_flatten = ts.boolean:is_optional(),
symbol = ts.string:is_optional(),
rule.from = true
end
- if rule.returncodes and not rule.matcher then
+ if rule.returncodes and not rule.returncodes_matcher then
for _, v in pairs(rule.returncodes) do
for _, e in ipairs(v) do
if e:find('%', 1, true) then
- rspamd_logger.warnx(rspamd_config, 'implicitly enabling luapattern matcher for rule %s', rule.symbol)
- rule.matcher = 'luapattern'
+ rspamd_logger.info(rspamd_config, 'implicitly enabling luapattern returncodes_matcher for rule %s', rule.symbol)
+ rule.returncodes_matcher = 'luapattern'
break
end
end
- if rule.matcher then
+ if rule.returncodes_matcher then
break
end
end
description[#description + 1] = 'selector'
end
- if not rule.matcher then
- rule.matcher = 'equality'
+ if not rule.returncodes_matcher then
+ rule.returncodes_matcher = 'equality'
end
- local match = matchers[rule.matcher]
+ local match = matchers[rule.returncodes_matcher]
local callback_f = function(task)
-- DNS requests to issue (might be hashed afterwards)
def_type, rbl.symbol)
end
- local match_type = rbl.matcher
+ local match_type = rbl.returncodes_matcher
if match_type and rbl.returncodes and map_match_types[match_type] then
if not rbl.returncodes_maps then
rbl.returncodes_maps = {}
from = 'FAKE_RBL',
}
unknown = true;
- matcher = "regexp";
+ returncodes_matcher = "regexp";
returncodes = {
"CODE_2" = '^127\.0\.0\.2$';
"CODE_3" = '^127\.0\.0\.3$';
rbl = "fake.wl";
symbol = "FAKE_WL_RBL_UNKNOWN";
unknown = true;
- #matcher = "luapattern";
+ #returncodes_matcher = "luapattern";
returncodes = {
"FAKE_WL_RBL_CODE_2" = "127%.0%.0%.2";
"FAKE_WL_RBL_CODE_3" = "127%.0%.0%.3";
ignore_defaults = true;
emails = true;
emails_domainonly = true
- matcher = "radix";
+ returncodes_matcher = "radix";
returncodes = {
RSPAMD_EMAILBL = "127.0.0.2/32";
}
checks = ["numeric_urls"];
content_urls = true;
rbl = "test9.uribl";
- matcher = "glob";
+ returncodes_matcher = "glob";
returncodes = {
URIBL_NUMERIC_CONTENT = "*.*.*.*";
}