[Rspamd-Users] How to set up custom white/blacklisting

Alexander Moisseev moiseev at mezonplus.ru
Thu Dec 17 17:27:23 UTC 2020


17.12.2020 20:02, Yves Goergen пишет:
> So I'm looking for an example configuration to achieve this pseudo-config:
> 
> if sender = alice at example.com and recipient = me at example.com then accept (whitelist)
> if sender = bob at example.com and recipient = me at example.com then deny (blacklist)
> if sender = charles at example.com and recipient = you at example.com then accept
> 
> and so on.
> 
> I've seen that Rspamd has a whitelist module and a multimap module but I couldn't figure out what they do, how they are supposed to be used and if they solve my problem at all. In those documents there is so much tech talk from the Rspamd developers and so little that a mere user of it can understand and follow. Examples and directions are greatly appreciated.
> 

You can use combined maps:
https://rspamd.com/doc/modules/multimap.html#combined-maps

Or, if you want it very simple, user settings:
https://rspamd.com/doc/configuration/settings.html

whitelist1 {
	priority = low;
	from = "alice at example.com"
	rcpt = "me at example.com";
	want_spam = yes;
}
blacklist1 {
	priority = low;
	from = "bob at example.com"
	rcpt = "me at example.com";
	apply {
		mysymbol = 100500.0;
	}
	symbols [
		"mysymbol"
	]
}
whitelist2 {
	priority = low;
	from = "charles at example.com"
	rcpt = "you at example.com";
	want_spam = yes;
}


More information about the Users mailing list