feat(PROJ-14): POP3-Import — Client, Store, Importer, API-Routen, Frontend-Seite
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
"github.com/archivmail/internal/auth"
|
||||
imapstore "github.com/archivmail/internal/imap"
|
||||
"github.com/archivmail/internal/index"
|
||||
pop3store "github.com/archivmail/internal/pop3"
|
||||
"github.com/archivmail/internal/smtpd"
|
||||
"github.com/archivmail/internal/storage"
|
||||
"github.com/archivmail/internal/userstore"
|
||||
@@ -170,6 +171,16 @@ func main() {
|
||||
defer imapSched.Stop()
|
||||
srv.SetImap(imapSt, imapImp, imapSched)
|
||||
|
||||
// POP3 store + importer
|
||||
pop3St, err := pop3store.New(cfg.Database.DSN(), cfg.API.Secret)
|
||||
if err != nil {
|
||||
logger.Error("pop3 store init failed", "err", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer pop3St.Close()
|
||||
pop3Imp := pop3store.NewImporter(pop3St, mailStore, idx, logger)
|
||||
srv.SetPop3(pop3St, pop3Imp)
|
||||
|
||||
// Backfill in background: migrate existing files into DB metadata + re-index
|
||||
go runBackfill(context.Background(), mailStore, idx, worker, logger)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user