Simple Email Filter Technique to Reduce Inbox Clutter

If a wall of text with negligible substance is not your cup of tea, feel free to skip ahead to the actual content.

I may well write a bit about this since I’ve just had a lot of enjoyment setting up email filters and cleaning up my inbox in general. Maybe spending two hours sifting through my email trying to get the number to go down as sharply as possible like a contestant trying to win “The Biggest Loser” while listening to a self-pity Markov chain spew out lines made me a lifetime email enjoyer, or maybe it’s just my Vim/Linux configuration enjoyment spreading to another configurable application, but the bottom line is that I’m an email enjoyer who just wants to ramble about this somewhere.

Besides, email hygiene is important. I remember seeing my parents and teachers with thousands of emails lying around in their inbox all the time growing up, and it just seems so stressful and inconvenient to have 10000 emails lying around when trying to look something up or reply to a specific conversation. Unless they all happen to be important big shots or severe social butterflies that I don’t know about, most of these conversations are no longer relevant and could be cleaned up.

As I started using email, I wanted to make sure that I wouldn’t go down the same route (though admittedly that is far easier given that I have spent most of my life as a child and that I might be younger than some of the accounts I was talking about), and recently, I’ve found a technique that works. Here, I’ll detail a short technique to keep my email up-to-date and clutter free.

But first, a brief backstory on how I got here and some unsolicited advice (if you so wish to read):

Actual Content

While using ProtonMail, I’ve honed in a technique where I categorize and label, then set a retention policy. Below, I list out the steps and provide some example filters I use1.

As a simple example, here’s the filter I use for mail regarding my apartment complex. I receive few emails and want to keep a copy of almost all emails, so I chose to not use a retention policy and manually delete any threads I no longer need.

1
2
3
4
5
6
7
8
if anyof (address :all :comparator "i;unicode-casemap" :contains "From" ["apartmentcomplex.com"]) {
    fileinto "personal";
    fileinto "apt";
} elsif anyof (address :all :comparator "i;unicode-casemap" :contains "From" ["rent@rentcollection.com"]) {
    fileinto "finances";
    fileinto "apt";
    fileinto "rent";
}

A more complex example is one I use for online shopping. I first file everything into the shopping category, then I set any other emails that don’t correspond to order statuses and receipts/eBay emails to expire after 2 weeks.

1
2
3
4
5
6
7
# make sure you import regex and vnd.proton.expire!
if anyof (address :all :comparator "i;unicode-casemap" :contains "From" ["ebay.com", "amazon.com"], address :all :comparator "i;unicode-casemap" :contains "From" ["shoppingsite.com"], address :all :comparator "i;unicode-casemap" :contains ["To", "Cc", "Bcc"] "protonshoppingalias@passmail.net") {
    fileinto "etc/shop";
    if not anyof (header :regex "Subject" "(your.*)?(order|package|shipment).+(confirmed|delivered|update)", address :all :comparator "i;unicode-casemap" :contains "From" ["ebay.com"]) {
    expire "day" "14";
}
}

And of course, the last resort trash filter:

1
2
3
if anyof (address :all :comparator "i;unicode-casemap" :contains "From" ["trash.com"]) {
    fileinto "trash";
}

In general, a filter using this technique can expect to take on the following format (again, see Proton’s help article for more detailed documentation)

1
2
3
4
5
6
7
8
if [singular condition, anyof/allof multiple conditions] {
    # one or both of the following
    fileinto [folder/label];
    expire "day" [X days];
}

# a condition format
[address, header, etc] :[contains, matches, regex, etc] [name] [key]

PS: What about AI?

I’ve heard of tools like Superhuman which do things like automatically label your email with context, and this begs the question: why would someone want or need to go through the effort of keeping your inbox clean and setting up email filters when they could just easily leverage a tool to do it for them?

Trying to solve a problem is essentially trying to bridge the gap between the current situation and an ideal situation. In the context of email, the current situation could be having hundreds of thousands of emails cluttered in your inbox, and the ideal is to be near inbox zero and have everything relevant sensibly organized into different folders and labels. Having good email hygiene will get you close. Making sure you unsubscribe to the pesky email list that won’t stop sending daily updates will save you a ton of junk to sift through, and filters will clean out a good amount of clutter and most things will fall into place where they need to be. However, there will inevitably be cases that slip through the cracks or can’t easily be categorized by a filter. AI will get you even further to ideal, as having context will likely resolve some of the edge cases that weren’t easily doable with a filter.

AI-based email provider wrappers will provide smart features that aren’t possible through filters and sift through emails faster than the human eye, but until a provider comes out with a tool that has AI integrated with an inbox, it’ll always be a bit more


  1. I am using ProtonMail/Sieve-based filtering and hence all examples will be using Sieve, which is the most convenient and configurable solution in my opinion. However, this can be mirrored to work on Outlook if my memory serves me (it has retention policies, but I don’t remember if they are an action that can be used with filters). I don’t think any sort of similar retention policy exists on Gmail, but this solution may work. If none of the options listed correspond to your email provider, you may either need to a. stop living under a rock if you have something like Yahoo or Hotmail or b. modify the following ideas to your email provider. ↩︎

  2. This also applies ↩︎