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

Filter editor limitations #80

Open
tomscii opened this issue Apr 9, 2021 · 8 comments
Open

Filter editor limitations #80

tomscii opened this issue Apr 9, 2021 · 8 comments
Labels
enhancement New feature or request sieve filter scripting

Comments

@tomscii
Copy link

tomscii commented Apr 9, 2021

Describe the bug
The filter editor does not allow creating certain (simple) filters. For example, I would like to create a filter that marks the message as read (on certain conditions) and does nothing else.

If I try to create a filter that does not move the message anywhere (other than leaving it in the Inbox), I run into an error: the drop-down has Inbox greyed out, and does not accept the empty selection (becomes red if I try to submit the dialog). I cannot choose not to move (or forward, or reject ...) the message. I think a checkbox to enable this line of actions would solve this nicely.

It would also be super nice if other common attributes/flags could be set/unset (in combination with other actions). For example, I cannot create a filter that would mark matching messages as Starred (\Flagged in imap4 lingo). (I realize this is starting to look more like an open-ended feature request, so feel free to make whatever you want out of it. I also realize that the sieve source can be edited by hand, which basically shortcuts all the limitations, so again, please treat this with a "nice to have" priority.)

Screenshots
Here is what I see when I try to create a filter without moving the message anywhere. I cannot turn this thing off.
SnappyMail_Filter

Desktop (please complete the following information):

  • Browser: Firefox 78.9.0esr
  • SnappyMail Version: 2.5.0-rc.2

Additional context
This is not super important to me right now, submitting for your feedback in case you want to improve your upcoming release.
Feel free to save for later.

@tomscii
Copy link
Author

tomscii commented Apr 9, 2021

One further issue that looks like a well-rounded bug that I have ran into is that I seemingly cannot save back to the server a sieve with everything removed.

Steps to reproduce:

  1. Create a dummy sieve filter: "+ Add filter", Condition: From contains "nobody@example.com", Action: Move to Archive. Press "Done"
  2. Now the "outer dialog" shows a yellow admonition "These changes need to be saved to the server". Press "Save".
  3. The admonition goes away, and on the server, I can look at the sieve script which looks fine.
  4. Still in the same dialog, press the trash can icon, plus the red "Are you sure" popup.
  5. There is a new yellow admonition "These changes need to be saved to the server". Press "Save"
  6. Press "Save"
  7. Press "Save"
    ... It does not work!

In comparison, if I do not remove the filter, but only disable it by un-ticking the tick-box before its name, that change CAN be saved. And the sieve script on the server looks ok (the script is put into a block comment).

This is something that could be made into a separate bug report, but I figured I spammed you enough already. (:

@the-djmaze
Copy link
Owner

Spamming is fine 😉

RainLoop has a limited filter editor.
So i wanted to improve that.

The first step was to see/edit all available sieve scripts on the server, as you might have created some through Thunderbird/KMail/Evolution/RoundCube/etc.

The second step was to create a full-blown GUI, but i found out that is a lot of work.
I have a lot of draft code to parse complex sieve scripts and that also makes a GUI very complex.

For now i like to focus on upgrading everything to 2021 and after that improve the filters.

I will keep this one open for future releases, and you can already use the raw editor to write complex scripts.

The current simple editor will stay as-is to be compatible with RainLoop users.

@tomscii
Copy link
Author

tomscii commented Apr 9, 2021

👍

@the-djmaze
Copy link
Owner

Regarding your mark as read.
You could create new script with:

require ["imap4flags"];

if header :contains ["From"] "example.com"
{
    addflag "\\Seen";
}

@tomscii
Copy link
Author

tomscii commented Apr 10, 2021

Yes :)
My request was more on behalf of users who are not as technical.
By the way, for the benefit of anyone reading this: I found an excellent guide to this on the ProtonMail website:
https://protonmail.com/support/knowledge-base/sieve-advanced-custom-filters/

@veitw
Copy link

veitw commented Mar 4, 2022

I suggest introduction of a Basic/Expert mode for the new Sieve filters, so it will get less confusing for technically non-experienced users:

  • Put a button in Settings -> Filters to switch between Expert mode and Basic mode.
  • Expert mode corresponds to the full-fledged implementation that allows multiple scripts and Sieve source code editing.
  • Basic mode opens the visual ruleset editor for the rainloop.user script automatically instead of the script manager, removes the "Edit Sieve source code" button, and the rainloop.user script is enabled automatically on save.
  • If there is at least one script that is not rainloop.user, or rainloop.user is not set active, the user is put into Expert mode automatically and trying to enable Basic mode shows a message that the script status prevents this.
  • An option in application.ini defines whether (new) users are put into Basic or Expert mode by default.

@Kofl
Copy link

Kofl commented Jun 10, 2024

It would be awesome to add for the basic filter a date start / stop range, in which the vacation message should be sent.
The only thing missing from roundcubemail.

@the-djmaze the-djmaze added the sieve filter scripting label Jun 10, 2024
the-djmaze pushed a commit that referenced this issue Sep 23, 2024
@the-djmaze
Copy link
Owner

the-djmaze commented Sep 23, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sieve filter scripting
Projects
None yet
Development

No branches or pull requests

4 participants