feat(postfix): deploy postfix MTA and rspamd spam filter
- 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
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: rspamd
|
||||
namespace: mailgateway
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: rspamd
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
reloader.stakater.com/auto: "true"
|
||||
labels:
|
||||
app: rspamd
|
||||
spec:
|
||||
securityContext:
|
||||
runAsUser: 11333
|
||||
runAsGroup: 11333
|
||||
fsGroup: 11333
|
||||
containers:
|
||||
- name: rspamd
|
||||
image: rspamd/rspamd:4.0.1
|
||||
ports:
|
||||
- containerPort: 11332
|
||||
name: milter
|
||||
protocol: TCP
|
||||
- containerPort: 11333
|
||||
name: worker
|
||||
protocol: TCP
|
||||
- containerPort: 11334
|
||||
name: controller
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /ping
|
||||
port: 11334
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ping
|
||||
port: 11334
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: "1"
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- name: rspamd-config
|
||||
mountPath: /etc/rspamd/local.d
|
||||
readOnly: true
|
||||
- name: dkim-keys
|
||||
mountPath: /etc/rspamd/dkim
|
||||
readOnly: true
|
||||
- name: rspamd-data
|
||||
mountPath: /var/lib/rspamd
|
||||
volumes:
|
||||
- name: rspamd-config
|
||||
configMap:
|
||||
name: rspamd-config
|
||||
- name: dkim-keys
|
||||
secret:
|
||||
secretName: dkim-keys
|
||||
- name: rspamd-data
|
||||
emptyDir: {}
|
||||
Reference in New Issue
Block a user