[GH-ISSUE #679] Add a one-way convert to code option for existing options in the GUI | was: Review all Sieve actions, in all different use cases (Standalone or within Tiki, with or without Sieve) #441

Closed
opened 2026-02-25 21:35:02 +03:00 by kerem · 6 comments
Owner

Originally created by @marclaporte on GitHub (Feb 24, 2023).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/679

Originally assigned to: @josaphatim on GitHub.

To @josaphatim (mostly)

We have different use cases:

  • Standalone Cypht
    • with mailbox that doesn't support Sieve
    • with mailbox that supports Sieve
  • Cypht in Tiki: https://doc.tiki.org/Email-filters
    • with mailbox that doesn't support Sieve
    • with mailbox that supports Sieve

@henrique-borba and I reviewed a few other webmail clients, and we covered a quite complete list of actions via the creation of a new lib: https://github.com/henrique-borba/php-sieve-manager

It is expected to be a little shaky at first. So please review all the use cases and all the actions and address any issues your encounter.

Sieve is a standard so in theory, it should behave exactly the same everywhere. But in practice, there can be some minor divergences. So please use Gandi as the reference.

As a reference: Here is original task: https://github.com/jasonmunro/cypht/issues/9

Sieve-and-similar-action-in-Cypht-and-Tiki

Originally created by @marclaporte on GitHub (Feb 24, 2023). Original GitHub issue: https://github.com/cypht-org/cypht/issues/679 Originally assigned to: @josaphatim on GitHub. To @josaphatim (mostly) We have different use cases: - Standalone Cypht - with mailbox that doesn't support Sieve - with mailbox that supports Sieve - Cypht in Tiki: https://doc.tiki.org/Email-filters - with mailbox that doesn't support Sieve - with mailbox that supports Sieve @henrique-borba and I reviewed a few other webmail clients, and we covered a quite complete list of actions via the creation of a new lib: https://github.com/henrique-borba/php-sieve-manager It is expected to be a little shaky at first. So please review all the use cases and all the actions and address any issues your encounter. [Sieve is a standard](https://en.wikipedia.org/wiki/Sieve_(mail_filtering_language)) so in theory, it should behave exactly the same everywhere. But in practice, there can be some minor divergences. So please use [Gandi](https://docs.gandi.net/en/gandimail/sieve/index.html) as the reference. As a reference: Here is original task: https://github.com/jasonmunro/cypht/issues/9 ![Sieve-and-similar-action-in-Cypht-and-Tiki](https://user-images.githubusercontent.com/1004261/221098713-f97d78f3-16e6-4560-964e-281fb630f0a2.png)
kerem closed this issue 2026-02-25 21:35:02 +03:00
Author
Owner

@marclaporte commented on GitHub (Feb 24, 2023):

This can give you ideas for the UI: http://code.uoa.gr/p/avelsieve/screenshots.php

<!-- gh-comment-id:1442868700 --> @marclaporte commented on GitHub (Feb 24, 2023): This can give you ideas for the UI: http://code.uoa.gr/p/avelsieve/screenshots.php
Author
Owner

@dumblob commented on GitHub (Feb 24, 2023):

Yeah, avelsieve is crazy complicated (but seems really comprehensive). I think Cypht should stay with the "limited use case" approach.

Namely define precisely ~7 most common use cases for which templates/one-click filter setup/form should exist and then a "convert to code" button which would irreversibly bring you to a plain text editor (perhaps with syntax highlighting if that is your thing) where you would get real-time feedback (any errors/warnings taken directly from the backend Sieve engine with no changes to them unless security issues would arise in which case the relevant parts should be substituted with random data/anonymized and a separate note about this should be appended) from the server after each keystroke.

WDYT?

<!-- gh-comment-id:1443119973 --> @dumblob commented on GitHub (Feb 24, 2023): Yeah, `avelsieve` is crazy complicated (but seems really comprehensive). I think Cypht should stay with the "limited use case" approach. Namely define precisely ~7 most common use cases for which templates/one-click filter setup/form should exist and then a "convert to code" button which would **irreversibly** bring you to a plain text editor (perhaps with syntax highlighting if that is your thing) where you would get real-time feedback (any errors/warnings taken directly from the backend Sieve engine with no changes to them unless security issues would arise in which case the relevant parts should be substituted with random data/anonymized and a separate note about this should be appended) from the server after each keystroke. WDYT?
Author
Owner

@marclaporte commented on GitHub (Feb 24, 2023):

@dumblob Good point: I think we forgot an option for manual entry.

<!-- gh-comment-id:1444468050 --> @marclaporte commented on GitHub (Feb 24, 2023): @dumblob Good point: I think we forgot an option for manual entry.
Author
Owner

@marclaporte commented on GitHub (Mar 12, 2023):

Wait! We do have manual entry.
2023-03-12_163814
It's not "convert to code" but it should be good enough for people that need more than the GUI.

<!-- gh-comment-id:1465295126 --> @marclaporte commented on GitHub (Mar 12, 2023): Wait! We do have manual entry. ![2023-03-12_163814](https://user-images.githubusercontent.com/1004261/224572429-2b97bead-0168-4aeb-a817-a6a02a0529fb.png) It's not "convert to code" but it should be good enough for people that need more than the GUI.
Author
Owner

@dumblob commented on GitHub (Mar 15, 2023):

Wait! We do have manual entry.

Yes, that is necessary.

It's not "convert to code" but it should be good enough for people that need more than the GUI.

The reason why I wrote "convert to code" is to have an easy (from a geeks perspective) way to see how the sieve filters are structured internally to have more freedom to interact with other sieve filters (refer to them, mimick them, etc.).

<!-- gh-comment-id:1469838534 --> @dumblob commented on GitHub (Mar 15, 2023): > Wait! We do have manual entry. Yes, that is necessary. >It's not "convert to code" but it should be good enough for people that need more than the GUI. The reason why I wrote "convert to code" is to have an easy (from a geeks perspective) way to see how the sieve filters are structured internally to have more freedom to interact with other sieve filters (refer to them, mimick them, etc.).
Author
Owner

@marclaporte commented on GitHub (Dec 20, 2023):

@dumblob Done. Please test and re-open if further work is needed.

Thanks!

<!-- gh-comment-id:1865233453 --> @marclaporte commented on GitHub (Dec 20, 2023): @dumblob Done. Please test and re-open if further work is needed. Thanks!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#441
No description provided.