Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a "prevent spam" sieve action for filters #1510

Closed
diroots opened this issue Mar 22, 2024 · 2 comments
Closed

add a "prevent spam" sieve action for filters #1510

diroots opened this issue Mar 22, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request sieve filter scripting

Comments

@diroots
Copy link

diroots commented Mar 22, 2024

Is your feature request related to a problem? Please describe.

sometime, users have mails classified as spam because of the spam filter used in the mailserver

using the 'mark as not spam' do not always work as expected, even if used, mails can still be flagged as spam

Describe the solution you'd like

We can use sieve filters to 'bypass' the spam classification

with sieve filters UI in snappymail, this actually works with the 'Move To' action, but it oblige users to create a filter that move to a particular subfolder of their inbox. in the Move To, the root INBOX is greyed and not selectable (expected, as it's goal is to move to a specific folder)

also, if, instead of using sieve filters UI provided with snappymail, we use sieve code, we can write this code and it works :

require ["fileinto", "envelope"];

if envelope :all :is "from" "someuser@example.com"
{
    fileinto "INBOX";
    stop;
}

but we can't have both scripts written from UI AND script coded to work at same time, and it oblige users to write sieve scripts themselves

the above tests work as sieve filters work at delivery time, when receiving mails, so it's applied before the mail is stored in a specific mailbox.

in the action list, we could add a new entry that could be called something like "Force unspam" or "Prevent spam flagging" that could be used to set this up, so users could use this to whitelist (based on conditions they define, as with other filters) and bypass the spam flagging

Describe alternatives you've considered

update in core snappymail sieve filters OR implement as a plugin ?

@the-djmaze
Copy link
Owner

the-djmaze commented Mar 22, 2024

When you use rspamd and dovecot, you can configure them in a certain way to interact.

  1. When you mark as spam, rspamd will learn that as spam
  2. When you unmark as spam, rspamd will learn as ham

See their documentation to configure it.

As for the filters gui: no, not at the moment due to compatibility with rainloop.
However, rainloop is dead and improved gui for sieve is already a feature request.

You could also have both sieve scripts active, the include rule solves that.
https://datatracker.ietf.org/doc/html/rfc6609.html

require ["include"];

include "rainloop.user";

@the-djmaze the-djmaze added the documentation Improvements or additions to documentation label Mar 22, 2024
@the-djmaze
Copy link
Owner

Oh, i forgot to mention an option in application.ini named sieve_allow_fileinto_inbox
Enable it and the INBOX is selectable.

@the-djmaze the-djmaze closed this as not planned Won't fix, can't repro, duplicate, stale Mar 24, 2024
@the-djmaze the-djmaze added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Mar 24, 2024
the-djmaze pushed a commit that referenced this issue Mar 24, 2024
@the-djmaze the-djmaze added the sieve filter scripting label Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request sieve filter scripting
Projects
None yet
Development

No branches or pull requests

2 participants