A browser extension for automatically organizing Tuta Mail emails based on custom rules. Select, trash, archive, and manage emails with powerful filtering rules!
- Rule-Based Email Organization: Create custom rules to automatically organize your emails
- Multiple Match Types:
- Exact subject match
- Subject contains text
- Exact sender match
- Sender contains text
- Multiple Actions:
- Move to Trash
- Archive
- Mark as Read
- Mark as Unread
- Select Only (for manual actions)
- Easy-to-Use Interface: Clean, modern popup UI for managing rules
- Real-Time Processing: Run rules on-demand with one click
- Rule Management: Enable/disable rules individually without deleting them
-
Download or Clone this repository:
git clone https://github.com/jollySleeper/TutOrg.git cd TutOrg -
Create Extension Icons (optional, but recommended):
# Option 1: Using Python (requires Pillow) pip install Pillow cd icons python3 create_icons.py # Option 2: Open icons/create_icons.html in a browser # Icons will auto-download
-
Load the Extension:
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" (toggle in top-right corner)
- Click "Load unpacked"
- Select the
TutOrgfolder - The extension icon should appear in your toolbar!
- Open Chrome and go to
-
Download or Clone this repository (same as above)
-
Create Icons (same as above, optional)
-
Load the Extension:
- Open Firefox and go to
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Navigate to the
TutOrgfolder and selectmanifest.json - The extension will be loaded temporarily (removed on browser restart)
For permanent installation, you'll need to package and sign the extension through Mozilla's Add-on store.
- Open Firefox and go to
-
Open Tuta Mail in your browser (mail.tuta.com or app.tuta.com)
-
Click the Extension Icon in your toolbar to open the popup
-
Click "Add Rule" to create a new rule
-
Configure the Rule:
- Rule Name: Give it a descriptive name (e.g., "Archive Fedora Summaries")
- Match Type: Choose how to match emails
Subject: Exact subject matchSubject Contains: Subject contains textSender: Exact sender matchSender Contains: Sender contains text
- Match Value: The text to match (e.g., "[Fedora Discussion] Summary")
- Action: What to do with matching emails
Move to Trash: Delete the emailsArchive: Move to archiveMark as Read: Mark emails as readMark as Unread: Mark emails as unreadSelect Only: Just select them (no automatic action)
- Enabled: Check to enable the rule immediately
-
Click "Save Rule"
-
Click "Run Rules Now" to apply all enabled rules to your current inbox view
Example 1: Clean Up Discussion Summaries
Rule Name: Delete Fedora Summaries
Match Type: Subject
Match Value: [Fedora Discussion] Summary
Action: Move to Trash
Example 2: Auto-Archive Newsletters
Rule Name: Archive All Newsletters
Match Type: Subject Contains
Match Value: Newsletter
Action: Archive
Example 3: Mark Notifications as Read
Rule Name: Auto-Read Notifications
Match Type: Sender Contains
Match Value: notifications@
Action: Mark as Read
- Enable/Disable: Click the button next to each rule to toggle it
- Delete: Click "Delete" to remove a rule permanently
- Run Rules: Click "Run Rules Now" to process all enabled rules
- Refresh Page: Click "Refresh Page" to reload Tuta Mail
- Content Script: Injects into email client pages to interact with emails
- Rule Matching: Scans visible emails for matches based on your rules
- Email Selection: Automatically checks matching email checkboxes
- Action Execution: Performs the specified action (trash, archive, etc.)
The extension only processes visible emails in your current inbox view. Scroll or load more emails to process additional items.
TutOrg/
├── manifest.json # Extension configuration
├── popup.html # Extension popup UI
├── popup.css # Popup styling
├── popup.js # Popup logic and rule management
├── content.js # Content script for Tuta Mail interaction
├── background.js # Background service worker
├── icons/ # Extension icons
│ ├── icon16.png
│ ├── icon48.png
│ ├── icon128.png
│ ├── create_icons.py
│ └── create_icons.html
└── README.md
The extension requires:
storage: To save your rulesactiveTab: To interact with the current tabhost_permissions: To access Tuta Mail domains
Rules are stored using Chrome's chrome.storage.sync API, which:
- Syncs across your devices (if signed into Chrome/Firefox)
- Persists even if you close the browser
- Has a limit of ~100KB (plenty for rules)
- Test Rules First: Use "Select Only" action to preview matches before deleting
- Be Specific: Use exact matches when possible to avoid false positives
- Start Simple: Begin with one or two rules, then expand
- Regular Cleanup: Review and update rules periodically
- Scroll to Load: The extension only processes visible emails, so scroll down to load more
- Check Rule is Enabled: Disabled rules won't run
- Verify Match Value: Case-sensitive for exact matches
- Reload Page: Click "Refresh Page" button
- Check Console: Open browser DevTools (F12) and check for errors
- Scroll Down: Load more emails if needed
- Check Developer Mode: Must be enabled in
chrome://extensions/ - Reload Extension: Click the reload icon in extensions page
- Check Tuta Mail URL: Must be on mail.tuta.com or app.tuta.com
- Browser Compatibility: Tested on Chrome, Edge, Brave, and Firefox
- Only processes visible emails (pagination not automated)
- Actions depend on Tuta Mail's UI structure (may break with major updates)
- No automatic scheduling (must click "Run Rules Now" manually)
- Folder/label selection not yet supported (coming soon!)
- Custom folder/label support
- Scheduled automatic rule execution
- Import/export rules
- Rule templates library
- Advanced filtering (date, has attachments, etc.)
- Undo functionality
- Bulk actions on all pages
- Statistics and reporting
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
- Improve documentation
MIT License - feel free to use and modify as needed!
Created for anyone tired of manually organizing Tuta Mail! Special thanks to the Tuta Mail team for building a privacy-focused email service.
Having issues? Questions? Suggestions?
- Open an issue on GitHub
- Check the console for error messages (F12 → Console tab)
- Make sure you're using the latest version
Happy Organizing! 🎉