這裏面記錄一些常見的配置 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"; }