aboutsummaryrefslogtreecommitdiff
path: root/forged/internal/unsorted/lmtp_server.go
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-09-14 22:28:12 +0800
committerRunxi Yu <me@runxiyu.org>2025-09-14 22:28:12 +0800
commit01e4fd482ebcc827d3c76c00910529abbf666454 (patch)
tree300156b866864a07a0ed7680e6572ae97c20e325 /forged/internal/unsorted/lmtp_server.go
parentUpdate dependencies (diff)
downloadforge-01e4fd482ebcc827d3c76c00910529abbf666454.tar.gz
forge-01e4fd482ebcc827d3c76c00910529abbf666454.tar.zst
forge-01e4fd482ebcc827d3c76c00910529abbf666454.zip
Add basic mailing listspre-refactor
Diffstat (limited to 'forged/internal/unsorted/lmtp_server.go')
-rw-r--r--forged/internal/unsorted/lmtp_server.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/forged/internal/unsorted/lmtp_server.go b/forged/internal/unsorted/lmtp_server.go
index a006679..e1f3cab 100644
--- a/forged/internal/unsorted/lmtp_server.go
+++ b/forged/internal/unsorted/lmtp_server.go
@@ -20,7 +20,7 @@ import (
"go.lindenii.runxiyu.org/forge/forged/internal/misc"
)
-type lmtpHandler struct{s *Server}
+type lmtpHandler struct{ s *Server }
type lmtpSession struct {
from string
@@ -59,7 +59,7 @@ func (h *lmtpHandler) NewSession(_ *smtp.Conn) (smtp.Session, error) {
session := &lmtpSession{
ctx: ctx,
cancel: cancel,
- s: h.s,
+ s: h.s,
}
return session, nil
}
@@ -184,6 +184,11 @@ func (session *lmtpSession) Data(r io.Reader) error {
slog.Error("error handling patch", "error", err)
goto end
}
+ case "lists":
+ if err = session.s.lmtpHandleMailingList(session, groupPath, moduleName, email, data, from); err != nil {
+ slog.Error("error handling mailing list message", "error", err)
+ goto end
+ }
default:
err = errors.New("Emailing any endpoint other than repositories, is not supported yet.") // TODO
goto end