Proton Mail Sieve filters

07 Feb 2026

Hey.com introduced (or, at least, popularized) an approach to screen your emails. Basically, all emails from new senders end up in a separate view (“the Screener”). For each of the new senders, you either select a folder their emails end up in, or click "No" and never see their emails again. If you like this approach, but considered switching from Hey to something else, you might have found out that most email services’ filters don’t allow filtering by unknown addresses.

In Proton Mail, it suddenly becomes possible thanks to the Sieve filters and their ability to access your contacts using the extlists extension.

The caveat is that Hey’s Screener feels like a “first-contact inbox”: new senders show up there once, and after you “screen” them they stop being new. This Proton + Sieve setup is a bit different. It’s really a “not in my Contacts” gate.

Go to “Settings–Filters–Add sieve filter”. The below code reproduces the basic Screener functionality (the “Screener” folder must exist):

require ["fileinto", "extlists"];

# Move emails from senders NOT in my address book to the "Screener" folder
if not anyof(
    header :list "from" ":addrbook:personal",
    header :list "from" ":addrbook:myself"
) {
    fileinto "Screener";
    stop;
}

Now, when you see a new email in the Screener folder, you just need to add the sender to your contact list and move the email to whatever folder you want. From here, you can either check the “Always move sender’s emails” check box, or use contact groups (if your plan allows it). For the latter, simply add the contact’s email address to a group (e.g. I called mine “TheFeed” and “PaperTrail” after Hey), and add the respective checks so that the full filter code looks like this:

require ["fileinto", "extlists"];

# TheFeed contacts → "The Feed"
if header :list "from" ":addrbook:personal?label=TheFeed" {
    fileinto "The Feed";
    stop;
}

# PaperTrail contacts → "Paper Trail"
if header :list "from" ":addrbook:personal?label=PaperTrail" {
    fileinto "Paper Trail";
    stop;
}

# Move emails from senders NOT in my address book to the "Screener" folder
if not anyof(
    header :list "from" ":addrbook:personal",
    header :list "from" ":addrbook:myself"
) {
    fileinto "Screener";
    stop;
}

If this makes you curious, check out the docs' "Accessing your contact list" section-Proton Mail's extlists provides access to more interesting information (e.g. cryptographic metadata).

About

This blog contains notes on tech topics that I consider worth sharing or at least keeping for later. I'd be happy if you found these helpful. Feel free to give me feedback at: kk [at] kirill-k.pro.

KK © 2021—2026