How To: Set up a Sieve Filter for Disroot
2 minutes read
In my last post, I shared that I joined disroot.It’s smooth sailing right now, but there was a bit of a hiccup initially. I set the filter rules but they nothing was happening.
After some troubleshooting I got it working and #eachOneTeachOne so I might as well share.
The Issue
The GUI tool uses improper formatting and so the output that is given is incorrect and doesn’t work.
The Proper Settings
Below is an example of what worked for me. Change the folder name and fill in the desired email/name inside of the quotes and you’re good to go:
Navigating to the right place
- Log into https://webmail.disroot.org/
- Click on the
Settingscog button on the left hand side of the page - On this page, select
Filters - Click
managesieve. This should expand options, including the phrasemanagesieveagain. - Right-click this and select
Edit filter set - Either paste the code below to see the folder names populate, or with your edits to the file.
- Click the
Savebutton and you’re good to go!
Note
Existing emails are unaffected, but it will work for incoming emails
require ["fileinto", "comparator-i;ascii-casemap"];
# rule:[Interests and Outings]
if anyof (
header :contains ["from"] "add email addr. or sender name here"
,header :is ["from"] "insert exact email addr. here"
)
{
fileinto "Interests and Outings";
stop;
}
# rule:[Here is a Second Folder]
if anyof (
header :contains ["from"] "add email addr. or sender name here"
,header :is ["from"] "insert exact email addr. here"
)
{
fileinto "Here is a Second Folder";
stop;
}
# rule:[More folders if you're anal]
if anyof (
header :contains ["from"] "add email addr. or sender name here"
,header :is ["from"] "insert exact email addr. here"
)
{
fileinto "More folders if you're anal";
stop;
}
# rule:[You must be fun at parties]
if anyof (
header :contains ["from"] "add email addr. or sender name here"
,header :is ["from"] "insert exact email addr. here"
)
{
fileinto "You must be fun at parties";
stop;
}
Benefit
Once you get the hang of it, it’s much easier to add new rules this way instead of with the GUI. Of the 4-5 folders I created, I have a total of ~50 rules, and so being able to edit it like code is a real time-saver.
- Rules don’t affect current inbox, only subsequent inbox
- instructions on how to get there