Overview
Discover what makes Dovel powerful
Dovel is a lightweight, self‑hosted SMTP server written in Go that focuses on minimalism and high performance. From a developer’s standpoint, the application is essentially an event‑driven mail relay that parses inbound SMTP traffic, persists messages to a local SQLite database, and exposes an optional HTTP API for browsing and managing mail. The core of Dovel is a single, strongly typed configuration file (`config.json`) that drives all runtime behavior, making the system trivial to bootstrap in CI/CD pipelines or container orchestrations.
Language
SMTP Engine
Storage
Web Interface
Overview
Dovel is a lightweight, self‑hosted SMTP server written in Go that focuses on minimalism and high performance. From a developer’s standpoint, the application is essentially an event‑driven mail relay that parses inbound SMTP traffic, persists messages to a local SQLite database, and exposes an optional HTTP API for browsing and managing mail. The core of Dovel is a single, strongly typed configuration file (config.json) that drives all runtime behavior, making the system trivial to bootstrap in CI/CD pipelines or container orchestrations.
Architecture & Technical Stack
- Language: Go (1.22+), chosen for its native concurrency primitives, static binaries, and excellent cross‑platform support.
- SMTP Engine: Implements the full SMTP protocol (RFC 5321) with extensions for authentication and TLS. Uses Go’s
net/smtppackage as a foundation but replaces the default listener with a custom, non‑blocking acceptor to support high throughput. - Storage: SQLite3 via the
modernc.org/sqlitedriver, providing an embedded, ACID‑compliant datastore that requires no external service. Email blobs are stored as BLOB columns, while metadata (sender, recipients, headers) is indexed for fast querying. - Web Interface: Built with Go’s
net/httpand the lightweighthtml/templatepackage. The UI serves static assets compiled into the binary, eliminating runtime dependencies. - Security: Supports DKIM signing/verification using
github.com/toorop/go-dkimand PGP via the Web Key Directory (WKD) standard, enabling end‑to‑end encryption without manual key management.
Core Capabilities & APIs
- SMTP Relay: Accepts inbound mail, performs envelope validation, and forwards messages to configured destinations. Supports
MAIL FROM,RCPT TO, andDATAcommands with optional authentication. - HTTP API: Exposes RESTful endpoints (
/api/mail,/api/config) that allow programmatic access to mailbox contents, configuration reloads, and diagnostic metrics. The API uses JSON payloads and standard HTTP status codes. - Webhooks: Developers can register webhook URLs in the config to receive POST notifications for new messages or delivery status changes, enabling integration with external services (e.g., Slack alerts, automated ticketing).
- Extensibility Hooks: The config file accepts a
pluginsarray where each plugin is a Go package compiled into the binary. This allows custom processing (e.g., spam filtering, content extraction) without modifying core code.
Deployment & Infrastructure
- Containerization: A Dockerfile is provided that builds a statically linked binary and copies the SQLite database into the image. The resulting container is under 10 MB, making it ideal for Kubernetes or Docker Swarm deployments.
- Self‑Hosting Requirements: The application requires only Go (for building) or a prebuilt binary. It runs on any OS that supports the Go runtime, including Linux, macOS, BSD, and Windows. No external services are needed unless optional SMTP forwarding or webhook endpoints are used.
- Scalability: While SQLite limits concurrent writes, Dovel’s design allows horizontal scaling by running multiple instances behind a load balancer and synchronizing mail storage via shared NFS or cloud object stores. For high‑volume use cases, developers can replace SQLite with a Postgres backend by swapping the driver and updating the migration scripts.
Integration & Extensibility
- Plugin System: By compiling Go plugins into the binary, developers can inject custom logic at key points (e.g., before delivery, after receipt). The plugin API is defined by a small set of interfaces (
MessageHandler,AuthProvider) that are documented in the repository’sdocs/. - Webhook & API: The HTTP endpoints are fully documented with OpenAPI specs, allowing automated client generation. Webhooks can be authenticated via HMAC signatures.
- Configuration as Code: The JSON config is machine‑editable and can be templated with tools like Helm or Kustomize, enabling declarative deployment patterns.
Developer Experience
- Documentation: The repository contains comprehensive README, architecture diagrams, and a developer guide that covers configuration options, plugin development, and testing strategies. Inline code comments are plentiful.
- Community & Licensing: BSD‑3-Clause license permits commercial use without copyleft obligations. The project maintains an active GitHub issue tracker and a Discord channel for real‑time support, fostering rapid iteration.
- Testing: The codebase includes unit tests for SMTP handling and integration tests that spin up a test server. CI pipelines run on GitHub Actions, ensuring regressions are caught early.
Use Cases
- Enterprise Email Gateways: Small to medium businesses can deploy Dovel as an internal SMTP relay that enforces DKIM signing and PGP encryption before forwarding to external mail servers.
- Developer Tooling: Teams building email‑centric applications can embed Dovel in CI pipelines to capture and inspect outbound mail for testing purposes.
- Compliance & Auditing: The immutable SQLite store coupled with webhook notifications makes Dovel suitable for environments that require audit trails of all outbound and inbound email traffic.
Advantages Over Alternatives
- Performance & Footprint: A single binary under 10 MB and minimal RAM usage (a few MB) make Dovel ideal for edge deployments or IoT gateways where resources are scarce.
- Simplicity: One JSON file and no external services reduce operational overhead, while the Go codebase stays small and maintainable.
- Extensibility: The plugin architecture allows developers to add
Open SourceReady to get started?
Join the community and start self-hosting Dovel today
Related Apps in apis-services
Mastodon
Decentralized, real‑time social networking
Discourse
Open‑source community forum platform with real‑time chat and AI
Rocket.Chat
Secure, open‑source team communication platform
Novu
Unified notification platform for multi‑channel delivery
Mattermost
Secure, self‑hosted team collaboration with chat, voice, and AI
Jitsi Meet
Free, encrypted video conferencing for everyone
Weekly Views
Repository Health
Information
Explore More Apps
OpenTrashmail
Disposable email service with web UI, API, RSS and hooks
Coder
Self‑hosted cloud dev environments that spin up instantly
Vaultwarden
Lightweight Bitwarden-compatible password manager
Anubis
AI‑driven web firewall that protects sites from scraper bots
PiGallery 2
Fast directory-first photo gallery for low‑resource servers
Vince
Privacy‑first self‑hosted web analytics