Skip to content

Sieve filters support #53

Open
Open

Description

@emersion

Activity

  1. changed the title [-]SIEVE filters support[/-] [+]Sieve filters support[/+] on Apr 18, 2019
  2. foxcpp commented on Apr 28, 2019

    @foxcpp
    Owner

    Having ManageSieve protocol too would be nice: https://tools.ietf.org/html/rfc5804

    Also, found Sieve lang parser for golang: https://github.com/qingshan/sieve. I wonder if it works...

  3. emersion commented on May 11, 2019

    @emersion
    CollaboratorAuthor

    Once sieve filtering has been added, is the possibility of having a kitteh+junk@kitteh.pw email that gets emails forwarded into spam folder a reality?

    Yes.

  4. added
    filterRelated to message processing middleware ("filters")
    on May 25, 2019
  5. added this to the milestone on Feb 10, 2020
  6. helmut72 commented on May 21, 2020

    @helmut72

    Sieve support would be cool. Can't imagine any Imap service without Sieve.

  7. andris9 commented on May 21, 2020

    @andris9

    When building WildDuck Mail Server we decided to not use Sieve and instead went with custom filtering system that is applied to incoming emails and is easy to integrate with a web UI. Basically these are If-This-Then-That rules (example). Such filters cover 90% of use cases required by users.

    We did not see any value in actual Sieve mostly because it's a separate programming language (so there might be some security issues if a user is able to come up with a complex enough script). Also most users are not able to write it anyway, so usually it ends up being disguised by the UI into simpler forms.

  8. emersion commented on May 21, 2020

    @emersion
    CollaboratorAuthor

    Sieve has a great upside: it's a standard. So it really helps users switching from an email server to another without having to learn a new filtering DSL and convert all of their filters.

  9. emersion commented on May 21, 2020

    @emersion
    CollaboratorAuthor

    Additionally, Sieve is not Turing-complete (no loops, no functions), so I wouldn't be too worried about complex scripts.

  10. removed this from the milestone on Jul 16, 2020
  11. foxcpp commented on Feb 1, 2022

    @foxcpp
    Owner

    @angelnu idea for a solution

    • Implement ManageSieve in Maddy so users can use their email clients to upload the filter configs to the server
      this could be either be implemented natively in Go or call existing (but old) Python libraries . The protocol looks simple enough so re-implementing in Go might even be easier so we could reuse the STARTTLS support in Maddy.

    • Add a Sieve parser to Maddy to process the uploaded scripts and generate the scripts out of the sieve configs. Here we could use the C library libsieve as re-implementing in Go might be more work.

  12. foxcpp commented on Feb 16, 2022

    @foxcpp
    Owner

    I implemented a simple interpreter for the base Sieve specification here: https://github.com/foxcpp/go-sieve.

  13. foxcpp commented on Feb 16, 2022

    @foxcpp
    Owner

    Once we get support for several important extensions into it and find a way to re-use Pigeonhole tests suite - it should be ready for integration into maddy. Though we will need a several rounds of refactoring to make IMAPFilter interface flexible enough.

  14. added this to the 0.7 milestone on Jun 23, 2022
  15. modified the milestones: 0.7, 0.8.0 on Jan 21, 2024
  16. hasufell commented on Dec 6, 2025

    @hasufell

    Is there any way to set a bounty for this or otherwise contribute financially?

  17. modified the milestones: 0.8.0, 0.10.0 on Apr 27, 2026
  18. moved this from Triage to TODO in Maddy Mail Server Task Trackeron Oct 28, 2026
  19. pinned this issue on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    filterRelated to message processing middleware ("filters")help wantedWe need your help with this one.new featureNew feature.

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions