aboutsummaryrefslogtreecommitdiff
path: root/example.config.toml
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-03-08 03:06:23 +0530
committerBobby <[email protected]>2026-03-08 03:06:23 +0530
commitcaf265e7050edefa64ecf7e13828ec9636bce867 (patch)
tree6bb8554dbb34695a74c2dca556bf512998cf62ab /example.config.toml
parentcca905d35412f1549400fc3d1aca6dc704d8cae6 (diff)
downloaddove-caf265e7050edefa64ecf7e13828ec9636bce867.tar.xz
dove-caf265e7050edefa64ecf7e13828ec9636bce867.zip
Refactor configuration handling and add mail management features
- Removed dependency on messages package in TOML loading and parsing. - Introduced new config constants and messages for better clarity and maintainability. - Implemented mail user and mailbox management with corresponding controllers and views. - Added new templates for mailboxes, mailbox creation, and user management. - Enhanced logging and error handling throughout the application. - Established a structured approach for applying default values in TOML configuration. - Created new utility functions for SMTP and email handling.
Diffstat (limited to 'example.config.toml')
-rw-r--r--example.config.toml145
1 files changed, 101 insertions, 44 deletions
diff --git a/example.config.toml b/example.config.toml
index be3cdaf..962bea1 100644
--- a/example.config.toml
+++ b/example.config.toml
@@ -1,34 +1,66 @@
# =============================================================================
-# Dove - Local SMTP Email Testing Tool
+# Dove — Local Infrastructure Service for Peaceful Development Experience
# =============================================================================
+#
+# This is the default configuration file for Dove. It controls how each
+# service binds to the network and behaves at startup. Settings that can be
+# managed at runtime (queue policies, health check intervals, cron schedules,
+# KV limits, etc.) are configured through the dashboard and stored in the
+# database — they do not appear here.
+#
# Copy this file to config.toml and adjust values as needed.
# All values shown below are defaults and can be omitted if unchanged.
+# Commented-out values are optional and disabled by default.
-# -----------------------------------------------------------------------------
+# =============================================================================
# HTTP Server
-# -----------------------------------------------------------------------------
-# The web dashboard for viewing and managing captured emails.
+# =============================================================================
+# The web dashboard and REST API for managing your local infrastructure.
+# This is the primary interface for interacting with Dove.
-[server]
+[http]
# Network interface to bind the HTTP server to.
# Use "0.0.0.0" to listen on all interfaces, or "127.0.0.1" for local only.
host = "0.0.0.0"
-# Port for the web dashboard.
+# Port for the web dashboard and API.
port = 8080
-# Enable verbose debug logging for HTTP requests.
+# Enable verbose debug logging for HTTP requests and responses.
debug = false
# Optional credentials to protect the web dashboard.
-# Leave commented out to disable dashboard authentication.
+# When set, users must authenticate before accessing the dashboard.
+# Leave commented out to allow unrestricted access.
# username = ""
# password = ""
-# -----------------------------------------------------------------------------
+# =============================================================================
+# DNS Server
+# =============================================================================
+# Resolves custom TLDs (.dove, .local, .test, .nest) and all registered
+# domains. A records with port mappings act as a built-in reverse proxy,
+# routing domain requests to local services automatically.
+
+[dns]
+# Network interface to bind the DNS server to.
+# Typically bound to localhost since it serves local resolution only.
+host = "127.0.0.1"
+
+# Port for DNS queries over UDP.
+# The standard DNS port is 53, but a non-privileged port is used by default
+# to avoid requiring root permissions.
+port = 5053
+
+# Default time-to-live in seconds for DNS records when not explicitly set.
+default_ttl = 300
+
+# =============================================================================
# SMTP Server
-# -----------------------------------------------------------------------------
-# Receives incoming emails from mail clients and applications.
+# =============================================================================
+# Receives incoming emails for mailboxes registered under your domains.
+# Emails sent to non-existent mailboxes on existing domains will bounce.
+# Emails sent to non-existent domains are silently dropped.
[smtp]
# Network interface to bind the SMTP server to.
@@ -37,17 +69,19 @@ host = "0.0.0.0"
# Port for plain SMTP connections.
port = 5025
-# Port for implicit TLS (SMTPS) connections. Requires tls_enabled = true.
+# Port for implicit TLS (SMTPS) connections.
+# Only active when tls_enabled is set to true.
smtps_port = 5465
-# Port for STARTTLS connections. Requires tls_enabled = true.
+# Port for STARTTLS upgrade connections.
+# Only active when tls_enabled is set to true.
starttls_port = 5587
# The domain name announced in SMTP EHLO/HELO greetings.
# This identifies the mail server to connecting clients.
domain = "localhost"
-# Maximum allowed email size in bytes (default: 25 MB).
+# Maximum allowed email size in bytes. Default is 25 MB.
max_message_size = 26214400
# Timeout in seconds for reading data from SMTP clients.
@@ -57,21 +91,25 @@ read_timeout = 30
write_timeout = 30
# Require SMTP authentication before accepting messages.
+# When enabled, clients must authenticate with the credentials below.
auth_required = false
-# Credentials for SMTP authentication. Only used when auth_required = true.
+# Credentials for SMTP authentication.
+# Only used when auth_required is set to true.
# username = ""
# password = ""
-# Enable TLS support for SMTPS and STARTTLS listeners.
+# Enable TLS support for encrypted SMTPS and STARTTLS listeners.
+# Requires valid certificate and key paths below.
tls_enabled = false
-# Paths to TLS certificate and private key files. Required when tls_enabled = true.
+# Paths to the TLS certificate and private key files.
+# Required when tls_enabled is set to true.
# tls_cert = ""
# tls_key = ""
-# Relay captured emails to an upstream SMTP server.
-# Useful for forwarding test emails to a real mail server.
+# Relay configuration for forwarding emails to an upstream SMTP server.
+# Useful for testing email delivery through a real mail provider.
relay_enabled = false
# relay_host = ""
relay_port = 587
@@ -79,10 +117,11 @@ relay_port = 587
# relay_password = ""
relay_starttls = true
-# -----------------------------------------------------------------------------
+# =============================================================================
# IMAP Server
-# -----------------------------------------------------------------------------
-# Allows mail clients to retrieve captured emails via the IMAP protocol.
+# =============================================================================
+# Provides IMAP access for external mail clients (Thunderbird, Apple Mail,
+# etc.) to retrieve emails stored in Dove mailboxes.
[imap]
# Network interface to bind the IMAP server to.
@@ -91,27 +130,32 @@ host = "0.0.0.0"
# Port for plain IMAP connections.
port = 5143
-# Port for implicit TLS (IMAPS) connections. Requires tls_enabled = true.
+# Port for implicit TLS (IMAPS) connections.
+# Only active when tls_enabled is set to true.
imaps_port = 5993
-# Require IMAP authentication before granting access.
+# Require IMAP authentication before granting mailbox access.
auth_required = false
-# Credentials for IMAP authentication. Only used when auth_required = true.
+# Credentials for IMAP authentication.
+# Only used when auth_required is set to true.
# username = ""
# password = ""
-# Enable TLS support for the IMAPS listener.
+# Enable TLS support for encrypted IMAPS connections.
+# Requires valid certificate and key paths below.
tls_enabled = false
-# Paths to TLS certificate and private key files. Required when tls_enabled = true.
+# Paths to the TLS certificate and private key files.
+# Required when tls_enabled is set to true.
# tls_cert = ""
# tls_key = ""
-# -----------------------------------------------------------------------------
+# =============================================================================
# POP3 Server
-# -----------------------------------------------------------------------------
-# Allows mail clients to retrieve captured emails via the POP3 protocol.
+# =============================================================================
+# Provides POP3 access for external mail clients to download and remove
+# emails from Dove mailboxes.
[pop3]
# Network interface to bind the POP3 server to.
@@ -120,30 +164,43 @@ host = "0.0.0.0"
# Port for plain POP3 connections.
port = 5110
-# Port for implicit TLS (POP3S) connections. Requires tls_enabled = true.
+# Port for implicit TLS (POP3S) connections.
+# Only active when tls_enabled is set to true.
pop3s_port = 5995
-# Require POP3 authentication before granting access.
+# Require POP3 authentication before granting mailbox access.
auth_required = false
-# Credentials for POP3 authentication. Only used when auth_required = true.
+# Credentials for POP3 authentication.
+# Only used when auth_required is set to true.
# username = ""
# password = ""
-# Enable TLS support for the POP3S listener.
+# Enable TLS support for encrypted POP3S connections.
+# Requires valid certificate and key paths below.
tls_enabled = false
-# Paths to TLS certificate and private key files. Required when tls_enabled = true.
+# Paths to the TLS certificate and private key files.
+# Required when tls_enabled is set to true.
# tls_cert = ""
# tls_key = ""
-# -----------------------------------------------------------------------------
-# Mailbox
-# -----------------------------------------------------------------------------
-# Controls how incoming emails are routed to mailboxes.
+# =============================================================================
+# S3-Compatible Object Storage
+# =============================================================================
+# Filesystem-backed object storage with full S3 API compatibility.
+# Works with aws-sdk, boto3, minio-go, and any S3-compatible client.
+
+[storage]
+# Network interface to bind the S3 API server to.
+host = "0.0.0.0"
+
+# Port for S3 API requests.
+port = 5900
+
+# Directory where object data is stored on disk.
+# Relative paths are resolved from Dove's data directory.
+data_dir = "storage"
-[mailbox]
-# Mailbox routing mode:
-# "registered" - Only accept emails for registered mailbox addresses.
-# "open" - Automatically create mailboxes for any recipient address.
-mode = "registered"
+# Maximum allowed object size in bytes. Default is 512 MB.
+max_object_size = 536870912