From a1b723ac6265332796f508befddfba92735ee7b8 Mon Sep 17 00:00:00 2001 From: CTO Agent Date: Sat, 1 Aug 2026 08:51:59 +0000 Subject: [PATCH] Revert "Fix Stalwart HTTP listener access for Traefik ingress" This reverts commit c060c83. The TOML configuration approach caused Stalwart to fail to start due to configuration parsing errors. Will implement a different approach that doesn't require a full configuration file rewrite. Co-Authored-By: Paperclip --- apps/stalwart/stalwart-config.yaml | 72 -------------------- apps/stalwart/stalwart-fresh-deployment.yaml | 12 ++-- 2 files changed, 5 insertions(+), 79 deletions(-) delete mode 100644 apps/stalwart/stalwart-config.yaml diff --git a/apps/stalwart/stalwart-config.yaml b/apps/stalwart/stalwart-config.yaml deleted file mode 100644 index edd4164..0000000 --- a/apps/stalwart/stalwart-config.yaml +++ /dev/null @@ -1,72 +0,0 @@ ---- -# Stalwart Mail Server Configuration -# This ConfigMap provides a complete configuration with security settings -# that allow internal cluster IPs to access the HTTP listener. -# -# The HTTP listener is only accessible via ClusterIP service and Traefik ingress, -# so allowing the internal pod network (10.244.0.0/16) is safe and necessary. -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" diff --git a/apps/stalwart/stalwart-fresh-deployment.yaml b/apps/stalwart/stalwart-fresh-deployment.yaml index c63cf9c..85326f8 100644 --- a/apps/stalwart/stalwart-fresh-deployment.yaml +++ b/apps/stalwart/stalwart-fresh-deployment.yaml @@ -100,8 +100,6 @@ spec: containers: - name: stalwart image: stalwartlabs/stalwart:v0.16.11 - command: ["/usr/local/bin/stalwart"] - args: ["--config", "/etc/stalwart/stalwart.toml"] ports: - containerPort: 25 name: smtp @@ -127,9 +125,9 @@ spec: volumeMounts: - name: data mountPath: /var/lib/stalwart - - name: stalwart-config - mountPath: /etc/stalwart/stalwart.toml - subPath: stalwart.toml + - name: bootstrap-config + mountPath: /etc/stalwart/config.json + subPath: config.json - name: tls-certs mountPath: /etc/stalwart/certs readOnly: true @@ -180,9 +178,9 @@ spec: - name: data persistentVolumeClaim: claimName: stalwart-data - - name: stalwart-config + - name: bootstrap-config configMap: - name: stalwart-config + name: stalwart-bootstrap-config - name: tls-certs secret: secretName: stalwart-tls