feat(PROJ-32): Message-ID-basierte Duplikatserkennung
- message_id Spalte + UNIQUE-Index in emails-Tabelle - Save() prüft Message-ID vor SHA-256-Flow (kein Disk-I/O bei Duplikat) - lookupByMessageID() als private Hilfsfunktion - insertMeta() schreibt message_id, gibt error zurück (Race-safe) - SaveMeta() schreibt message_id idempotent (Backfill) feat(PROJ-34): Retention-Policy + Löschsperre (GoBD) - retain_until TIMESTAMPTZ Spalte in emails-Tabelle - ErrRetentionLock typed error - Delete() prüft Retention-Frist vor Löschung - Purge() löscht alle Mails mit abgelaufener Retention - POST /api/admin/purge Endpunkt (superadmin only) - config: storage.retention_days fix: Superadmin-Benutzerübersicht zeigt Mandant-Spalte - UsersTab: Mandant-Spalte wenn isSuperAdmin - domain_auditor Rolle im Create-Dialog ergänzt - storage Modulversion → 1.6 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -98,9 +98,10 @@ func main() {
|
||||
|
||||
// Storage with encryption + DB metadata
|
||||
storeCfg := storage.Config{
|
||||
Dir: cfg.Storage.StorePath,
|
||||
Keyfile: cfg.Storage.Keyfile,
|
||||
DSN: cfg.Database.DSN(),
|
||||
Dir: cfg.Storage.StorePath,
|
||||
Keyfile: cfg.Storage.Keyfile,
|
||||
DSN: cfg.Database.DSN(),
|
||||
RetentionDays: cfg.Storage.RetentionDays,
|
||||
}
|
||||
mailStore, err := storage.New(storeCfg)
|
||||
if err != nil {
|
||||
|
||||
@@ -12,7 +12,7 @@ const AppVersion = "0.9.1"
|
||||
// MAJOR: Interface-Änderungen, Breaking changes innerhalb des Moduls
|
||||
// MINOR: Neue Funktionen, Bugfixes, Security-Patches
|
||||
var Modules = map[string]string{
|
||||
"storage": "1.4", // message-id dedup vorbereitet, verify_ok/verified_at
|
||||
"storage": "1.6", // PROJ-34 retain_until, ErrRetentionLock, Purge() (GoBD-Compliance)
|
||||
"smtpd": "1.2", // IP-Allowlist fail-closed, Domain→Tenant-Routing
|
||||
"imapserver": "1.1", // Read-Only IMAP4rev1, Multi-Tenant-Isolation
|
||||
"auth": "1.3", // JWT, bcrypt cost 12, TOTP
|
||||
|
||||
Reference in New Issue
Block a user