A lightweight IMAP, LMTP and SASL mail server implementation in Go with SQLite storage.
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 \
-v $(pwd)/delivery.yaml:/app/delivery.yaml \
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 \
-v $(pwd)/config:/etc/raven \
-v $(pwd)/data:/app/data \
-v $(pwd)/certs:/certs \
-v $(pwd)/delivery.yaml:/app/delivery.yaml \
ravenThe server will start and listen on:
- Port 143 - IMAP
- Port 993 - IMAPS
- Port 24 - LMTP
Connect using any IMAP client to start managing your emails.
| Volume | Path | Description |
|---|---|---|
| Configuration | -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 |
| Delivery | -v $(pwd)/delivery.yaml:/app/delivery.yaml |
Delivery service configuration file |
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.
domain: <domain name>
auth_server_url: <auth url>| Key | Description |
|---|---|
domain |
The mail domain used in the mail system. |
auth_server_url |
The authentication API endpoint used to validate user credentials. |
The delivery service requires a separate configuration file named delivery.yaml.
You can see the example delivery.yaml for reference.