
🎯 AutoSort+
AI-Powered Email Organization for Thunderbird
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
📌 Table of Contents
✨ Features
🤖 Multi-Provider AI
Choose from 5 leading cloud AI providers or run a local Ollama model:
- Google Gemini - Best free tier + Multi-key support
- OpenAI - Superior accuracy
- Anthropic Claude - Privacy-focused
- Groq - Fastest processing
- Mistral AI - GDPR compliant
- Ollama (Local) - Run LLMs locally (llama3.2, tinyllama, phi, gemma). No API key required; supports model download and CPU-only mode
|
🔑 Multiple API Keys (Gemini)
- Add keys from multiple projects
- Automatic rotation on limit
- Per-key usage tracking
- 5 keys = 100 requests/day
|
📁 Smart Folder Management
- IMAP folder auto-discovery
- Bulk label import
- Custom folder creation
- Recursive traversal
|
🎯 Intelligent Classification
- Content analysis
- Context-aware sorting
- Multi-label support
- 100-entry history
|
🔥 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
📥 Installation
Option 1: Download Release (Recommended)
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 Thunderbird
Option 2: Build from Source
git 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/
🚀 Quick Start
1️⃣ Choose AI Provider
Open settings and select from Gemini, OpenAI, Claude, Groq, Mistral, or Ollama (Local LLM)
2️⃣ Get API Key (or install local Ollama)
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.
3️⃣ Configure Folders
Load folders from IMAP or add custom labels
4️⃣ Sort Emails (Two Options)
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!
⚙️ AI Provider Setup
⚙️ AI Provider Setup
| 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 |
⚠️ $5 credit |
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. |
📊 Usage Limits & Recommendations
⚠️ 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)
💡 Usage
Basic Operation
- 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)
Advanced Features
� 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
Manual Labeling (Right-Click)
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
🔧 Technical Details
System Architecture
┌─────────────────────────────────────────┐
│ Thunderbird Email Client │
└──────────────┬──────────────────────────┘
│
┌──────────────▼──────────────────────────┐
│ AutoSort+ Extension │
│ │
│ ┌──────────┐ ┌──────────┐ │
│ │ UI Layer │ │ Background│ │
│ │(options) │◄─┤ Script │ │
│ └──────────┘ └─────┬─────┘ │
│ │ │
│ ┌───────▼────────┐ │
│ │ Rate Limiter │ │
│ │ (Gemini only) │ │
│ └───────┬────────┘ │
└──────────────────────┼─────────────────┘
│
┌─────────────┴─────────────┐
│ │
┌────▼────┐ ┌────────┐ ┌─────▼─────┐
│ Gemini │ │ Groq │ │ Claude │
│ API │ │ API │ │ API │
└─────────┘ └────────┘ └───────────┘
File Structure
| 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 |
Storage Schema
{
// 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
},
...
]
}
🔒 Privacy & Security
| Feature |
Status |
Details |
| 🔐 API Key Storage |
✅ Encrypted |
OS-level encryption via browser storage |
| 📧 Email Content |
✅ Not Stored |
Analyzed in memory, never persisted |