Does Rspamd "add_header" action actually has any effect in poste.io?

Issue #779 resolved
Oleyley created an issue

By default Rspamd has for config:

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`)

Does the add_header score actually has any effect? I couldn’t find a Sieve filter putting emails having Rspamd headers to the Junk folder for instance. There’s an option to use subject rewriting and for that there is a Sieve filter. But what about add_header?

If add_header doesn’t have any effect, does that mean emails with a score between 9 and 12 (default quarantine score) are just being delivered to inbox?

Comments (6)

  1. Oleyley reporter

    Actually I also wonder if greylisting does anything as well. The whole spam handling is very confusing to me. There seem to be multiple settings:

    • rspamd actions in /etc/rspamd/actions.conf or in /var/lib/rspamd/rspamd_dynamic,
    • haraka’s rspamd.ini and quarantine_decide.ini,
    • sieve filters on emails with *****SPAM***** subjects.

    I’m trying to understand what does what and what’s actually ignored. My understanding so far is:

    1. rspamd emits recommendations (greylist, add_header, or reject),
    2. haraka does nothing on greylist (4 by default) and add_header (6 by default) recommendations?
    3. haraka rewrites subject of emails with score above mailserver’s subject rewrite score (9 by default) - NOT based on rspamd rewrite subject score,
    4. haraka quarantine emails with score above mailserver’s quarantine score (12 by default),
    5. haraka rejects emails on reject recommendations (15 by default) (both for authenticated users and relays ? Not sure),
    6. if an email is delivered (i.e. not quarantined or rejected) and has its subject rewritten with *****SPAM***** then a sieve filter moves it to junk folder.
    7. haraka actually always add rspamd headers to emails (from haraka’s rspamd.ini).

    This is even more confusing since there are 2 haraka setups: smtp and submission. And different settings for authenticated users or relays and local or private ip.

    Is this somewhat correct? I’d appreciate some help in understanding how all of this works so I can tune my settings to achieve my needs.

  2. Oleyley reporter

    I’m now thinking haraka does enforce rspamd’s greylist recommendation. It seems to ignore only the add_header recommendation (as it always add headers, see rspamd.ini), and the rspamd’s subject rewritting is disabled by default but haraka has its own subject rewritting plugin enabled.

    Again I’m not sure of anything, please correct me and/or complete my answer if you can.

  3. Oleyley reporter

    add_header doesn’t have any effect either, headers are always added, but no specific action is taken on the add_header recommendation from rspamd. I’m now looking for how to enable gerylisting.

  4. Oleyley reporter

    I kept looking in depth at how mailserver handles SPAM and got a better understanding of things. I’m too lazy to rewrite everything but I’ll close the issue since at least I’ve answered my initial question (add_header does nothing, headers are always added no matter score).

  5. Log in to comment