Open source · AGPL-3.0 · runs locally

Clean your inbox with AI, by hand, or both.

Let a local-first LLM decide what's junk (BYOA - bring your own API key), or match by sender, domain, or nested rules - and combine them. A slick local web app and a scriptable CLI. Preview before you touch a thing; your password never leaves your machine.

One-click installer for Windows & Linux - no Python needed. macOS & other systems via source.

Everything you need to tidy up

Powerful matching, a safety-first workflow, and zero lock-in.

AI Cleanup (new)

A local heuristic scores every sender - on aggregated stats, not every email, so it stays fast - then an LLM judges only the borderline ones.

Run it local-first (free Ollama, nothing leaves your machine) or BYOA with your own cloud key. Only subjects + stats are sent, never message bodies.

💸 In testing: ~13,000 emails cleaned from a 40k mailbox for about €0.03 in ~5 min with gpt-4o-mini (a local model is free). It gets cheaper the more you run - known spam senders are skipped next time.

Email notifications

Get an email when a cleanup finishes - for scheduled jobs and runs. Bring any SMTP provider (Gmail, Amazon SES, SendGrid…); profiles are stored locally and can be encrypted.

Spam addresses + 1-click unsubscribe (new)

Every AI run saves the flagged senders - with scores and LLM verdicts - to a per-account list. Review, bulk-remove, or report them as spam on the server. Reuse it as a blocklist too.

From that list, bulk-unsubscribe from newsletters: it reads each sender's List-Unsubscribe and does it automatically where possible (mailto or one-click); the rest become a tidy list of link ↗ to finish by hand.

Match anything

By exact sender, whole domain, or nested AND/OR rules built visually. No syntax to memorize.

See before you delete

Count exactly how many emails match, and run a dry-run first. Deletion is opt-in, never a surprise.

Fast on huge folders

Server-side IMAP search for tens of thousands of messages, or strict local matching when you need it. An optional local cache makes repeat AI reports near-instant - only new messages are fetched, a big win on slow servers.

Gmail-aware

Moves matches to Trash the right way and understands [Gmail]/All Mail and localized folders.

Web UI + CLI

A friendly local web app and a scriptable command line. The core is standard-library only and dependency-free.

Schedule it

Install jobs into Windows Task Scheduler or cron - once, hourly, daily, weekly, monthly. They run even when the app is closed.

Connection profiles

Save multiple accounts, optionally encrypted (with a re-save guard so they never silently drop to plain text). Pick one from a dropdown, each with its own local-cache toggle.

Runs anywhere

Windows, macOS, Linux. Even on a headless server - drive the GUI from your laptop over an SSH tunnel.

Move, don't just delete

Send matched mail to another folder instead of deleting, and create folders (or labels on Gmail) right from the app - free & open source, all on your machine.

Up and running in minutes

Grab the installer for your system - no Python needed - or install from source with pip.

One-click installer - no Python needed. It bundles its own Python (isolated from anything already on your PC) and adds an icon that opens the app in your browser.

⬇ Download for Windows Coming soon to the Microsoft Store

During setup you can tick AI Cleanup (optional); the Web UI is always installed. On first run, if Windows shows "protected your PC", click More info → Run anyway.

A single AppImage - no install, no root, no system Python. Runs on most distributions.

After downloading, make it executable and run it (it starts the local web UI and opens your browser):

$ chmod +x imap-cleanup-tool-x86_64.AppImage && ./imap-cleanup-tool-x86_64.AppImage

Headless server? Download and run in one line (no browser), then reach it via an SSH tunnel:

$ curl -L -o imap-cleanup-tool.AppImage https://github.com/mrpickles007/imap-cleanup-tool/releases/latest/download/imap-cleanup-tool-x86_64.AppImage && chmod +x imap-cleanup-tool.AppImage && ./imap-cleanup-tool.AppImage --no-browser

No FUSE on the server? Add --appimage-extract-and-run right after the AppImage name. To reach the UI from your machine: ssh -L 8765:127.0.0.1:8765 user@server, then open http://127.0.0.1:8765 locally.

A native macOS app is on the roadmap. For now, install from source - a 2-minute pip install that works the same: launch it and the web UI opens in your browser.

Any platform with Python 3.10+. The [web,ai] extra pulls in the UI and AI Cleanup ([web] alone skips the AI bits).

$ pip install "imap-cleanup-tool[web,ai]"

No Python yet? Get it here - on Windows tick "Add python.exe to PATH".

Download Python 3.10+

Only needed for the Source install - the Windows and Linux downloads bundle their own Python. On Windows, tick "Add python.exe to PATH" in the installer.

However you install, launching the app starts the local web UI and opens your browser. Then pick folders, build a rule, preview, and run. Read the docs ↗

Open source, and proud of it.

Inspect every line, fork it, or send a pull request. Licensed under the AGPL-3.0 so it stays free for everyone - forever.