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

Jesse Norell jesse at kci.net
Mon Nov 8 16:34:34 UTC 2021


On Mon, 2021-11-08 at 07:44 +0000, Ronny Seffner wrote:
> Thanks for your reply Jesse,
> 
> > 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.
> > 
> Here ist written about "rules". Equals "rule" and "section"?

  Yes, in your below example you have named your rules "section1" and
"section2", so the "rule" is the same as your "sections".

> If I have following 2 sections, is then the first an match and
> "excludes" the second?
> I think the match-part is then "(mime-)from", "(mime-)rcpt", "ip",
> "hostname", "local", "user", "(request_)header", "authenticated" and
> "selector".
> 
> section1 {
>   id = "section1";
>   rcpt = "user at domain.tld";
>   apply ...
> }
> section2 {
>   id = "section2";
>   from = "other at foreigndomain.tld";
>   rcpt = "user at domain.tld";
>   apply ...
> }


In this example, the priority is the same (default) so the rules will
be processed alphabetically, and since "section1" will match all mail
to that recipient, the "section2" rule will never be processed.


> I want to do an action if recipient matches, but I also want if
> recipient matches but sender is an special one. How to solve this?

Set a priority for your "match recipient" rule (ie. section1) and set a
higher priority for the rules with special handling (section2).

Jesse


-- 
Jesse Norell
Kentec Communications, Inc.
970-522-8107  -  www.kci.net



More information about the Users mailing list