mailsieve
DocsDonate
open source · self-hosted · any IMAP server

Clean out years of email in an afternoon.

mail-sieve groups every message by sender, then lets you archive, trash or unsubscribe from thousands at once. It runs on your own machine, so your mail never passes through anyone else's server.

The mail-sieve Overview screen: message totals, the share of mail from senders you never open, and the biggest senders ranked by count.
The Overview screen, shown here with sample data.
features

Built for the inbox with thousands unread.

Email clients make you work one message at a time. mail-sieve works one sender at a time, which is how the clutter arrived in the first place.

01 · senders

See who's filling your inbox

Every sender, domain and mailing list, ranked by message count, unread count and storage. Most people find a handful of senders account for a third of everything.

SenderMessagesSize
LLinkedIn4,812612 MB
AAmazon3,201418 MB
MMedium Daily Digest2,654201 MB
GGitHub2,19088 MB
UUber Eats1,407156 MB
from:*@linkedin.comolder_than:1yis:unread
1,246 messages · 239 MB
from:
Address, *@domain or a name
older_than:
Age, e.g. 30d, 6m, 1y
larger:
Size, e.g. 5mb
is:unread
Read state
has:list
Any mailing list
02 · search

Search the way you think about mail

Combine sender, age, size, read state and mailing-list filters. The match count updates as you type, so you know exactly what an action will touch before you take it.

Full search syntax
03 · rules

Rules that keep it clean

Save any search as a rule and pick an action. Rules run after every sync or on a timer, and they can never delete permanently.

How rules work
Old newslettersActive
Archive newsletters older than 30 days, after every sync.
has:list older_than:30d
After every syncLast run 09:15 · archived 214

One-click unsubscribe

Uses the List-Unsubscribe header (RFC 8058 one-click or mailto), so you never open the email or click a tracked link.

Undo from Activity

Archive, trash and move jobs land in the activity log and can be reversed against the server.

Multiple accounts

Connect personal and work mailboxes and clean them from one place.

Storage view

Sort senders by megabytes to find the ones eating your quota.

Fast local index

Headers live in SQLite, so counts, searches and sender groups answer in milliseconds.

Gmail aware

Indexes All Mail with its labels, so every message is counted once and archive does what Gmail means by it.

self-hosted

Your mail stays on your hardware.

One container, one data volume. mail-sieve indexes message headers locally and fetches a body only when you open a preview. Nothing phones home.

  • One container or one binary, on Linux, macOS or Windows
  • Credentials encrypted at rest with a key that stays in your data folder
  • Plain IMAP, so nothing is locked in
Read the install guide
compose.yml
services:
  mail-sieve:
    image: ghcr.io/pmqueiroz/mail-sieve:latest
    restart: unless-stopped
    ports:
      - "127.0.0.1:8080:8080"
    volumes:
      - mail-sieve-data:/data

volumes:
  mail-sieve-data:
support the project

Free forever. Kept alive by the people who use it.

mail-sieve has no paid tier and no investors. Donations pay for maintenance time and provider test accounts.

Can't donate? Star the repo, report a bug or contribute.