A modern, Google-style email web client that connects to iRedMail backend infrastructure.
- 🎨 Modern UI - Clean, responsive interface inspired by Gmail
- 🔐 Secure Authentication - JWT-based authentication with iRedMail
- 📧 Full Email Management - Read, send, organize, and search emails
- 📱 Mobile Responsive - Works seamlessly on all devices
- ⚡ Real-time Updates - Live email synchronization
- 🏷️ Smart Organization - Folders, labels, and search functionality
- HTML/CSS/JavaScript - Modern web technologies
- Material Design - Google-style interface components
- Responsive Layout - Mobile-first design approach
- API Integration - RESTful communication with backend
- Node.js/Express - RESTful API server
- MySQL Integration - Direct connection to iRedMail database
- SMTP/IMAP Support - Email sending and receiving
- JWT Authentication - Secure token-based auth
- iRedMail server running and configured
- Node.js 16+ installed
- Access to iRedMail MySQL database
npm installCopy the environment template and configure your iRedMail settings:
cp api/.env.example api/.envEdit api/.env with your iRedMail configuration:
DB_HOST=your-iredmail-server
DB_USER=vmailadmin
DB_PASSWORD=your-vmailadmin-password
DB_NAME=vmail
SMTP_HOST=your-iredmail-server
IMAP_HOST=your-iredmail-server
STORAGE_BASE=/var/vmail/vmail1
JWT_SECRET=your-secret-key# Start both frontend and backend
npm run dev:full
# Or start them separately:
npm run api # Backend API (port 3001)
npm run dev # Frontend (port 3000)- Open your browser to
http://localhost:3000 - You'll be redirected to the login page
- Use your iRedMail email credentials to sign in
POST /api/auth/login- User loginPOST /api/auth/logout- User logout
GET /api/protected/emails- Get email listGET /api/protected/emails/:id- Get specific emailPOST /api/protected/emails/send- Send new emailPUT /api/protected/emails/:id/read- Mark as readPUT /api/protected/emails/:id/star- Toggle starDELETE /api/protected/emails/:id- Delete email
GET /api/protected/folders- Get folder listGET /api/protected/user/info- Get user information
This connector integrates with iRedMail's core components:
- vmail.mailbox - User authentication, account info, and maildir paths
- vmail.log - Email activity logging
- Maildir format - Direct maildir parsing for email content
- iRedMail folder structure - Standard Dovecot folder layout
- Postfix - Email sending through iRedMail's SMTP server
- SASL Authentication - User credentials for SMTP auth
- TLS/STARTTLS - Secure email transmission
- Direct Maildir Access - Read emails directly from filesystem
- Folder Detection - Automatic folder discovery
- Flag Support - Read/unread, starred status from maildir flags
- SSHA512 - Salted SHA-512 (iRedMail default)
- SSHA - Salted SHA-1
- BCRYPT - BCrypt hashing
- PLAIN/MD5 - Legacy support
- Doveadm Integration - Use doveadm for password verification
- JWT Authentication - Secure token-based authentication
- Password Hashing - Support for iRedMail password schemes
- CORS Protection - Cross-origin request security
- Input Validation - Server-side validation for all inputs
fusionmail/
├── api/ # Backend API
│ ├── iredmail-connector.js # Main connector class
│ ├── server.js # API server
│ └── .env.example # Environment template
├── js/ # Frontend JavaScript
│ └── iredmail-client.js # API client
├── index.html # Main application
├── login.html # Login page
├── styles.css # Application styles
├── script.js # Main application logic
└── package.json # Dependencies
To add new features:
- Add API endpoints in
api/iredmail-connector.js - Update client methods in
js/iredmail-client.js - Implement UI features in
script.js
The connector works with iRedMail's standard database schema:
mailbox- User accounts, settings, and maildir pathsdomain- Email domainsalias- Email aliases and forwardingforwardings- Email forwarding ruleslog- Activity logging
-
Database Connection Failed
- Check iRedMail database credentials
- Ensure MySQL is accessible from the API server
- Verify firewall settings
-
SMTP Authentication Failed
- Confirm SMTP settings in iRedMail
- Check user credentials
- Verify Postfix configuration
-
IMAP Connection Issues
- Ensure Dovecot is running
- Check IMAP port accessibility
- Verify SSL/TLS settings
- Backend logs: Check console output from
npm run api - Frontend logs: Check browser developer console
- iRedMail logs: Check
/var/log/maillogon your iRedMail server
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details.