[Rspamd-Users] settings.conf sections and rcpt/from

Jesse Norell jesse at kci.net
Fri Nov 5 22:07:20 UTC 2021


There is no combining of multiple settings sections, from the
documentation:

   priority - high (3), medium (2), low (1) or any positive integer
   value (default priority is low). Rules with greater priorities are
   matched first. 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.



On Fri, 2021-11-05 at 11:14 +0000, Ronny Seffner wrote:
> Hi rspamd users and admins,
> 
> I generate out of an database, where users can store reject +
> subject-rewrite levels and greylisting on/off per mail address or
> domain, an /etc/rspamd/local.d/settings_users.conf file, which is
> included in /etc/rspamd/local.d/settings.conf.
> 
> Inside this file I have a lot of individual sections, so it happens,
> that one address is mentioned as e.g. "rcpt" in more than one
> section. Now I have "strange" behaviour as "sometimes user settings
> work and sometimes not".
> 
> Maybe I can use an address only one time?
> 
> An exmaple:
> 
> section_subject_userA {
>   id = "section_subject_userA"
>   priority = high;
>   rcpt = "userA at domain.tld";
>   apply {
>     actions {
>       add_header = 4.0;
>       rewrite_subject = 4.0;
>     }
>   }
> }
> section_reject_userA {
>   id = "section_reject_userA"
>   priority = high;
>   rcpt = "userA at domain.tld";
>   apply {
>     actions {
>       reject = 5.8;
>     }
>   }
> }
> section_greylist_userA {
>   id = "section_greylist_userA"
>   priority = high;
>   rcpt = "userA at domain.tld";
>   apply {
>     symbols_disabled ["GREYLIST_CHECK", "GREYLIST_SAVE"]
>   }
> }
> 
> Now mails to userA at domain.tld will only be rejected with an score
> from 14 (rspamd global setting) instead of 5.8.
> Is it because the subject- or greylist-section matches first (or
> overwrites)?
> As I can see, the order of sections is different in my conf from
> "rspamadm configdump". Does the order matter?
> Doesn't the sections merge to something like:
> 
>   rcpt = "userA at domain.tld";
>   apply {
>     actions {
>       add_header = 4.0;
>       rewrite_subject = 4.0;
>       reject = 5.8;
>     }
>     symbols_disabled ["GREYLIST_CHECK", "GREYLIST_SAVE"]
>   }
> 
> Do I need to use include inside section?
> But how to separate actions for only "rcpt" from actions for
> "rcpt"+"from" pairs then?
> 
> 
> Mit freundlichen Grüßen
> 
> Ronny Seffner
-- 
Jesse Norell
Kentec Communications, Inc.
970-522-8107  -  www.kci.net



More information about the Users mailing list