This is the main dovel repository, it has the Go code to run dovel SMTP server.
Author: brian (git@myr.sh)
Date: Mon Sep 18 22:35:31 2023 -0300
Parent: 9ca7749
Format
commit dd3aeec2d7a3be27b884a039c715ba641143e89c
Author: brian <git@myr.sh>
Date: Mon Sep 18 22:35:31 2023 -0300
Format
diff --git a/cmd/dovel/backend.go b/cmd/dovel/backend.go
index 6898fc6..fa95135 100644
--- a/cmd/dovel/backend.go
+++ b/cmd/dovel/backend.go
@@ -16,11 +16,11 @@ import (
"strings"
"time"
- "golang.org/x/crypto/openpgp"
"github.com/emersion/go-mbox"
- "github.com/emersion/go-openpgp-wkd"
"github.com/emersion/go-msgauth/dkim"
+ "github.com/emersion/go-openpgp-wkd"
"github.com/emersion/go-smtp"
+ "golang.org/x/crypto/openpgp"
)
// A Session is returned after EHLO.
@@ -189,7 +189,7 @@ func (s *Session) Send(from string, tos []*mail.Address, raw io.Reader) error {
c.Write(content)
c.Close()
email.Header["Content-Type"] = []string{"application/pgp-encrypted"}
- body = enc.Bytes()
+ body = enc.Bytes()
}
// write email headers into payload
@@ -216,7 +216,7 @@ func (s *Session) Send(from string, tos []*mail.Address, raw io.Reader) error {
block, _ := pem.Decode(keyData)
privateKey, err := x509.ParsePKCS8PrivateKey(block.Bytes)
if err != nil {
- return(err)
+ return err
}
options := &dkim.SignOptions{
Domain: fromdom[1],
commit dd3aeec2d7a3be27b884a039c715ba641143e89c
Author: brian <git@myr.sh>
Date: Mon Sep 18 22:35:31 2023 -0300
Format
diff --git a/cmd/dovel/main.go b/cmd/dovel/main.go
index 26ac9c5..ed2716c 100644
--- a/cmd/dovel/main.go
+++ b/cmd/dovel/main.go
@@ -14,7 +14,7 @@ import (
)
var (
- cfg = email.Config{}
+ cfg = email.Config{}
configPath string
v vault.Vault[email.User]
)
@@ -80,6 +80,6 @@ func main() {
err = s.ListenAndServe()
}
if err != nil {
- panic(err.Error())
+ panic(err)
}
}