I have created a map
UNPOLITE_SENDERS_MAP {
type="selector";
symbol="UNPOLITE_SENDER"
selector = 'from("smtp","orig"):domain.get_tld';
score = 3.5;
map="/etc/rspamd/local.d/maps.d/unpolite_senders_expr";
message="Detected un unusal ammount of email, please take a break";
}
and the senders are correctly matched against that map. (Can be seen in the logs)
I have tried to apply a rate limit based on that map using
other_limit = {
selector = "emails:apply_map('UNPOLITE_SENDERS_MAP')";
bucket = [{
symbol = "LOCAL_RATE_10_30";
burst = 3;
rate = "10/30s";
message = "Unusual message rate 10-30, please take a break";
}]
However that rate limit is not being applied.
The configurations are in the proper places. I cannot configure a rete based on a map and for sure I'm missing something with the selector part of the rate limit configuration.
Any ideas?