Real-time multi-IMAP email aggregator with Elasticsearch search, Groq AI categorization, and Slack/webhook automation.
Outbox is a powerful email management system that consolidates multiple email accounts, provides intelligent search capabilities, and automates email workflows using AI-powered categorization.
- Multi-Account Support: Connect and manage multiple email accounts through IMAP
- Real-time Synchronization: Automatic email fetching and updates across all connected accounts
- Elasticsearch Integration: Lightning-fast full-text search across all your emails
- AI-Powered Categorization: Automatic email classification using Groq AI and Google Vertex AI
- Smart Automation: Trigger webhooks and Slack notifications based on email content
- Modern UI: Clean, responsive React frontend for easy email management
- RESTful API: Full-featured backend API for integration with other tools
- Node.js + Express: RESTful API server
- ImapFlow: IMAP client for email synchronization
- Elasticsearch: Search and indexing engine
- Groq SDK: AI-powered email categorization
- Google Vertex AI: Advanced AI capabilities
- Nodemailer: Email sending functionality
- OpenAI SDK: Additional AI integration
- React 19: Modern UI framework
- React Router: Client-side routing
- Vite: Fast build tool and dev server
- Tailwind CSS: Utility-first styling
- Node.js (v16 or higher)
- Docker & Docker Compose
- Elasticsearch instance
- API keys for:
- Groq AI
- Google Vertex AI (optional)
- OpenAI (optional)
-
Clone the repository
git clone https://github.com/farish-jamal/outbox.git cd outbox -
Set up the backend
cd backend npm install -
Configure environment variables
Create a
.envfile in the backend directory:# Email Configuration IMAP_HOST=imap.gmail.com IMAP_PORT=993 IMAP_USER=your-email@gmail.com IMAP_PASSWORD=your-app-password # Elasticsearch ELASTICSEARCH_URL=http://localhost:9200 ELASTICSEARCH_INDEX=emails # AI APIs GROQ_API_KEY=your-groq-api-key OPENAI_API_KEY=your-openai-api-key GOOGLE_APPLICATION_CREDENTIALS=path/to/credentials.json # Automation SLACK_WEBHOOK_URL=your-slack-webhook-url WEBHOOK_URL=your-custom-webhook-url # Server PORT=3000
-
Set up the frontend
cd frontend npm install -
Start Elasticsearch (using Docker)
docker-compose up -d
Development Mode:
Backend:
cd backend
npm run devFrontend:
cd frontend
npm run dev- Navigate to the settings page in the UI
- Add your email account credentials (IMAP)
- The system will automatically start syncing emails
Use the search bar to perform full-text searches across all your emails. Elasticsearch powers instant results with support for:
- Subject and body text
- Sender and recipient filtering
- Date ranges
- Attachment searches
Emails are automatically categorized into:
- Primary/Important
- Social
- Promotions
- Updates
- Spam
Configure custom categories and rules through the API or settings UI.
Set up automation rules to:
- Send Slack notifications for important emails
- Trigger webhooks for specific senders or keywords
- Auto-categorize based on content patterns
GET /api/emails # List all emails
GET /api/emails/:id # Get email by ID
POST /api/emails/search # Search emails
POST /api/accounts # Add email account
DELETE /api/accounts/:id # Remove email account
POST /api/categories # Create category
GET /api/categories # List categories
POST /api/automation/rules # Create automation rule
The project includes a docker-compose.yml file for easy deployment:
docker-compose up -dThis starts:
- Elasticsearch cluster
- Kibana (optional, for debugging)
Note: This project is in active development. Features and documentation are subject to change.