[Rspamd-Users] Error adding custom rules (SENDER_DOMAIN_BLACKLIST)
Gerald Galster
list+rspamd at gcore.biz
Thu May 22 00:43:11 UTC 2025
> I'm trying to block unwanted domains and have made this entry in my
> /etc/rspamd/local.d/multimap.conf
>
> SENDER_DOMAIN_BLACKLIST {
> type = "smtp_from";
^^^ no such type
> filter = "email:domain";
> map = "${LOCAL_CONFDIR}/local.d/maps.d/sender_domain_blacklist.map";
> action = "reject";
> prefilter = true;
> priority = 100;
^^^ remove
> messages = "This sender domain is blocked!";
^^^ message, not messages
> symbol = "BLACKLISTED_DOMAIN";
^^^ remove (SENDER_DOMAIN_BLACKLIST is probably sufficient already)
score is missing (unless metrics.conf/groups.conf used)
> }
Try this (copy & paste):
SENDER_DOMAIN_BLACKLIST {
type = "from";
extract_from = "smtp";
filter = "email:domain";
map = "${LOCAL_CONFDIR}/local.d/maps.d/sender_domain_blacklist.map";
action = "reject";
prefilter = true;
message = "This sender domain is blocked!";
score = 1.0;
}
Hint:
extract_from - attribute extracts values of the sender/recipient
from the SMTP dialog or the From/To header. To achieve this, set
the value to smtp, mime, or both to match both sources.
It's important to note that extract_from is solely utilized in
conjunction with the from or rcpt map type.
Best regards,
Gerald
More information about the Users
mailing list