snappymail
snappymail copied to clipboard
Filter editor limitations
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.
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.
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:
- Create a dummy sieve filter: "+ Add filter", Condition: From contains "[email protected]", Action: Move to Archive. Press "Done"
- Now the "outer dialog" shows a yellow admonition "These changes need to be saved to the server". Press "Save".
- The admonition goes away, and on the server, I can look at the sieve script which looks fine.
- Still in the same dialog, press the trash can icon, plus the red "Are you sure" popup.
- There is a new yellow admonition "These changes need to be saved to the server". Press "Save"
- Press "Save"
- 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. (:
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.
:+1:
Regarding your mark as read. You could create new script with:
require ["imap4flags"];
if header :contains ["From"] "example.com"
{
addflag "\\Seen";
}
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/
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 therainloop.user
script is enabled automatically on save. - If there is at least one script that is not
rainloop.user
, orrainloop.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.
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.
Working on it https://github.com/the-djmaze/snappymail/tree/sieve-gui