这里面记录一些常见的配置 https://www.rspamd.com/doc/modules/multimap.html
通过multimap 来设置全局的黑白名单,读取/etc/rspamd/whitelist 里面的domain或者user,以DWL(在metrics.conf 定义)评分
modules.conf 添加mutilmap,这里面定义一个规则
multimap {
wdwl {
type = "from";
map = "/etc/rspamd/whitelist";
symbol = "WDWL";
action = "accept";
}
wdbl {
type = "from";
map = "/etc/rspamd/blacklist";
symbol = "WDBL";
action = "reject";
}
}
#启用spamassassin的中文规则
spamassassin {
ruleset = "/etc/rspamd/Chinese_rules.cf";
# Limit search size to 100 kilobytes for all regular expressions
match_limit = 100k;
# Those regexp atoms will not be passed through hyperscan:
pcre_only = ["RULE1", "__RULE2"];
}
/etc/rspamd/whitelist 里面添加白名单记录,域名前面加@
@abc.com
test@abc.com
metrics.conf 里面定义规则,WDWL=> 白名单,WDBL=>黑名单
symbol {
weight = -99;
description = "domain in whitelist";
name = "WDWL";
}
symbol {
weight = 99;
description = "domain in blacklist";
name = "WDBL";
}