A lightweight Mail Delivery Agent written in Go, providing IMAP, LMTP, and SASL support with SQLite-based storage.
• Why Raven? • Architecture • Getting Started • Contributing • License •
Raven was built to overcome the limitations of traditional Mail Delivery Agents with outdated and complex architectures. Instead of relying on legacy file-based storage, Raven adopts a per-user SQLite database model and separates attachments into a dedicated storage system. This design significantly improves performance, scalability, backup reliability, and long-term maintainability—making Raven a modern, efficient solution for email delivery and management. With more modern email features on the way, stay tuned for updates!!!
- Modern Architecture: Per-user SQLite databases for efficient data isolation
- S3 Blob Storage: Store email attachments in S3-compatible storage (SeaweedFS)
- Identity Provider Integration: Separate user management (Eg: Thunder)
- High Performance: Deduplication, efficient indexing, and scalable storage
- Easy Deployment: Simple configuration, containerized deployment
- Full IMAP Support: Complete IMAP4rev2 implementation with extensions
- Secure: TLS/SSL support, external authentication integration
Raven consists of three services:
- Email client access to mailboxes
- Standard IMAP commands: SELECT, FETCH, SEARCH, STORE, COPY, APPEND, EXPUNGE
- Mailbox operations: CREATE, DELETE, RENAME, LIST, SUBSCRIBE
- TLS/SSL support (STARTTLS and IMAPS)
- Receives incoming mail from MTAs (e.g., Postfix)
- Parses and stores messages in SQLite database
- Routes messages to user mailboxes
- Handles authentication via external auth server
- Integrates with MTAs for SMTP authentication
All services use a multi-database SQLite architecture for efficient data isolation and scalability.
docker pull ghcr.io/lsflk/raven:latest
docker run -d --rm \
--name raven \
-p 143:143 -p 993:993 -p 24:24 \
-v $(pwd)/config:/etc/raven \
-v $(pwd)/data:/app/data \
-v $(pwd)/certs:/certs \
ghcr.io/lsflk/raven:latest- Clone the repository:
git clone https://github.com/LSFLK/raven.git
cd raven- Build and run:
docker build -t raven .
docker run -d --rm \
--name raven \
-p 143:143 -p 993:993 -p 24:24 -p 12345:12345 \
-v $(pwd)/config:/etc/raven \
-v $(pwd)/data:/app/data \
-v $(pwd)/certs:/certs \
ravenThe server will start and listen on:
- Port 143 - IMAP
- Port 993 - IMAPS
- Port 24 - LMTP
- Port 12345 - SASL (TCP)
Connect using any IMAP client to start managing your emails.
| Volume | Path | Description |
|---|---|---|
| Configuration(IMAP) | -v $(pwd)/config:/etc/raven |
Configuration directory containing raven.yaml |
| Data | -v $(pwd)/data:/app/data |
Data directory for SQLite databases (shared.db, user_db_*.db, role_db_*.db) and mail storage |
| Certificates | -v $(pwd)/certs:/certs |
TLS/SSL certificates directory containing fullchain.pem and privkey.pem for IMAPS and STARTTLS |
| Configuration(Delivery) | -v $(pwd)/config:/etc/raven |
Delivery service configuration file delivery.yaml |
Your /certs directory must contain:
fullchain.pem- Full certificate chainprivkey.pem- Private key
These certificates are required for secure connections on port 993 and STARTTLS functionality.
Raven requires a configuration file named raven.yaml located in /etc/raven inside the Docker container for IMAP server.
You can see an example raven.yaml for your reference. Update the raven.yaml file according to your config.
The delivery service requires a separate configuration file named delivery.yaml and should reside inside the /etc/raven folder of the Docker container.
You can see the example delivery.yaml for reference. Update the delivery.yaml file according to your config.
Thank you for wanting to contribute to our project. Please see CONTRIBUTING.md for more details.
Distributed under the Apache 2.0 License. See LICENSE for more information.
