[Rspamd-Users] settings.conf sections and rcpt/from
Jesse Norell
jesse at kci.net
Thu Dec 9 17:47:11 UTC 2021
On Thu, 2021-12-09 at 14:36 +0000, Ronny Seffner wrote:
> I have to reopen this thread ;-(
>
> > Set a priority for your "match recipient" rule (ie. section1) and
> > set a
> > higher priority for the rules with special handling (section2).
> >
>
> Now there is:
> /etc/rspamd/settings.conf with inlude-merge
> /etc/rspamd/local.d/settings.conf
> /etc/rspamd/local.d/settings.conf with:
>
> ruleXXX {
> id = "someID";
> priority = high;
> from = "@domain.tld";
> rcpt = "@domain.tld";
> want_spam = yes;
> }
> and include-merge /etc/rspamd/local.d/more_settings.conf
>
> /etc/rspamd/local.d/more_settings.conf with:
>
> ruleYYY {
> id = "someotherID";
> priority = low;
> rcpt = "user at domain.tld";
> apply {
> actions {
> add_header = 8.0;
> rewrite_subject = 8.0;
> }
> }
> }
>
> I would like that mail form somebody @domain.tld to somebody
> @domain.tld get no scores, no subject rewriting BUT mail from
> somebody at anyotherdomain.tld to somebody @domain.tld will be scored an
> subject rewritten from 8.0.
>
> What happens is that mail form somebody at domain.tld to user at domain.tld
> is scored and subject is rewritten with scores from 8.0.
>
> What did I understand the wrong way? How to solve my task?
I don't immediately see anything wrong with what you posted (it's
pretty similar to examples from settings.conf). Ensure you have the
correct domain set in the envelope sender and recipient. Other than
that, there is probably something outside of the redacted config
snippets you posted going on; you might find clues in 'rspamadm
configdump'.
There may well be a away to enable debugging to log why a particular
settings entry was selected, but I don't know what that is right
offhand (maybe start with: debug_modules = ["settings"]; ?).
--
Jesse Norell
Kentec Communications, Inc.
970-522-8107 - www.kci.net
More information about the Users
mailing list