This is the main dovel repository, it has the Go code to run dovel SMTP server.
Author: bmayer3 (bmayer@sibros.tech)
Date: Sun Jan 22 20:58:09 2023 -0300
Parent: d19e7cd
Improved docs
commit 4a254557e85f5c0d19cdfe83c1c6656f40fe04ef
Author: bmayer3 <bmayer@sibros.tech>
Date: Sun Jan 22 20:58:09 2023 -0300
Improved docs
diff --git a/config/config.go b/config/config.go
index 191b27f..6341e49 100644
--- a/config/config.go
+++ b/config/config.go
@@ -10,7 +10,10 @@ type Handler func(email interfaces.Email, content []byte) error
// server and web interface. This should be a JSON file located
// in $HOME/.dovel-config.json
type Config struct {
- Server ServerConfig
+ Server ServerConfig
+
+ // WebPort is an optional field used to specify the HTTP server port
+ // for the web interface, if present the HTTP web server is started.
WebPort *string
}
@@ -20,8 +23,18 @@ type InboxConfig struct {
Handler string
Root string
}
+
+// ServerConfig is used to configure your email server.
type ServerConfig struct {
+ // Address is used to specify which address the server should listen
+ // to connections, a typicall value is :2525.
Address string
- Domain string
+
+ // Domain is what the server should respond in a HELO or EHLO request.
+ Domain string
+
+ // Inboxes are the accounts available is this server, i.e. the accepted
+ // domains on emails: "example@example.domain". Each domain is handled
+ // separatly, so you can receive email for multiple domains.
Inboxes []InboxConfig
}
commit 4a254557e85f5c0d19cdfe83c1c6656f40fe04ef
Author: bmayer3 <bmayer@sibros.tech>
Date: Sun Jan 22 20:58:09 2023 -0300
Improved docs
diff --git a/doc.go b/doc.go
index a30a330..c1aa906 100644
--- a/doc.go
+++ b/doc.go
@@ -13,7 +13,7 @@
// The other part is the optional web interface that is used to visualize your
// mail.
//
-// The structure of this config file is [config.Config]. See that doc for more
+// The structure of this config file is [blmayer.dev/x/dovel/config.Config]. See that doc for more
// info.
//
// # 2. The library
@@ -21,4 +21,23 @@
// This package also delivers a subpackage called interfaces, it contains
// structs that are used through this project. Those are also used in templates
// and you can use them in other projects.
+//
+// # Setting up you email server
+//
+// Email works in a complex way, DNS records must match your server's
+// configuration. This guide will try to give more detailed information
+// in comparison with the website tutorial.
+//
+// # Server configuration
+//
+// An email server typically listens on ports 25, 2525, 587 or 465 for mail
+// exchange. But their use differ:
+//
+// - 25: is the original SMTP port and first to be official by RFC.
+// - 465: is marked as deprecated.
+// - 587: is also official by RFC, this port is used for TLS encrypted mail.
+//
+// The current recomendation in to use port 586.
+//
+// To configure this server see the [Config] struct.
package dovel