feat(PROJ-9): implement labels backend - DB schema, labelstore, API handlers, Xapian integration

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
sysops
2026-03-18 08:32:30 +01:00
parent bd09992441
commit 5a6289c83d
8 changed files with 995 additions and 2 deletions
+10
View File
@@ -24,6 +24,7 @@ import (
"github.com/archivmail/internal/auth"
imapstore "github.com/archivmail/internal/imap"
"github.com/archivmail/internal/index"
"github.com/archivmail/internal/labelstore"
ldapcfg "github.com/archivmail/internal/ldapconfig"
pop3store "github.com/archivmail/internal/pop3"
"github.com/archivmail/internal/smtpd"
@@ -191,6 +192,15 @@ func main() {
srv.SetTenants(tenantSt)
srv.SetIndexManager(idxMgr)
// PROJ-9: Label store
labelSt, err := labelstore.New(cfg.Database.DSN())
if err != nil {
logger.Error("label store init failed", "err", err)
os.Exit(1)
}
defer labelSt.Close()
srv.SetLabels(labelSt)
// Start SMTP daemon with index worker integration
if cfg.SMTP.Bind == "" {
cfg.SMTP.Bind = fmt.Sprintf(":%d", cfg.Server.SMTPPort)