I always assumed Gmail bloat came from large attachments.
Turns out 3 senders were responsible for 30% of my inbox —
thousands of tiny emails I'd never thought to clean up. I built mailtrim to surface this pattern:
- ranks senders by actual storage impact (not just count)
- confidence scoring on what's safe to bulk-delete
- 30-day undo on everything — nothing is permanent by default
- runs entirely locally, no email data leaves your machine
Free, open source (MIT). No subscription, no backend.
One friction point upfront: Gmail API setup is one-time, ~15 min.
After that it's just `mailtrim stats` and `mailtrim purge`.
Keen to hear feedback on the confidence/safety model especially —
that's the part I'm least sure I've got right.
https://github.com/sadhgurutech/mailtrim
Show HN: mailtrim – find what's actually filling your Gmail inbox
A privacy-focused, open-source solution to identify and manage Gmail storage consumption by ranking senders by actual storage impact, offering safe bulk-delete with undo functionality.
Product Positioning & Context
AI Executive Synthesis
A privacy-focused, open-source solution to identify and manage Gmail storage consumption by ranking senders by actual storage impact, offering safe bulk-delete with undo functionality.
Mailtrim addresses a common user pain point: managing email storage and identifying the true sources of inbox bloat. Its core innovation lies in ranking senders by actual storage impact, not just email count, providing a more accurate basis for cleanup. The emphasis on local execution and no data leaving the machine directly targets growing privacy concerns, positioning it as a trustworthy alternative to cloud-based email management tools. The '30-day undo' feature mitigates user anxiety around bulk deletion, enhancing usability. This project highlights a market demand for privacy-centric, client-side tools that empower users with data control, particularly for services like email where data sensitivity is high.
Community Voice & Feedback
Live on Pypihttps://pypi.org/project/mailtrim/
I'd like an option to run against a local ollama server, that would give folks an option to keep this completely local.For me, it seems to be quite a few senders that fill my inbox. running```
mailtrim purge
```only finds about 200 MB of purge suggestions with a mailbox of 15GB, but deleting a few and running again finds a few more.Gmail does some classification, it might be useful to have scopes that match those: promotions, updates, social and forums.IMAP support would be useful for a yahoo account even if it's slower/less accurate. This is better than manual cleanup.
mailtrim purge
```only finds about 200 MB of purge suggestions with a mailbox of 15GB, but deleting a few and running again finds a few more.Gmail does some classification, it might be useful to have scopes that match those: promotions, updates, social and forums.IMAP support would be useful for a yahoo account even if it's slower/less accurate. This is better than manual cleanup.
Very cool. I need to clean up email as I'm nearing the storage limit of a free gmail account.
I would love it if it could run against archived messages (`in:anywhere -in:trash -in:spam`) ... I've been archiving all email for a very long time and being able to run stats and purge it would do wonders.
Nice approach. Confidence scoring on what's the safe one to delete is smart, and that's the hardest part of any cleanup tool. How are you handling false positives?
I've been thinking about similar confidence scoring in a different domain (security) and the calibration is really tricky when the cost of getting it wrong is high.
I've been thinking about similar confidence scoring in a different domain (security) and the calibration is really tricky when the cost of getting it wrong is high.
Very cool! Congratulations on putting this together.Was also tinkering with Gmail bloat but, admittedly, with a less ambitious approach. Definitely going to give it a try.
Did you really use a LLM to generate the sample output in your readme instead of just running the application? I noticed the borders were all misaligned and wondered if you had hardcoded the number of spaces, but I looked at the code and you haven't.If you did generate the output with a LLM instead of just running it... why?Also:> It uses Claude AI for smart classification, but runs entirely locally: your emails never leave your machine.How can both of these things be true? How can Claude be used as a classifier without sending your emails to Claude? From looking at the code it appears that you do in fact just send off emails to Claude, or at least the first 300-400 characters, so that line is just a complete lie.
Why thousands? You never read or delete all your emails within a day?My inbox, which I have for almost two decades only has 28 emails in it. Not 28 unread emails, but 28 total emails. I delete everything within a day of receiving, except for every important things, hence why 28 of them still remain.Keeping thousands of emails in your inbox, while virtually free, is an attack vector for hackers, and also a gold mine for advertisement brokers who pay email providers money to show you ads based on your daily habits.
Curious if others have noticed the same pattern — a few senders making up most of the inbox.
Happy to help with setup if anyone tries it — GCP step is the only slightly annoying part right now.
Related Early-Stage Discoveries
Discovery Source
Hacker News Aggregated via automated community intelligence tracking.
Tech Stack Dependencies
No direct open-source NPM package mentions detected in the product documentation.
Media Tractions & Mentions
No mainstream media stories specifically mentioning this product name have been intercepted yet.
Deep Research & Science
No direct peer-reviewed scientific literature matched with this product's architecture.
Market Trends