NethServer Version: NS8
Module: Mail
Hi everyone i want to reject email from certain address and specific object how can i achieve that on NS8 WebUI?
Thanks in advice
NethServer Version: NS8
Module: Mail
Hi everyone i want to reject email from certain address and specific object how can i achieve that on NS8 WebUI?
Thanks in advice
Hi,
The GUI does not support this functionality with NS8.
I’ve spent many hours reading Nethserver documentation to learn how to customize RSPAMD to block certains TLDs and email addresses, but I haven’t had any success.
Here’s what I’ve learned to date. I would appreciate if someone could either validate or provide corrections to my findings.
Based on my research, I’ve identified a significant gap in the documentation for NS8 regarding the API client, runagent and podman usage for manual customizations. While there are scattered bits of information available, none provide a comprehensive and clear guide that is truly helpful.
Kind Regards,
Dominic
Hi Denis,
I have learned how to block email addresses and top-level domains (TLDs).
sudo runagent -m mail1 podman exec -ti rspamd sh
cp /etc/rspamd/local.d/multimap.conf /etc/rspamd/override.d/multimap.conf
vi /etc/rspamd/override.d/multimap.conf
BLOCK_SENDER_FROM_TLD {
type = "from";
filter = 'top';
symbol = "BLOCK_SENDER_FROM_TLD";
prefilter = true;
map = ["${DBDIR}/local_bl_from_tld.map.inc"];
regexp = true;
description = "TLD from Blacklist";
action = "greylist";
}
BLOCK_SENDER_FROM {
type = "header";
header = "from";
filter = 'email';
symbol = "BLOCK_SENDER_FROM";
map = ["${DBDIR}/local_bl_from.map.inc"];
description = "Email Address from Blacklist";
action = "reject";
}
vi /var/lib/rspam/local_bl_from_tld.map.inc
[.]best$
vi /var/lib/rspamd/local_bl_from.map.inc
email@domain.tld
References:
NethServer / ns8-mail
RSPAMD Multimap Module
Hi Dominic, you did the right thing
Are you sure this step is needed? It looks like override.d contents are added with higher priority:
.include(try=true,priority=5) "${DBDIR}/dynamic/multimap.conf"
.include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/multimap.conf"
.include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/multimap.conf"
Files under that directory once they’re created (for example with “touch”. as an empty file) with proper ownership (chown -c rspamd:rspamd) could be managed directly from Rspamd UI. E.g.
Note also that ${DBDIR}/dynamic/multimap.conf
is already included, if it exists. You could try to set up the customization with it.
@Denis_Pollini, Dominic’s approach looks promising and is good in general, but configuring Sieve filters might be a valid alternative to Rspamd customization especially for small installations.
Hi David,
Thank you for your invalueable feedback. I truly appreciate it.
Your right, this step isn’t necessary. I was unaware of the path ${DBDIR}/dynamic that did not exist. I’ve since created ${DBDIR}/dynamic, set the permissions, and moved the multimap.conf file, retaining only the customizations. It works!
I can confirm that the custom blacklist files created are accessible in the UI and can be managed directly from there.
Thanks,
Dominic
Hi @davidep @domins10 thx for answering.
So @domins10 can you provide with the information you get from @davidep to write step-by-step process to achieve that?So it can be useful to others.
Thanks
Hi Denis,
Absolutely, it would be my pleasure!
Where would be the best place to put the procedure–in the wiki?
I’d suggest to write a post in the Howto category here, or in the community wiki.