rspamd 一些常见配置记录

这里面记录一些常见的配置 https://www.rspamd.com/doc/modules/multimap.htmlhtml

经过multimap 来设置全局的黑白名单,读取/etc/rspamd/whitelist 里面的domain或者user,以DWL(在metrics.conf 定义)评分express

modules.conf 添加mutilmap,这里面定义一个规则sass

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 里面添加白名单记录,域名前面加@dom

@abc.com
test@abc.com

metrics.conf 里面定义规则,WDWL=> 白名单,WDBL=>黑名单atom

symbol {
        weight = -99;
        description = "domain in whitelist";
        name = "WDWL";
    }
symbol {
        weight = 99;
        description = "domain in blacklist";
        name = "WDBL";
    }
相关文章
相关标签/搜索