IMAP Cleanup Tool

Connection

Profile

Folders iPick the folders to scan. Gmail uses special names like [Gmail]/All Mail, [Gmail]/Trash (may be localized). Connect first to load the list.

Not connected - folders will appear here. Defaults to INBOX.

Add to scan just includes a folder in the list above (creates nothing). Create on server actually creates a new folder - a label on Gmail - on your mailbox (e.g. to use as a move destination).

⚠️ Every action - Run, List senders, Empty folder, Move - applies to the selected folders above. On a folder row, 🗑 deletes it on the server (system folders like Trash/Sent are protected and have no 🗑), while × only removes it from this list.

✨ AI Cleanup Manual Cleanup

Manual Cleanup

What to match

Choose which messages to act on: paste senders / domains as a Target list, or build a Rule with the query builder. This selects the messages for Count, Run and Export - and, with AI Cleanup, the senders the AI analyzes.

Senders / domains, one per line i One entry per line:
spam@example.com - exact sender address
*@newsletter.com - that domain exactly, never subdomains
annoying.com - that domain, plus subdomains if “Include subdomains” is on
mail.annoying.com - that specific subdomain
• lines starting with # are comments
In "full" mode, *@paypal.com = paypal.com without Include-subdomains. The point: with Include-subdomains on, *@paypal.com stays exact while bare domains (e.g. newsletter.com) also catch their subdomains - so you can mix per-entry. ("search" mode is always a substring match.)

one entry per line · reuse across runs

Options iThese shape a Target list / Rule run. AI Cleanup decides what to delete on its own and ignores all of them (it always scans server-side, never moves/empties, and handles Gmail Trash automatically). Expunge (in the Run section below) is the exception - it applies to AI Cleanup too.

Below options apply to a Target list / Rule run only - AI Cleanup ignores them.

Counts how many emails match the current filter in the selected folders - makes no changes.

These also follow your filter: Export downloads the matching messages - or the whole selected folder(s) if no filter is set; Import appends into the single selected folder (one only, not more).

iExport downloads the full matching messages (headers + body) from the selected folders as a single .mbox file - same matching as Count (targets/rule, "search" or "full"), or the whole folder when no filter is set. Read-only: it does not mark anything as read. Import appends the messages from a .mbox (or single .eml) file into the one folder you have selected.

✨ AI Cleanup iScores every sender with a heuristic spam score (List-Unsubscribe, unread ratio, send frequency, sender pattern, bulk), then - with a configured model - asks an LLM to judge the senders above your threshold. Press Run to act: with Report only ticked it just builds the report (deletes nothing); without it, Run deletes the senders the LLM confirms. It honors your Target list / Rule as a filter, or scans the whole folder when empty.

Advanced: scoring weights (calibrated)

These weights drive the heuristic spam score (the local analysis that runs before any LLM). You can change them, but they were calibrated through testing - it is recommended to leave the default values unless you know what you are tuning.

Press Run (below) to launch: with Report only it just builds the report; without it, it deletes the confirmed senders. Saved reports live in the Report tab (download / delete there).

Log


  
Cleanup action

How many messages each IMAP request handles. Used at full size by: Count / Run / Export matching in "full" mode (header fetch), Export (message bodies), the Import duplicate-check (Message-IDs), and Delete / Expunge / Move / Empty. Capped for a few: AI Cleanup and List senders fetch headers at max 50/request, and on Gmail "move to Trash" is auto-capped at 200 (so these ignore a larger batch size). The "search" mode does one server-side SEARCH, so batch size doesn't apply there. The import itself is one message at a time (IMAP APPEND), so it isn't batched.

Runs the action chosen above on the selected folders: Manual Cleanup (delete / move / empty folder for the matching messages) or AI Cleanup (heuristic + LLM, then delete the confirmed senders). With dry-run on, “Run” only previews - nothing is changed.

List senders

Shows the senders in the selected folders, following the selected filters (Target list / Rule) when one is set, ranked by how many emails each sent - use it to decide what to target.

Downloads the last “List senders” result to your browser’s download folder. Edit the file name if you like; with “ask where to save” enabled, your browser also lets you choose the folder.