How to check MX_INVALID symbol on Rspamd manually?

NethServer Version: 7.8.2003
Module: rspamd-2.2-1, nethserver-mail-filter-2.17.2-1

In order to tighten mail security, I’m increasing several rspamd symbol scores. Today I increased MX_MISSING and MX_INVALID to 20. However, I found several mail servers unable to send to send mails to my server due to MX_INVALID. I checked for MX record using dig @127.0.0.1 -p 10053 server.domain mx +short on my NS Mail server and I got a response. Is there something I’m missing?

Here is an example:

dig @127.0.0.1 -p 10053 bobst.com mx +short
10 spam1.bobst.com.

Yet, as you can see here:

Rspamd is rejecting mails due to MX_INVALID.
Can someone help me ?

@stephdl
Can you help?

1 Like

I am not sure to set hight score for MX or any SYMBOLS is a good idea. Firstable you can be sure that a spammer will set better dns fields that any skilled system administrator, so you will reject all valuable email and accept only spam email.

A good email and a spam email cannot be decided like this, only on one SYMBOL but on an accumulation of different SYMBOLS

I would advise to reset the dynamic map (if you modified by the rspamd UI) and add tiny score, not huge score on a symbol

1 Like

Actually I have change the score on several SYMBOLS. So far all of them have behaved as expected. Problem is that MX_INVALID is getting activated and I don’t know why. On what conditions does this symbol triggers?

MX_INVALID(0.50){} this is the default scoring, it makes me think that it is not something that you can rely on, else the score will be higher in my opinion

If you want to understand exactly what this symbol does: https://github.com/rspamd/rspamd/blob/a1410d8d5e62886dd6a51784bd96c3d844b0d072/src/plugins/lua/mx_check.lua

Like you will see it is something complex, and this SYMBOL comes often in my maillog

in the meanwhile this is emails that triggered MX_INVALID

service@paypal.fr
s-4sedeo0r5lt6q9pytyym7ijci8ok6nheb6r2ogbidf6aqvibpzqb095t@bounce.linkedin.com
ebay@ebay.com

hard to think they have bad dns, maybe it is something wrong inside rspamd, I can see this SYMBOL has some issues on telegram

I would be really prudent on it

2 Likes

I had no choice, since January 2020, Cuba has received a bunch of emails having virus (Mainly EMOTED). Due to this, I had to increase the score on several SYMBOLS to avoid an infection.

BTW, I want to congratulate NS crew once again, thanks to fail2ban, suricata, clamav and rspamd, the company I work for was unscathed, all those mails were kept at bay.

There is a new version of oletools, it should work better now

2 Likes