[Rspamd-Users] don't process mail forwarded from another server

Friedrichs, Jens jens.friedrichs at uni-leipzig.de
Fri May 14 05:44:29 UTC 2021


Hello,

You can use following in your settings:

apply {
.....
    symbols_disabled = [
	"MILTER_HEADERS"
    ];
.....
}

This would disable all header rewritings.
You should also use a high priority on this. And be careful with the priorities.
"Once a rule matches only that rule is applied and the rest are ignored." is wrong.
There is a bug in the settings.lua where the settings are applied (at least in my version 2.7 on SLES). 
"
if not applied and settings[pri] then
      for _,s in ipairs(settings[pri]) do
"
The for loop never gets a break if a setting matched. Rspamd will apply all matched settings for the same priority.
This cost me a lot of headache during the development of our rspamd cluster.

Best regards

-- 
Jens Friedrichs


-----Ursprüngliche Nachricht-----
Von: Users <users-bounces at lists.rspamd.com> Im Auftrag von Jesse Norell via Users
Gesendet: Mittwoch, 12. Mai 2021 20:33
An: User questions <users at lists.rspamd.com>
Cc: Jesse Norell <jesse at kci.net>
Betreff: [Extern] Re: [Rspamd-Users] don't process mail forwarded from another server

On Wed, 2021-05-12 at 19:40 +0300, Gerasimos Melissaratos via Users
wrote:
> You can try something like the following in "settings.conf":
> 
> mk_servers {
>      priority = 40;
>      ip = "12.34.56.78"; # my.other.server
>      apply {
>          groups_enabled = ["antivirus"];
>          flags = ["skip_process"];
>      }
> }
> 
> and messages coming from 12.34.56.78 will not be processed.
> 
> Gerasimos


Thank you for the suggestion.  I have now tried setting the 'skip_process' flag (as well as trying 'skip') and I still saw the header changes from milter_headers module.


I have been trying to create a custom routine within the milter_headers module, thinking I could potentially return different sets of headers to be removed depending on the client ip, but am quite over my head at this point (new to lua, pretty new to rspamd, reading about the "Task module" .. maybe task:modify_header() could set the config, if I could figure how to determine the client ip).

Jesse



--
Users mailing list
Users at lists.rspamd.com
https://lists.rspamd.com/mailman/listinfo/users


More information about the Users mailing list