b09cd1628d
- mailgateway namespace with Deployment + HPA (2-6 replicas) - rspamd Deployment + HPA (2-6 replicas) with milter interface - postfix configured to relay inbound mail to stalwart via transport maps - rspamd milter on port 11332 for spam scanning and DKIM signing - DKIM keys stored in Vault at kubernetes/namespace/mailgateway/default/dkim-keys - TLS cert via cert-manager (vault-issuer) for mail.main.unkin.net - rspamd web UI exposed via Traefik Gateway at rspamd.k8s.syd1.au.unkin.net - postfix external LoadBalancer service for inbound MX on port 25 - Add full main.cf and master.cf as ConfigMap resources mounted via subPath - main.cf: relay-only gateway config, texthash: transport maps, rspamd milter - master.cf: standard smtp + submission (587, TLS required) + internal processes - MAILNAME/MY_NETWORKS/MY_DESTINATION env vars kept in sync with main.cf - LOG_TO_STDOUT=1 for k8s log collection
62 lines
1.2 KiB
YAML
62 lines
1.2 KiB
YAML
---
|
|
# Internal service for rspamd - used by postfix pods in the same namespace
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: rspamd
|
|
namespace: mailgateway
|
|
spec:
|
|
selector:
|
|
app: rspamd
|
|
ports:
|
|
- name: milter
|
|
port: 11332
|
|
targetPort: 11332
|
|
protocol: TCP
|
|
- name: worker
|
|
port: 11333
|
|
targetPort: 11333
|
|
protocol: TCP
|
|
- name: controller
|
|
port: 11334
|
|
targetPort: 11334
|
|
protocol: TCP
|
|
---
|
|
# Internal ClusterIP for postfix - used by stalwart for outbound relay
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: postfix
|
|
namespace: mailgateway
|
|
spec:
|
|
selector:
|
|
app: postfix
|
|
ports:
|
|
- name: smtp
|
|
port: 25
|
|
targetPort: 25
|
|
protocol: TCP
|
|
- name: submission
|
|
port: 587
|
|
targetPort: 587
|
|
protocol: TCP
|
|
---
|
|
# External LoadBalancer for inbound MX (internet → postfix)
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: postfix-external
|
|
namespace: mailgateway
|
|
annotations:
|
|
external-dns.alpha.kubernetes.io/hostname: smtp-in.main.unkin.net
|
|
spec:
|
|
type: LoadBalancer
|
|
externalTrafficPolicy: Local
|
|
selector:
|
|
app: postfix
|
|
ports:
|
|
- name: smtp
|
|
port: 25
|
|
targetPort: 25
|
|
protocol: TCP
|