mailtrim
github.com
- Free plan
- Linux
What mailtrim is
mailtrim is a free Linux command-line tool for finding and clearing inbox clutter. It ranks senders by storage impact, helping identify accounts using space rather than sorting only by message count. Its purge command can delete messages from selected senders or target a sender domain, including 300 or more messages from one sender in one command. A dry-run preview shows what would be removed before confirmation. Deleted messages move to Trash and can be restored for up to 30 days. The tool works with Gmail and IMAP services, including Outlook, Fastmail, iCloud, and self-hosted IMAP servers. Gmail setup uses OAuth; IMAP setup accepts server credentials without storing the password locally. Optional AI features provide inbox triage, natural-language bulk operations, and weekly digests, and are off by default. AI requests to Anthropic include subjects, sender details, and snippets, not full bodies or attachments. Related data stays locally, with no analytics, crash reporting, or usage tracking.
Who it suits
It suits Linux users who want command-line inbox cleanup across Gmail or IMAP services. Users considering AI features should note what message data is sent to Anthropic.
Good to know, and what to watch
- Ranks senders by storage usage
- Supports bulk deletion and sender domains
- Provides dry-run deletion previews
- Restores deleted messages for 30 days
- Works with Gmail and IMAP services
- Linux command-line tool only
- AI features are off by default
- AI use sends snippets to Anthropic
- Multi-user and server threats are out of scope
Plans
Every plan and priceFree
Free plan
The verdict
mailtrim focuses on local, command-line cleanup with sender storage rankings, previews, and recoverable deletion. Its broad IMAP support and optional AI tools are balanced by the Linux-only interface and stated single-user threat model.
What the maker publishes
- AI data
- When cloud AI is used, email subjects, sender details, and snippets are sent to Anthropic; full message bodies and attachments are not sent. source
- AI features
- Optional AI features include inbox triage, natural-language bulk operations, and weekly digests; AI is off by default. source
- Authentication
- Gmail setup uses OAuth, while IMAP setup accepts server credentials and keeps the password out of local storage. source
- Bulk cleanup
- The purge command can bulk-delete emails from selected senders or target a sender domain. source
- Cleanup
- It ranks senders by storage impact and supports bulk cleanup, including deleting 300+ emails from one sender in a single command. source
- Cloud AI data
- When AI features use Anthropic, the tool sends email subjects, sender names or addresses, and snippets, but not full email bodies or attachments. source
- Email providers
- It works with Gmail and IMAP services, including Outlook, Fastmail, iCloud, and self-hosted IMAP servers. source
- License
- The repository describes mailtrim as MIT-licensed and free to use, modify, and distribute. source
- Local data
- The privacy policy says email metadata, undo logs, and related data are stored locally, and full email bodies are never stored locally or sent anywhere. source
- Local storage
- The privacy policy says OAuth tokens, metadata cache, undo logs, rules, and unsubscribe history are stored locally under ~/.mailtrim/. source
- Purpose
- mailtrim is a command-line tool for finding and cleaning up inbox clutter. source
- Safety preview
- The purge command supports a dry-run preview of what would be deleted before confirmation. source
- Security limitation
- The threat model describes mailtrim as a single-user local CLI and says multi-user or server deployment threats are out of scope. source
- Sender ranking
- It ranks senders by storage impact, rather than only by message count. source
- Support
- The README directs users to GitHub Issues for bug reports and feature requests. source
- Telemetry
- The privacy policy says mailtrim has no analytics, crash reporting, or usage tracking. source
- Undo
- Deleted messages go to Trash and can be restored for up to 30 days. source
Checked against the maker's pages on 8 Oct 2026.