chore: Modulname github.com/archivmail → archivmail
Go-Modul in go.mod und allen 45 Go-Dateien umbenannt.
This commit is contained in:
@@ -7,9 +7,9 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
type exportResult struct {
|
type exportResult struct {
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
type pilerImportResult struct {
|
type pilerImportResult struct {
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
// runMigrateTenants performs a one-time migration to set up the default tenant,
|
// runMigrateTenants performs a one-time migration to set up the default tenant,
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
// runRecompress walks the mail store and gzip-compresses any file that is not
|
// runRecompress walks the mail store and gzip-compresses any file that is not
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
// runReindex re-indexes all (or tenant-specific) emails into the configured index backend.
|
// runReindex re-indexes all (or tenant-specific) emails into the configured index backend.
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"log/slog"
|
"log/slog"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
// runRethread walks all emails without thread_id and sets thread relationships
|
// runRethread walks all emails without thread_id and sets thread relationships
|
||||||
|
|||||||
+17
-17
@@ -20,23 +20,23 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/api"
|
"archivmail/internal/api"
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/auth"
|
"archivmail/internal/auth"
|
||||||
imapstore "github.com/archivmail/internal/imap"
|
imapstore "archivmail/internal/imap"
|
||||||
"github.com/archivmail/internal/imapserver"
|
"archivmail/internal/imapserver"
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
ldapcfg "github.com/archivmail/internal/ldapconfig"
|
ldapcfg "archivmail/internal/ldapconfig"
|
||||||
"github.com/archivmail/internal/mailer"
|
"archivmail/internal/mailer"
|
||||||
pop3store "github.com/archivmail/internal/pop3"
|
pop3store "archivmail/internal/pop3"
|
||||||
"github.com/archivmail/internal/smtpoutconfig"
|
"archivmail/internal/smtpoutconfig"
|
||||||
"github.com/archivmail/internal/smtpd"
|
"archivmail/internal/smtpd"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
tenantstore "github.com/archivmail/internal/tenantstore"
|
tenantstore "archivmail/internal/tenantstore"
|
||||||
"github.com/archivmail/internal/tokenstore"
|
"archivmail/internal/tokenstore"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
module github.com/archivmail
|
module archivmail
|
||||||
|
|
||||||
go 1.24.0
|
go 1.24.0
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/auth"
|
"archivmail/internal/auth"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleListUsers(w http.ResponseWriter, r *http.Request) {
|
func (s *Server) handleListUsers(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/api"
|
"archivmail/internal/api"
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/auth"
|
"archivmail/internal/auth"
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
type testEnv struct {
|
type testEnv struct {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -11,9 +11,9 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ── Audit Log handler ─────────────────────────────────────────────────────
|
// ── Audit Log handler ─────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
"unicode"
|
"unicode"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ── Text helpers ──────────────────────────────────────────────────────────
|
// ── Text helpers ──────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleGetIMAPMode returns the current IMAP mode for the tenant.
|
// handleGetIMAPMode returns the current IMAP mode for the tenant.
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/archivmail/internal/auth"
|
"archivmail/internal/auth"
|
||||||
imapstore "github.com/archivmail/internal/imap"
|
imapstore "archivmail/internal/imap"
|
||||||
pop3store "github.com/archivmail/internal/pop3"
|
pop3store "archivmail/internal/pop3"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ── IMAP handlers ─────────────────────────────────────────────────────────
|
// ── IMAP handlers ─────────────────────────────────────────────────────────
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/mailer"
|
"archivmail/internal/mailer"
|
||||||
"github.com/archivmail/internal/tokenstore"
|
"archivmail/internal/tokenstore"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleCreateInvite generates an invite token for a tenant and optionally emails it.
|
// handleCreateInvite generates an invite token for a tenant and optionally emails it.
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/ldapauth"
|
"archivmail/internal/ldapauth"
|
||||||
ldapcfg "github.com/archivmail/internal/ldapconfig"
|
ldapcfg "archivmail/internal/ldapconfig"
|
||||||
)
|
)
|
||||||
|
|
||||||
// syncResult is the JSON response returned by LDAP sync endpoints.
|
// syncResult is the JSON response returned by LDAP sync endpoints.
|
||||||
|
|||||||
@@ -9,11 +9,11 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/ldapauth"
|
"archivmail/internal/ldapauth"
|
||||||
ldapcfg "github.com/archivmail/internal/ldapconfig"
|
ldapcfg "archivmail/internal/ldapconfig"
|
||||||
"github.com/archivmail/internal/tenantstore"
|
"archivmail/internal/tenantstore"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
const maxLogoSize = 2 * 1024 * 1024 // 2 MB
|
const maxLogoSize = 2 * 1024 * 1024 // 2 MB
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/mailer"
|
"archivmail/internal/mailer"
|
||||||
"github.com/archivmail/internal/tokenstore"
|
"archivmail/internal/tokenstore"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleSignup creates an inactive account and sends a verification email.
|
// handleSignup creates an inactive account and sends a verification email.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/jackc/pgx/v5/pgconn"
|
"github.com/jackc/pgx/v5/pgconn"
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,9 +6,9 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
"github.com/archivmail/internal/tenantstore"
|
"archivmail/internal/tenantstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleGetTenantUsage returns current quota config and usage for a tenant.
|
// handleGetTenantUsage returns current quota config and usage for a tenant.
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handlePurge deletes all mails whose retention period has expired.
|
// handlePurge deletes all mails whose retention period has expired.
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleSearch(w http.ResponseWriter, r *http.Request) {
|
func (s *Server) handleSearch(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
+14
-14
@@ -11,20 +11,20 @@ import (
|
|||||||
|
|
||||||
"regexp"
|
"regexp"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/auth"
|
"archivmail/internal/auth"
|
||||||
imapstore "github.com/archivmail/internal/imap"
|
imapstore "archivmail/internal/imap"
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
ldapcfg "github.com/archivmail/internal/ldapconfig"
|
ldapcfg "archivmail/internal/ldapconfig"
|
||||||
"github.com/archivmail/internal/mailer"
|
"archivmail/internal/mailer"
|
||||||
pop3store "github.com/archivmail/internal/pop3"
|
pop3store "archivmail/internal/pop3"
|
||||||
"github.com/archivmail/internal/smtpoutconfig"
|
"archivmail/internal/smtpoutconfig"
|
||||||
"github.com/archivmail/internal/smtpd"
|
"archivmail/internal/smtpd"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
"github.com/archivmail/internal/tenantstore"
|
"archivmail/internal/tenantstore"
|
||||||
"github.com/archivmail/internal/tokenstore"
|
"archivmail/internal/tokenstore"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
// SEC-22: Compiled regex for mail ID validation to prevent path traversal.
|
// SEC-22: Compiled regex for mail ID validation to prevent path traversal.
|
||||||
|
|||||||
@@ -4,9 +4,9 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/smtpoutconfig"
|
"archivmail/internal/smtpoutconfig"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleGetSMTPOut returns the current SMTP-Out relay config (password masked).
|
// handleGetSMTPOut returns the current SMTP-Out relay config (password masked).
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
// handleGetThread returns all mails in a thread, ordered by date ascending.
|
// handleGetThread returns all mails in a thread, ordered by date ascending.
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import (
|
|||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/auth"
|
"archivmail/internal/auth"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ── PROJ-24: TOTP 2FA Handlers ───────────────────────────────────────────
|
// ── PROJ-24: TOTP 2FA Handlers ───────────────────────────────────────────
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
// UploadJob tracks the progress of an EML/MBOX import job.
|
// UploadJob tracks the progress of an EML/MBOX import job.
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
|
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTestAudit(t *testing.T) *audit.Logger {
|
func newTestAudit(t *testing.T) *audit.Logger {
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/golang-jwt/jwt/v5"
|
"github.com/golang-jwt/jwt/v5"
|
||||||
"github.com/archivmail/internal/ldapauth"
|
"archivmail/internal/ldapauth"
|
||||||
ldapcfg "github.com/archivmail/internal/ldapconfig"
|
ldapcfg "archivmail/internal/ldapconfig"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Session holds the claims extracted from a validated JWT.
|
// Session holds the claims extracted from a validated JWT.
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/archivmail/internal/auth"
|
"archivmail/internal/auth"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTestAuth(t *testing.T) (*auth.Manager, *userstore.Store) {
|
func newTestAuth(t *testing.T) (*auth.Manager, *userstore.Store) {
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ import (
|
|||||||
|
|
||||||
imapv2 "github.com/emersion/go-imap/v2"
|
imapv2 "github.com/emersion/go-imap/v2"
|
||||||
"github.com/emersion/go-imap/v2/imapclient"
|
"github.com/emersion/go-imap/v2/imapclient"
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
const batchSize = 50
|
const batchSize = 50
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/audit"
|
"archivmail/internal/audit"
|
||||||
"github.com/archivmail/internal/auth"
|
"archivmail/internal/auth"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
)
|
)
|
||||||
|
|
||||||
// newXapianIndex creates a temporary Xapian index for testing.
|
// newXapianIndex creates a temporary Xapian index for testing.
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Mailer sends transactional emails via the configured SMTP-Out relay.
|
// Mailer sends transactional emails via the configured SMTP-Out relay.
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/internal/index"
|
"archivmail/internal/index"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Importer runs background POP3 import jobs.
|
// Importer runs background POP3 import jobs.
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ import (
|
|||||||
|
|
||||||
"github.com/emersion/go-smtp"
|
"github.com/emersion/go-smtp"
|
||||||
|
|
||||||
"github.com/archivmail/config"
|
"archivmail/config"
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DomainToTenantFunc resolves an e-mail domain to a tenant ID.
|
// DomainToTenantFunc resolves an e-mail domain to a tenant ID.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
// saveAttachments deduplicates and stores attachments from a parsed email.
|
// saveAttachments deduplicates and stores attachments from a parsed email.
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RethreadStats holds counters from a Rethread run.
|
// RethreadStats holds counters from a Rethread run.
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import (
|
|||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
"github.com/jackc/pgx/v5/pgxpool"
|
"github.com/jackc/pgx/v5/pgxpool"
|
||||||
|
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ErrRetentionLock is returned when a mail cannot be deleted because its retention period has not yet expired.
|
// ErrRetentionLock is returned when a mail cannot be deleted because its retention period has not yet expired.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/archivmail/internal/storage"
|
"archivmail/internal/storage"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSaveAndLoad(t *testing.T) {
|
func TestSaveAndLoad(t *testing.T) {
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
"github.com/jackc/pgx/v5"
|
"github.com/jackc/pgx/v5"
|
||||||
|
|
||||||
"github.com/archivmail/internal/userstore"
|
"archivmail/internal/userstore"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newTestStore(t *testing.T) *userstore.Store {
|
func newTestStore(t *testing.T) *userstore.Store {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/archivmail/pkg/mailparser"
|
"archivmail/pkg/mailparser"
|
||||||
)
|
)
|
||||||
|
|
||||||
func readFixture(t *testing.T, name string) []byte {
|
func readFixture(t *testing.T, name string) []byte {
|
||||||
|
|||||||
Reference in New Issue
Block a user