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):
- Growing up, I never really had to clean up my inbox for a while because well, obviously, I was a child with no roles and responsiblities, no services and products, and no notifications and newsletters to deal with. The majority of my emails were actual conversations with little to no substance, and occasionally I would get maybe a notification from my school portal or something of the like.
- Soon enough, even a few subscriptions or notifications would pile up, so I picked up on something called making labels to segment my inbox. As a bright and well-adjusted child, I created insightful labels that made it easy for me to categorize and look back on after years, such as “My Extra High Math Grade” (when my troll freshman high school math teacher misentered some grades and caused everyone to have something like a 4000% for 3 days) and “Extremely annoying news I don’t want to hear”.
- When these labels or my inbox got too full, I would go back and delete things by typing things into the search bar (this step was optional) and unselect conversations I wanted to keep, then proceed to delete the rest. I rarely needed to do this.
- As I went through high school and undergrad, email piled up, and eventually the search-select-delete method became infeasible. I also kept getting emails which showed up in the main inbox (as my school email uses Gmail), which became a bother as I would get notified for a irrelevant information. At some point, that’s when I started using email filters, just searching for a term in Gmail’s search bar and filtering it out of my inbox. Eventually, I learned to utilize more than the search bar, filtering by senders and subjects for more specificity, and combining multiple queries to be more precise in my queries.
- Recently (as of writing this article, and with respect to the entire time I’ve had an email), my two personal emails were essentially dumpsters with no pertinent information and did not have particularly professional addresses, so I made the decision to get a new personal email. I was recommended ProtonMail, and this is where the journey begins.
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 use.
- Preface: Deal with emails at the source. I’ve been told this for solving other problems, and this can also be applied to email hygiene. If you no longer have a use for a mailing list, unsubscribe or update your email preferences. Email filters to trash irrelevant mail should be used as a last resort.
- Categorize and Label: This is more up to personal preference on how you want to organize it, but personally, I use folders to compartmentalize types of emails and possibly subfolders to go into more depth, and I use labels or broader topics that might span across multiple categories. I set up conditions based on email senders/recipients or the email subject (see Proton’s help article for a wide variety of examples), then use
fileinto [folder/label]
to categorize and label them.- For example, I just ripped off my container tabs to use as labels, which are essentially personal, academic, banking, shopping, health; within academic emails, I split it into bCourses, Edstem, Gradescope, and teaching. As for labels, I get general email relating to my apartment (complex), which I’ve set as personal email, and receipts for rent, which I put into my finances folder. Both these are relevant to my apartment, so I’ve given them the label to be easily distinguishable in their respective folders.
- Set a retention policy: This is the key step to keeping your inbox clean and periodically flush out information as it becomes less relevant. Set emails to automatically delete after some time with the
expire
command in Proton - simply write expire "(days|hours|minute)" X
, with X
being the number of days (or minutes/seconds, if you prefer that) you want to keep the email. Some retention policies I’ve set:- bCourses/teaching emails: default 90 days; these are often specific to a semester and I’ll end up deleting most bCourses threads after the semester ends anyways.
- Edstem: default 30 days. I only follow the threads that I
participate ask questions in, which I expect will be resolved within a month at the latest. - Strava: 7 days for most “notification” emails - e.g. activities, challenges, comments, which are interesting to catch up on shortly after an activity, but not for much longer after.
- Mailing Lists: 14 days. If I wanted to glean information from a mailing list, I would’ve done so before the email got deleted.
- Verification Codes: 1 day. They end up clogging my inbox and aren’t needed after verification. I could probably be more aggressive about this and make it a handful of hours.
- Receipts/Account Statements: Never - self-explanatory
- Last Resort: Filter to Trash. For edge cases which can’t be easily dealt with (e.g. can’t easily unsubscribe, but don’t want the email anyways), directly filter the email to the trash with
fileinto "trash"
.
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]
|