[Rspamd-Users] Map rcpt and from in single map

Gerald Galster list+rspamd at gcore.biz
Wed Mar 13 22:32:05 UTC 2024


> How create map to achieve the result of this rule but for multiple pairs:
> 
> creative_blacklist_name_one {
>        priority = high;
>        from = "@example.com";
>        rcpt = "@example.net";
>        apply "default" {
>            R_DUMMY = 100.0;
> 
> but for "from" and "rcpt" values to use single map:
> key=rcpt and value=from or the opposite.
> 
> I want to create personal whitelist
> whitelist from X for user Y without the need to edit files and use maps instead.

Just a guess: a multimap, type = "selector", using a combined from/to selector.

https://rspamd.com/doc/modules/multimap.html#map-types
https://rspamd.com/doc/configuration/selectors.html#selectors-combinations

Or maybe extend some lua code. This checks if a map contains "from":
https://rspamd.com/doc/lua/rspamd_map.html

https://rspamd.com/doc/lua/rspamd_task.html#mc5168

Best regards,
Gerald


More information about the Users mailing list