Extends commit291feb9by adding stalwart-config (stalwart.toml) to the copy-config initContainer. The previous fix only handled bootstrap-config but missed stalwart-config, which was the root cause of CrashLoopBackOff identified in DEV-426 stability testing. Root cause: commit693fcd3introduced stalwart-config ConfigMap with subPath mount. During pod restarts, Kubernetes subPath ConfigMap mounting race leaves stalwart.toml empty/unparseable, causing: "Failed to parse data store settings at /etc/stalwart/stalwart.toml: expected value at line 1 column 1" This completes the hardening by ensuring BOTH config files (config.json and stalwart.toml) are atomically copied before Stalwart starts. Fixes: DEV-433, DEV-431 Ref: stack.basicstack.de/apps/stalwart/STABILITY-VERIFICATION-2026-08-01.md Co-Authored-By: Paperclip <noreply@paperclip.ing>
66 lines
1.3 KiB
YAML
66 lines
1.3 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: stalwart-config
|
|
namespace: stalwart
|
|
data:
|
|
stalwart.toml: |
|
|
#
|
|
# Stalwart Mail Server Configuration
|
|
#
|
|
|
|
[store]
|
|
data = "rocksdb"
|
|
|
|
[store.rocksdb]
|
|
type = "rocksdb"
|
|
path = "/var/lib/stalwart"
|
|
|
|
#
|
|
# Server Configuration
|
|
#
|
|
|
|
[server]
|
|
hostname = "mail.basicstack.de"
|
|
|
|
# HTTP Listener (Web UI and API)
|
|
[server.listener.http]
|
|
bind = ["0.0.0.0:8080"]
|
|
protocol = "http"
|
|
|
|
# Security: Allow internal cluster IPs for Traefik ingress
|
|
# Pod network CIDR: 10.244.0.0/16
|
|
[server.listener.http.security]
|
|
allowed-ips = ["10.244.0.0/16", "127.0.0.1/32"]
|
|
|
|
# SMTP Listener (Port 25)
|
|
[server.listener.smtp]
|
|
bind = ["0.0.0.0:25"]
|
|
protocol = "smtp"
|
|
|
|
# Submission Listener (Port 587 with STARTTLS)
|
|
[server.listener.submission]
|
|
bind = ["0.0.0.0:587"]
|
|
protocol = "smtp"
|
|
|
|
# IMAPS Listener (Port 993 with TLS)
|
|
[server.listener.imaps]
|
|
bind = ["0.0.0.0:993"]
|
|
protocol = "imap"
|
|
tls.implicit = true
|
|
|
|
#
|
|
# TLS Configuration
|
|
#
|
|
|
|
[server.tls]
|
|
certificate = "file:///etc/stalwart/certs/tls.crt"
|
|
private-key = "file:///etc/stalwart/certs/tls.key"
|
|
|
|
#
|
|
# Logging
|
|
#
|
|
|
|
[tracing.level]
|
|
default = "info"
|