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]

  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. ↩︎