Giter Club home page Giter Club logo

email-sieves's Introduction

Email Sieve Filters

My personal sieve filters for use with ProtonMail. Sieves are commonly referred to as email filters.

While these are personal sieves, most of these are general purpose and can be modified/extended as needed.

Contributions are accepted.

Design Philosophy

  • When in doubt, default to expiring emails. Few things truly need to be kept indefinitely.
    • As of 03-18-2021, ProtonMail supports an undocumented maximum expiration of 120 days. Setting a value greater than 120 days will be silently accepted with no server side errors, defaulting to the max of 120 days. Keep this in mind.
    • Avoid using a global expiration rule with an "opt-in" model for retention. Emails are too unpredictable - it's a delicate balance.
    • Biannual offsite backups should address what concerns may arise from this strategy.
  • Scheduled/routine emails of importance (example - daily finance updates) should route to the main inbox, but expire quickly.
  • Keep it simple and avoid having too many folders and labels.
    • A doctors appointment email and a restaurant reservation email can go to the same folder, and that's okay.
  • No organizatonal system will ever be perfect. Expect and accept occasional inefficiencies.
  • Think carefully about the execution chain. Use stops when warranted.
  • Use subject header parsing with caution, but don't be afraid. It's an immensely powerful routing mechanism.
  • IMAP uses modified UTF-7. Ensure folder and label names are in the US-ASCII range.
  • You can only test so much before going to "prod". Ensure sieves handling ~critical emails explicitly check for and resolve unintended states, such as expirations.

Useful Links

Testing

  • Web app for testing sieves
    • NOTE - ensure NO personaly identifiable information is pasted into this tool.
    • Pro Tip - this app is not aware of the "vnd.proton.expire" package. Remove it when testing with this app.
  • When adding the sieve to ProtonMail, basic linting is performed server-side.

Deployment

  • Manually copy and paste the definitions into ProtonMail Filters
    • "Ads" sieve is executed 1st (00)
    • "Security" sieve is executed 2nd (01)
    • "Statements" sieve is executed 3rd (02)
    • "Orders and Shipping" sieve is executed last (zz)

To Do

  • Improve local testing by hooking up sieve script editor to docker-mailserver [local dev]
  • Add Travis PR tests which check for syntax errors [CI]
    • Can likey have Travis run docker-mailserver and load the sieve filters into memory. Needs further investigation.
  • Create test suite with mock email data (CI)
  • Automate deployments [CD]
    • This is high LOE and has significant security implications.

email-sieves's People

Contributors

somuchtogrok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

email-sieves's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.