[Rspamd-Users] Few questions about config w.r.t. soft rejects

Michal Soltys msoltyspl at yandex.pl
Tue May 25 16:22:34 UTC 2021


Hi,

1) actions/greylisting questions

In default actions config:

actions {
     reject = 15; # Reject when reaching this score
     add_header = 6; # Add header when reaching this score
     greylist = 4; # Apply greylisting when reaching this score (will 
emit `soft reject action`)
...

there are defined actions (suggetions) what to do with a mail depending 
on accumulated score. But on mta side there is not such thing as 
"greylisting" suggestion, only "soft reject".

Basing on the comment, I assume that the value (4) in this context 
decides whether to trigger greylisting module at all - but itself the 
module contributes nothing to the score (although there is commented out 
GREYLIST symbol ? see below).

But what happens if for example the message has score such as 7. Will 
the greylisting be skipped altogether with "add header" suggested to the 
mta instead ? Or perhaps will greylisting "take over" and everything 
else will be ignored (until the mail is properly retried) ?

If the GREYLIST symbol was defined with actual >0 weight, how would that 
fit in everything ? Especially - following earlier question - if 
accumulated score reached the next threshold (e.g. add header).

2) mysterious flags

Across faq and documentation there are few mentions of flags= array, e.g.

# local.d/actions.conf
# Generic threshold
my_action = {
	score = 9.0;
},
# Force action only
phishing = {
	flags = ["no_threshold"],
},
greylist = {
  score = 2.0,
  flags = ["no_action"],
}

Peeking at cfg_utils.c and file.h (rspamd_action_flags), there are also 
few more - "threshold_only", "ham" - but there is no "no_action" 
(although I see no "unknown action flag" complaints about using it - or 
for that matter any other arbitrary string I tested it with).

What's the exact purpose of "no_action" in context of that greylist 
config above, and when is it interpreted ? Does it work with other modules ?

3) ratelimit

Basically the same questions as regarding greylisting module - as their 
operation seems similar.

This module returns "soft reject" - so when/how does it fit with the 
other reachable thresholds (similarly like with greylisting, e.g. when 
we reach 7 putting as above "add header" threshold) ?

And there is also 'symbol' option available, so analogous qestion to 
greylisting module - how does it change the behavior of the module ? 
Comment suggests it starts contribution to the score then without 
forcing "soft reject".

What is 'pre-result' ? (forced action, what I meant by "take over" 
earlier ?)

4) other

If greylisting can have threshold defined about when to activate the 
module (if I'm interpreting the comment from actions.conf correctly) - 
what about other modules (and in particular - ratelimit module) ?


More information about the Users mailing list