Remove ADMIN_PASSWORD configuration

Authentication now works only via hashed passwords in imc_users table.
Users must be created through the password reset flow or directly in the database.
This commit is contained in:
Christoph Haas 2026-03-23 21:28:52 +01:00
parent 3e30f3845d
commit b76ea568ae
5 changed files with 7 additions and 97 deletions

View file

@ -28,10 +28,6 @@ type Config struct {
JWTSecret string // Secret key for signing JWT tokens (keep this secret!)
TrustedProxies []string // IPs of trusted reverse proxies (for X-Forwarded-For)
// Admin user configuration (used when --reset-admin-password is not used)
AdminUser string // Username for the admin account
AdminPassword string // Password for the admin account (only used during startup)
// Mail server paths and settings
MailDataDir string // Directory where mail is stored (e.g., /var/vmail)
PostqueuePath string // Path to postqueue command (for mail queue operations)
@ -94,10 +90,6 @@ func Load() *Config {
// Default JWT secret is insecure - must be changed in production!
JWTSecret: getEnv("JWT_SECRET", "change-this-secret-in-production"),
// Admin user (optional - used during startup if set)
AdminUser: getEnv("ADMIN_USER", ""),
AdminPassword: getEnv("ADMIN_PASSWORD", ""),
// Mail server paths
MailDataDir: getEnv("MAIL_DATA_DIR", "/var/vmail"),
PostqueuePath: getEnv("POSTQUEUE_PATH", "/usr/sbin/postqueue"),