From 09a9bc411513e60b77554aeb246d149252ab5b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauri=20V=C3=B5sandi?= Date: Fri, 25 Aug 2023 09:40:03 +0300 Subject: [PATCH] wildduck: Use toml files for ZoneMTA config --- wildduck/zonemta.yaml | 59 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 47 insertions(+), 12 deletions(-) diff --git a/wildduck/zonemta.yaml b/wildduck/zonemta.yaml index 0b239fb..18bdbdf 100644 --- a/wildduck/zonemta.yaml +++ b/wildduck/zonemta.yaml @@ -1,4 +1,39 @@ --- +apiVersion: v1 +kind: ConfigMap +metadata: + name: zonemta + namespace: wildduck +data: + pools.toml: |- + [[default]] + address="0.0.0.0" + name="mail.k-space.ee" + plugin-wildduck.toml: |- + [wildduck] + enabled=["receiver", "sender"] + interfaces=["feeder"] + hostname="mail.k-space.ee" + authlogExpireDays=30 + [wildduck.srs] + enabled=false + # SRS secret value. Must be the same as in the MX side + secret="................................" + rewriteDomain="k-space.ee" + zonemta.toml: |- + [log] + level="info" + [smtpInterfaces] + key="/cert/tls.key" + cert="/cert/tls.crt" + port=9465 + host="0.0.0.0" + secure=true + [plugins] + # @include "plugin-wildduck.toml" + [pools] + # @include "pools.toml" +--- apiVersion: apps/v1 kind: Deployment metadata: @@ -24,6 +59,8 @@ spec: - -- - node - index.js + - --config + - /etc/zonemta/zonemta.toml ports: - containerPort: 9465 name: zonemta-msa @@ -41,16 +78,6 @@ spec: cpu: 10m memory: 500Mi env: - - name: APPCONF_smtpInterfaces_feeder_key - value: /cert/tls.key - - name: APPCONF_smtpInterfaces_feeder_cert - value: /cert/tls.crt - - name: APPCONF_smtpInterfaces_feeder_port - value: "9465" - - name: APPCONF_smtpInterfaces_feeder_host - value: "0.0.0.0" - - name: APPCONF_smtpInterfaces_feeder_secure - value: "true" - name: APPCONF_dbs_sender value: zone-mta - name: APPCONF_dbs_mongo @@ -64,9 +91,17 @@ spec: name: redis-wildduck-owner-secrets key: REDIS_MASTER_0_URI volumeMounts: - - mountPath: /cert - name: cert + - name: cert + mountPath: /cert + - name: zonemta-config + mountPath: /etc/zonemta + readOnly: true volumes: + - name: zonemta-config + projected: + sources: + - configMap: + name: zonemta - name: cert secret: secretName: wildduck-tls