[Rspamd-Users] Proper way to nest user settings in global settings.

Herty, Tim tim.herty at ekom21.de
Tue Aug 22 12:17:36 UTC 2023


Hello,

 

we have two settings,  settings.conf & settings_custom.conf which are
partially blocking eachother.

lua; settings.lua:48: cannot apply settings rule incoming_default
(id=813317222): settings has been already applied by rule babenhausen_pill
(id=nil)

 

In local.d/settings.conf we have the global stuff, which should apply to all
incoming or outgoing message.

In local.d/settings_custom.conf, we have hundreds of settings to set
exceptions per user/customer.

 

According to Docs, what we want to achive does not work, with the way we set
it up now.

 

priority - high (3), medium (2), low (1) or any positive integer value
(default priority is low). Rules with greater priorities are matched first.

Starting from version 1.4, Rspamd checks rules with equal priorities in
alphabetical order.

Once a rule matches, only that rule is applied, and the rest are ignored.

 

User settings that are only filterd by incomding domain like @babenhausen.de
will always be left out of scope fort he global settings we want for
incoming messages.

 

The only way the docs leaves us, is to include the global stuff in EVERY
user/cusomer setting.

Is there a more elegant way to have global settings for each message AND
exceptions per user?

 

 

### settings.conf ###

# Default IN - no DKIM sign

incoming_default {

  id = "incoming_default";

  priority = low;

  request_header = {

    "MTA-Name" = "smtpd-in";

  }

  apply {

    actions {

      #"rewrite subject" = 13; # Please note the space, NOT an underscore

    }

    symbols_disabled = [

      "DKIM_SIGNED",

    ];

    groups_disabled = [

    ];

  }

  symbols [

      "INCOMING_DEFAULT"

  ]

}

 

# Default OUT full + dkim sign

OUTGOING_DEFAULT {

  id = "OUTGOING_DEFAULT";

  priority = low;

  request_header = {

    # milter_macro_daemon_name in postfix

    "MTA-Name" = "smtpd-out";

  }

  apply {

    symbols_disabled = [

      "DMARC_CALLBACK",

      "GREYLIST_CHECK",

      "GREYLIST_SAVE"

    ];

    groups_disabled = [

      "dmarc",

      "rbl"

    ];

  }

  symbols [

      "OUTGOING_DEFAULT"

  ]

}

 

.include(try=true,priority=2,duplicate=merge)
"$LOCAL_CONFDIR/local.d/settings_custom.conf"

### settings.conf ###

 

### settings_custom.conf ###

 

babenhausen_pill {

  rcpt = "@babenhausen.de";

  apply {

    symbols_disabled = ["MALIGN_WORDS7"];

  }

}

### settings_custom.conf ###

 

 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5689 bytes
Desc: not available
URL: <https://lists.rspamd.com/pipermail/users/attachments/20230822/9e7f7e6a/attachment.bin>


More information about the Users mailing list