Skip to content

Commit a5b0f4a

Browse files
committed
feat(docker-mailserver): add optional TLS enforcement for outbound mail
Adds tls.enforceOutbound (default false) - when true, sets smtp_tls_security_level = encrypt via user-patches.sh instead of Postfix's default opportunistic (may) behaviour. Mail to servers without TLS support will bounce rather than send in cleartext. Signed-off-by: Rishi <rishi@obmondo.com>
1 parent 98a3221 commit a5b0f4a

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • argocd-helm-charts/docker-mailserver/charts/docker-mailserver

argocd-helm-charts/docker-mailserver/charts/docker-mailserver/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,12 @@ proxyProtocol:
456456
# List of sources (in CIDR format, space-separated) to permit PROXY protocol from
457457
trustedNetworks: "10.0.0.0/8 192.168.0.0/16 172.16.0.0/12"
458458

459+
tls:
460+
# Require TLS on outbound mail delivery (smtp_tls_security_level = encrypt) instead of
461+
# the Postfix default opportunistic behaviour (may). Mail to servers without TLS support
462+
# will bounce rather than send in cleartext.
463+
enforceOutbound: false
464+
459465
# when metrics is enabled, we mount subpath log from pvc into /var/log/mail
460466
metrics:
461467
enabled: false
@@ -625,6 +631,12 @@ configMaps:
625631
postconf 'postscreen_cache_map = proxy:btree:$data_directory/postscreen_cache'
626632
{{- end }}
627633
634+
{{- if .Values.tls.enforceOutbound }}
635+
# Require TLS on outbound delivery instead of opportunistic (may) - mail to servers
636+
# without TLS support will bounce rather than send in cleartext.
637+
postconf -e 'smtp_tls_security_level = encrypt'
638+
{{- end }}
639+
628640
## The secrets key works the same way as the configs key. Use secrets to store sensitive information,
629641
## such as DKIM signing keys.
630642
##

0 commit comments

Comments
 (0)