Steps to reproduce
- Install nethserver-mail2-getmail & nethserver-mail2-filter
- configure to retrieve email from a remote account with pop or imap
- activate to filter email with antispam
- email tagged as spam (score over spam threshold) have not the subject rewritten
- email are not moved to junk if enabled
- email are not rejected by rspamd if the score exceed the reject maximum score
Expected behavior
I expect the email could have the subject rewritten/moved to junk or to be rejected if the scores are exceeded.
Actual behavior
The documentation of rspamd states clearly in https://rspamd.com/doc/integration.html#lda-mode
In this mode, rspamc cannot reject or greylist messages, but it appends the following headers that can be used for further filtering by means of the LDA (for example, sieve or procmail):
In fact rspamd marks the email in the header with but does nothing more, we must use sieve with a script in before.sieve
the new tags in the header are
X-getmail-filter-classifier: Action: greylist -> proposal: we do nothing
X-getmail-filter-classifier: Action: no action -> email is good, go to in box
X-getmail-filter-classifier: Action: add header -> this spam must go to junkmail if enabled
X-getmail-filter-classifier: Action: rewrite subject -> this spam must be subject rewritten and go to junk if enabled
X-getmail-filter-classifier: Action: reject -> this spam should not go to inbox
In the case reject we have two possibilities with sieve, either reject (reject email with error message) or discard (reject silently) which makes a better sense for me. Why to answer to a remote imap/pop server . The prudent approach could be move to junk, the email would be never lost.
one idea of what will be the sieve script is : https://gist.github.com/stephdl/6df6a1ff271ed5d0f32da1829b8c04b5
Components
nethserver-mail2-common-2.2.7-1.ns7.noarch
nethserver-mail2-disclaimer-2.2.7-1.ns7.noarch
nethserver-mail2-server-2.2.7-1.ns7.noarch
nethserver-mail2-filter-2.2.7-1.ns7.noarch
nethserver-mail2-getmail-2.2.7-1.ns7.noarch
See also
https://community.nethserver.org/t/getmail-spam-subject-is-not-rewritten-with-rspamd/10561/1
thank thorsen
Steps to reproduce
Expected behavior
I expect the email could have the subject rewritten/moved to junk or to be rejected if the scores are exceeded.
Actual behavior
The documentation of rspamd states clearly in https://rspamd.com/doc/integration.html#lda-mode
In fact rspamd marks the email in the header with but does nothing more, we must use sieve with a script in before.sieve
the new tags in the header are
In the case
rejectwe have two possibilities with sieve, either reject (reject email with error message) or discard (reject silently) which makes a better sense for me. Why to answer to a remote imap/pop server . The prudent approach could be move to junk, the email would be never lost.one idea of what will be the sieve script is : https://gist.github.com/stephdl/6df6a1ff271ed5d0f32da1829b8c04b5
Components
See also
https://community.nethserver.org/t/getmail-spam-subject-is-not-rewritten-with-rspamd/10561/1
thank thorsen