Bulk import/export of sieve filters
As a power-user I have extensive Sieve scripts that are split up into domains of functionality so that it is easier to manage and so that I can run smaller pieces of the larger filter set against my existing mailbox if that is necessary without it needing to run the whole filter.
I also keep them in version control and have a suite of tests that I run against them when making changes. When I'm done with implementing something new it is really frustrating to have to go to each one individually, copy the contents and paste them into the UI. It would be great if you could support some means of bulk-updating the filters. I can think of three ways to do this:
Map the filenames to the names of the filters. If they don't match, prompt the user for the filter to update for unmatched files.
Support uploading as a zip file, with a TOML or YAML config that maps filter names to files.
Support some custom syntax in a comment at the top of the file that specifies the filename
Then, I think ideally it does the check for each one in turn to ensure that it can update. If any of the files are invalid or otherwise cause errors the whole update gets rejected. If everything can apply cleanly then all of the changes are applied at once.
This way if there are changes in scripts that depend on each other there won't be unexpected behavior.
I would think this wouldn't be too terribly difficult to support, and wouldn't expose less savvy users to any more risk than is already present when using these filters. It is very frustrating to click each one in turn, and it's too easy to lose track of which ones you've updated. Or to accidentally paste the contents of the wrong file into a filter.
-
Mark
commented
I just had another thought. Instead of uploading the files in a zip file, allow the user to choose a path in their Proton Drive, and it pulls the files (and optionally the config file if you went that route) from that path.
Then put a button next to it like "Validate" that pulls the relevant files from that folder and validates that they will apply cleanly. Next to that, a grayed out "update" button that becomes available when validate passes. (Or alternately, the validate button changes state).
This way, someone like me can even make a build/verify/deploy workflow that uploads the files to drive, and then just has to go into the UI and update it when they're ready!