I tried with some combined map in RSPAMD like below:
restricted_local_senders {
type = "combined";
prefilter = true;
regexp = true;
action = "reject";
rules {
user {
map = "/etc/rspamd/override.d/local_restricted_users.map";
selector = "user";
}
rcpt = {
map = "/etc/rspamd/override.d/allowed_domains_restricted_users.map";
selector = "rcpts:domain";
}
}
expression = "user & rcpt"
}
local_restricted_users.map contains internal user Email IDs and allowed_domains_restricted_users.map contains domains.
Well as Action is REJECT currently it is working fine.
Just want to know how can I make it reverse… like instead of reject it only allows sending of emails to specified domains. (Changing action to “accept” opens everything.)
Also raised the same query to rspamd if anyone helps (https://github.com/rspamd/rspamd/discussions/4407)