Let AI help you organize your emails intelligently.
β οΈ Not yet in Thunderbird Add-on Store - Manual installation required. Official store submission in progress.
π₯ Download β’ π Documentation β’ π Report Bug β’ π‘ Request Feature
- β¨ Features
- π₯ Installation
- π Quick Start
- βοΈ AI Provider Setup
- π‘ Usage
- π§ Technical Details
β οΈ Troubleshooting- π Changelog
- π€ Contributing
|
Choose from 5 leading cloud AI providers or run a local Ollama model:
|
|
|
|
π₯ Additional Features
- β Secure Storage - Encrypted API key storage
- β Batch Processing - Sort many emails in parallel with a live progress panel (cancel / retry failed)
- β Bulk Key Import - Add many Gemini keys at once with duplicate detection
- β Toolbar Popup - Quick API usage summary with shortcuts to Settings and Batch Panel
- β Dark Mode - Full dark-theme support across all screens
- β Rate Limiting - Built-in quota management (Gemini)
- β Professional UI - Clean, intuitive interface
- β Move History - Track all email movements
- β Real-time Validation - Instant feedback
- β Open Source - Transparent, auditable code
1. Visit: https://github.com/Nigel1992/AutoSort-Plus/releases
2. Download: autosortplus.xpi
3. Thunderbird: Tools β Add-ons and Extensions
4. Click: βοΈ β Install Add-on From File
5. Select: autosortplus.xpi
6. Restart Thunderbirdgit clone https://github.com/Nigel1992/AutoSort-Plus.git
cd AutoSort-Plus
zip -r autosortplus.xpi manifest.json background.js options.js options.html styles.css content.js icons/Open settings and select from Gemini, OpenAI, Claude, Groq, Mistral, or Ollama (Local LLM)
Click "Get API Key" button β Create free account β Copy key. For Ollama (local): install Ollama from https://ollama.ai/download and pull a model (e.g., ollama pull llama3.2). No API key required for Ollama.
Load folders from IMAP or add custom labels
Option 1: AI-Powered Sorting
- Select emails β Right-click β AutoSort+ β Batch Analyze with AI
- The AI will analyze and move emails to the best folder/category.
Option 2: Manual Labeling
- Select emails β Right-click β AutoSort+ β AutoSort Label β [Pick any label]
- The selected label/category will be applied instantly to all selected emails.
β οΈ Warning: If you add or change labels in the settings menu, you must restart Thunderbird for the new labels to appear in the right-click menu.
π Note: Currently requires manual selection and right-click. Automatic background sorting coming in future update!
| Provider | Get API Key | Free Tier | Best For |
|---|---|---|---|
| πΉ Gemini | Get Key | β 20/day per key | Best overall free option |
| πΉ Groq | Get Key | β 30/min | Speed & high limits |
| πΉ Claude | Get Key | β Limited | Privacy & safety |
| πΉ OpenAI | Get Key | Highest accuracy | |
| πΉ Mistral | Get Key | β Limited | GDPR compliance |
| πΉ Ollama | Install Ollama | β Local (no external usage) | Run local LLMs (llama3.2, tinyllama, phi, gemma). No API keys required; supports model downloads and CPU-only mode. |
β οΈ IMPORTANT: Free tiers are limited for email processing due to large text content.
| Provider | Free Limit | Recommendation |
|---|---|---|
| Gemini | 20 emails/day per API key | β Create multiple keys in different projects |
| Groq | 20-30 emails/day | β Best free tier overall |
| Claude | 10-15 emails/day | Good for privacy-conscious users |
| OpenAI | 5-10 emails/day | Consider paid plan ($5-20/mo) |
| Mistral | 10-15 emails/day | Best for EU users |
π‘ Tips for Managing Free Tier Limits
For Gemini users (NEW in v1.2.1!):
- π Multiple API Keys: Add keys from different Google Cloud projects
- π Automatic Rotation: Extension switches keys when limits are reached
- π Per-Key Tracking: Monitor usage for each key independently
- β¨ Example: 5 keys = 100 requests/day total (20 per key)
- π§ How to add: Settings β Add Another Gemini Key
- Check usage: AI Studio Usage
For all providers:
- Process emails in small batches
- Use "Gemini paid plan" checkbox to disable limits (if you have paid tier)
- Consider paid plans for daily use ($5-20/month)
- Select Emails - Click one or more emails in Thunderbird
- Right-Click Menu - Right-click β AutoSort+ β Batch Analyze with AI
- Smart Sorting - A Batch Panel tab opens with a live progress bar; the AI analyzes and moves each email to the appropriate folder. You can Cancel at any time, or Retry Failed emails when it finishes
- Track History - View last 100 moves in settings
π Coming Soon: Automatic background sorting (currently manual via right-click)
οΏ½ Multiple API Keys (Gemini)
- Add unlimited keys from different projects
- Bulk import many keys at once (one per line) with duplicate detection
- Automatic rotation when limits reached
- Individual testing and status tracking
- Visual indicators (Active, Ready, Near Limit)
- Combined quota = keys Γ 20 requests/day
π Usage Monitoring (Gemini)
- Real-time usage display in settings
- Per-key usage statistics
- Automatic warnings at 15/20 limit
- Smart key rotation
π Folder Management
- Load folders from IMAP accounts
- Bulk import from text list
- Create custom categories
- Auto-create missing folders
π Move History
- Last 100 email moves
- Timestamps and destinations
- Success/failure status
- Clear history option
ποΈ Batch Processing
- Right-click β Batch Analyze with AI to sort many emails
- Live progress panel with per-email results
- Parallel analysis β Parallel batch size is configurable (1β20) in Settings
- Cancel anytime, or retry only the failed emails
You can also manually label emails without AI analysis:
- Select Emails - Click one or more emails in Thunderbird.
- Right-Click Menu - Right-click β AutoSort+ β AutoSort Label β [Pick any label]
- Label Applied - The selected label/category will be applied to all selected emails instantly.
Note: If you add or change labels in the settings menu, you must restart Thunderbird for the new labels to appear in the right-click menu.
π Example Folder Categories
Work & Professional:
- Meetings
- Project Updates
- Invoices
- HR & Benefits
Financial:
- Bills & Payments
- Bank Statements
- Receipts
- Tax Documents
Personal:
- Family
- Friends
- Health
- Travel
Online Services:
- Shopping Confirmations
- Social Media Notifications
- Subscriptions
- Password Resets
Promotions:
- Newsletters
- Sales & Discounts
- Offers
- Marketing
Support:
- Tickets & Help
- Documentation
- Updates
- Complaints
βββββββββββββββββββββββββββββββββββββββββββ
β Thunderbird Email Client β
ββββββββββββββββ¬βββββββββββββββββββββββββββ
β
ββββββββββββββββΌβββββββββββββββββββββββββββ
β AutoSort+ Extension β
β β
β ββββββββββββ ββββββββββββ β
β β UI Layer β β Backgroundβ β
β β(options) ββββ€ Script β β
β ββββββββββββ βββββββ¬ββββββ β
β β β
β βββββββββΌβββββββββ β
β β Rate Limiter β β
β β (Gemini only) β β
β βββββββββ¬βββββββββ β
ββββββββββββββββββββββββΌββββββββββββββββββ
β
βββββββββββββββ΄ββββββββββββββ
β β
ββββββΌβββββ ββββββββββ βββββββΌββββββ
β Gemini β β Groq β β Claude β
β API β β API β β API β
βββββββββββ ββββββββββ βββββββββββββ
| File | Purpose | Key Functions |
|---|---|---|
background.js |
AI analysis engine | analyzeEmailContent(), rate limiting |
options.js |
Settings UI | Provider config, usage display |
content.js |
Email extraction | Message content parsing |
manifest.json |
Extension config | Permissions, metadata |
{
// User Configuration
apiKey: "string",
aiProvider: "gemini|openai|anthropic|groq|mistral",
labels: ["Work", "Personal", ...],
enableAi: boolean,
geminiPaidPlan: boolean,
geminiModel: "string", // e.g. "gemini-3.5-flash-lite"
providerModel: "string", // optional model override for non-Gemini providers
// Rate Limiting (Gemini)
geminiRateLimit: {
requests: [timestamp, ...],
dailyCount: number,
dailyResetTime: timestamp
},
// History
moveHistory: [
{
timestamp: string,
subject: string,
status: string,
destination: string
},
...
]
}| Feature | Status | Details |
|---|---|---|
| π API Key Storage | β Encrypted | OS-level encryption via browser storage |
| π§ Email Content | β Not Stored | Analyzed in memory, never persisted |
| π Data Transmission | β Direct to AI | No intermediary servers |
| π Telemetry | β None | Zero tracking or analytics |
| π Open Source | β Auditable | Full transparency |
| π‘οΈ Permissions | β Minimal | Only required APIs |
Your privacy matters: All email analysis happens directly between your Thunderbird and chosen AI provider. No data passes through our servers because we don't have any!
π§ Settings Page Won't Load
1. Thunderbird β Settings β Privacy β Cookies and Site Data
2. Click "Clear Data"
3. Tools β Add-ons β AutoSort+ β Reloadπ API Key Not Working
- Verify key is copied correctly (no spaces)
- Click "Test API Connection" button
- Check key is from correct provider
- Ensure API key has proper permissions
- For Gemini: Check usage page
β Email Analysis Fails
Check:
- β Internet connection active
- β API key is valid
- β Provider status page for outages
- β Rate limits not exceeded
- β Email content isn't empty
For Gemini users:
- Check usage counter in settings
- Verify daily limit not reached (20/day)
- Switch to new API key if needed
π Wrong Labels Applied
- Ensure labels are case-sensitive matches
- Avoid special characters in folder names
- Verify labels are saved (green checkmark)
- Check move history for patterns
β±οΈ Rate Limit Errors
Gemini (20/day per key):
- Create new API key in different project
- Reset counter after switching keys
- Enable "paid plan" option if you have one
Other Providers:
- Wait for rate limit window to reset
- Consider upgrading to paid tier
- Use provider's usage dashboard
| Component | Requirement |
|---|---|
| Thunderbird | 78.0 or later |
| Internet | Active connection for API calls |
| API Key | Valid key from chosen provider |
| Storage | ~1MB for extension data |
| OS | Windows, macOS, Linux |
π New Features
- β Batch progress panel - "Batch Analyze with AI" opens a dedicated panel with a live progress bar, per-email results (sorted / skipped / failed), running counts, and live per-key API usage cards. Includes Cancel and Retry Failed only controls, and re-syncs automatically if you reopen the tab
- β Parallel batch processing - Emails are analyzed concurrently in chunks (5 at a time by default, configurable 1β20 in Settings β General Settings) so large batches finish much faster, with per-key usage counting kept correct
- β Bulk import Gemini API keys - Paste many keys at once (one per line) into Settings β Multiple Gemini API Keys β Bulk Import with duplicate detection, instead of adding them one at a time
- β Toolbar popup - Click the AutoSort+ toolbar icon for an at-a-glance API usage summary (aggregated across all Gemini keys) with quick buttons to open Settings and the Batch Panel
- β Dark mode - Full dark-theme support across Settings, the popup, and the Batch Panel (follows your OS/Thunderbird color scheme)
π Bug Fixes
- β Accurate AI call counting - One email now uses exactly one API request; retries no longer re-analyze the same email (previously batches could over-consume quota)
- β More reliable email content extraction - HTML bodies are now properly converted to text (the conversion is awaited) and messages without MIME parts are handled, so fewer emails are skipped
- β
Fixed
rateLimit is undefined- Per-key Gemini usage is now normalized with safe defaults - β Fixed usage race condition - Concurrent requests could clobber the per-key daily counter; a lock now serializes reads/writes so batch usage is counted correctly
- β Added LM Studio as a local LLM provider (native REST API, optional Bearer token)
- β List Models / Test Connection buttons and tolerant Server URL handling
- β
Gemini
404on new API keys fixed (default model nowgemini-3.5-flash-lite) - β Choose your Gemini model (with Load Available Models); optional model override for other providers
- β
Gemini 3.x
thinkingLevelsupport
- β
Groq updated to the supported
openai/gpt-oss-120b
- β Toolbar icon for one-click settings access
- β Manual label application via right-click works in all views
- β Fixed single-key usage display and rate-limit notifications
- β Clearer API test feedback (429/401/403) and hover tooltips
- β Add multiple keys with automatic rotation and per-key usage tracking
π New Features
- β Multi-provider AI support (5 providers)
- β Gemini rate limiting (5/min, 20/day enforcement)
- β Real-time usage tracking dashboard
- β IMAP folder auto-discovery
- β Bulk label import
- β Move history (last 100 entries)
- β Professional UI redesign
- β Provider info cards
π§ Improvements
- β Groq updated to llama-3.3-70b
- β Better error handling and validation
- β Auto-create missing folders
- β Skip null categories
- β Batch email processing fixes
- β Professional funnel/envelope icons
- β Example folder categories
βοΈ Technical Changes
- β Unified API key storage
- β Settings validation system
- β Recursive folder traversal
- β Fixed syntax errors in options.js
- β Improved state management
- Initial release with Gemini support
| Priority | Feature | Status |
|---|---|---|
| π΄ High | Detailed Logging - Debug mode with console output | π Planned |
| π΄ High | API Response Headers - Extract rate limit info from API | π Planned |
| π‘ Medium | Smart Key Switching - Auto-suggest when to switch keys | π‘ Proposed |
| π‘ Medium | Scheduled Processing - Auto-sort at specific times | π‘ Proposed |
| π’ Low | Custom Rules - User-defined sorting logic | π‘ Proposed |
| π’ Low | Statistics Dashboard - Email sorting analytics | π‘ Proposed |
None currently reported! π
If you encounter any issues, please open an issue on GitHub.
| π‘ Questions | π Bug Reports | β¨ Feature Requests |
|---|---|---|
| Discussions | Issues | Issues |
Before reporting:
- Check Troubleshooting section
- Search existing issues
- Include Thunderbird version and extension version
We welcome contributions! Here's how to help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing) - Commit your changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open a Pull Request
Guidelines:
- Follow existing code style
- Add comments for complex logic
- Test with multiple AI providers
- Update README for new features
MIT License
Copyright (c) 2026 Nigel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
See LICENSE file for full text.
Icon Design:
Email filtering icons created by Fantasyou - Flaticon
AI Providers:
Built with:
- Thunderbird WebExtension APIs
- JavaScript ES6+
- Manifest v2
Made with β€οΈ to help you organize email faster
β¬ Back to Top β’ π GitHub β’ π¦ Latest Release β’ π Documentation
Support this project! All donations go towards your chosen charity. You can pick any charity you'd like, and I will ensure the funds are sent their way. Please note that standard payment processing fees (Ko-fi & PayPal) will be deducted from the total. As a thank you, your name will be listed as a supporter/donor in this project. Feel free to email me at thedjskywalker@gmail.com for proof of the donation or to let me know which charity you've selected!