Rspamd whitelist

NethServer Version: 7.5.1804 (Core)
Module: rspamd 1.7.8

It seems that recent updates of my nethserver mail server changed the way rspamd manage outgoing mail.
Before this update, mails that come from LAN weren’t checked (no X-* headers), now They are checked and they are marked as spam:

X-Spam-Flag: Yes
X-Rspamd-Queue-Id: 8F1794B
X-Spamd-Result: default: False [11.99 / 20.00];
MX_GOOD(-0.01)[cached: mx.domain.tld];
DIRECT_TO_MX(0.00)[Mozilla/5.0 (Windows NT 6.1;
rv:52.0) Gecko/20100101 Thunderbird/52.9.1];
X-Rspamd-Server: posta.domain.tld
X-Spam: Yes

Is there a simple way to whitelist the internal nets?

Thanks, P.

Hi @PaulVM,

Configuration -> Email -> Filter -> Rules by mail address -> New allow From: yourdomain.tld

Works for me.



Not so intuitive (IMHO), but it works. Thanks.

Now in the header I have:

X-Rspamd-Queue-Id: 39F91347
X-Spamd-Result: default: False [0.00 / 20.00];
X-Rspamd-Server: posta.domain.tld

But I suppose this implies that every incoming mail that claim to be from @domain.tld pass without check … not a good policy (these days lot of scam have the From: == To:).
Before the update, local outgoing mail didn’t pass through rspamd that (IMHO), is a better policy.
I suppose I can hack the rspamd config, but if there is a cleaner way … :slight_smile:

Thanks, P.


Well not sure, clients could be hacked and send email/viruse inside your lan, I prefer to not allow them even inside the lan. Now the question is why your email was taken as spam, this is the 1c issue

This should be investigated

1 Like

Check if in /etc/rspamd/rspamd.conf your local network is defined

Local_networks […]

1 Like

Yes, check out this:

No Local_networks […] variable defined.

I have:
local_addrs = “”;

May be it is what you were referring.
Otherwise it is missing :wink:

N.B.: I identified by myself the rules that rspamd applied to the messages , but can’t find how to manage them … :wink:
And found strange that after standard package update there was a so different management of mail flow.

Obviuosly I have already tried the suggested, that not works for my need and is really boring insert IP one by one :frowning:

you could try to add (not sure it changes something)

local_addrs = “”;
local_networks = "”;

systemctl restart rspamd

Watch what are the checks done, some tests are disabled

The BADIP is out of your trusted networks: try to add its network address to trusted networks and enable “Allow relay from trusted networks” as explained in the docs

Exactly the settings I have… but;

This is on the 7.6 that was upgraded from 6.9, it’s been rebooted a few times but it’s still scanning internal outgoing mail. A couple of local servers that relay through this mail-server had all their emails marked as spam, I added their ip’s to the allow relay from IP addresses box and that stopped the marking of their emails, this node has not been added to that field, so the individuals ip’s are being applied to the bypass but perhaps the selection box is not.
This is a different subnet than the mail server… but this subnet had been added to the trusted networks long ago. &

I just checked another 7.6 mail server I’m running on a different domain and network… it has the same relay and trusted network settings, the node is on the same subnet and there’s no sign in the email that the email is being scanned by the server.