i have some kid policy grouped by users, domains etc etc, so i need write somes rules for example : i need restrict users to send/receive messages from/to local domain only
priority = 10;
map = "${LOCAL_CONFDIR}/custom/local_delivery_only_domain.map"; #contains a list of internal users
type = "rcpt";
from = "/^((?!.*@mydomain\.com\.mx).)*$/"; # my local domain
apply "default" {
MAILCOW_BLACK = 9999.0;
symbols [ "MAILCOW_BLACK" ];
description = "This account only can send/Receive from local domain";
message = "This account only can send/Receive from local domain";
when i use this rule with rcpt = “email@mydomain.com.mx”; it work but when try to use a map to evaluate each address in file it are applied to all address on my domain….. i write similar rule and change rcpt by from to evaluate in other direction but have same result.
I’m new with rspamd
i’m testing but no result i need other rules to evaluate and restrict various user grouped in map only can send to some domain specified in a map too.
ex.
RESTRICTED_OTHER_DOMAINS {
type = “combined”;
prefilter = true;
action = “reject”;
message = “only permit certain domains”;
rules = {
user = {
map = “/etc/rspamd/override.d/other_users.map”;
selector = “user”;
}
rcpt = {
map = “/etc/rspamd/override.d/other_domains.map”;
selector = “rcpts:domain”;
}
};
expression = “user & rcpt”;
}