Hi,
Yes, it's possible to block all emails from a specific domain using Rspamd, which is the spam filtering system Enhance uses.
To block emails from an entire domain like tabletwise.com (e.g., vp@mail.tabletwise.com, info@tabletwise.com, etc.), you can create a custom multimap rule in Rspamd. Here's how to do it:
Steps to Block a Domain in Rspamd
Access your server where Rspamd is installed.
Edit the multimap configuration file (usually located at /etc/rspamd/local.d/multimap.conf) and add:
domain_blacklist {
type = "from";
filter = "email:domain";
map = "/etc/rspamd/blacklisted_domains.map";
action = "reject";
description = "Blocked domain";
}
Create the domain blacklist map file at /etc/rspamd/blacklisted_domains.map and add the domain:
tabletwise.com
Restart Rspamd to apply the changes:
systemctl restart rspamd
Once applied, Rspamd will reject any email from tabletwise.com with a proper SMTP 5xx rejection code.
If you prefer to just flag the messages instead of rejecting them outright, you can replace action = "reject" with action = "add_header" to tag them as spam instead.
Best regards.