From b5b7264c92cb72e8c10f3996d65a35d0ad8a063b Mon Sep 17 00:00:00 2001 From: Aldo Maria Vizcaino Date: Sun, 23 Jun 2024 20:46:36 +0700 Subject: [PATCH] Add smtp to proxy protocol setup Signed-off-by: Aldo Maria Vizcaino --- charts/docker-mailserver/Chart.yaml | 2 +- charts/docker-mailserver/templates/deployment.yaml | 2 ++ charts/docker-mailserver/templates/service.yaml | 3 +++ charts/docker-mailserver/values.yaml | 6 ++++++ 4 files changed, 12 insertions(+), 1 deletion(-) diff --git a/charts/docker-mailserver/Chart.yaml b/charts/docker-mailserver/Chart.yaml index bf568454..fe4f38fa 100644 --- a/charts/docker-mailserver/Chart.yaml +++ b/charts/docker-mailserver/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: "13.3.1" description: A fullstack but simple mailserver (smtp, imap, antispam, antivirus, ssl...) using Docker. name: docker-mailserver -version: 3.0.13 +version: 3.0.14 sources: - https://github.com/docker-mailserver/docker-mailserver-helm maintainers: diff --git a/charts/docker-mailserver/templates/deployment.yaml b/charts/docker-mailserver/templates/deployment.yaml index b20d6f36..4b71b4ce 100644 --- a/charts/docker-mailserver/templates/deployment.yaml +++ b/charts/docker-mailserver/templates/deployment.yaml @@ -174,6 +174,8 @@ spec: - name: submission containerPort: 587 {{- if .Values.proxyProtocol.enabled }} + - name: smtp-proxy + containerPort: 12525 - name: subs-proxy containerPort: 10465 - name: sub-proxy diff --git a/charts/docker-mailserver/templates/service.yaml b/charts/docker-mailserver/templates/service.yaml index b642ca42..f71849d2 100644 --- a/charts/docker-mailserver/templates/service.yaml +++ b/charts/docker-mailserver/templates/service.yaml @@ -55,6 +55,9 @@ spec: nodePort: {{ default "30587" .Values.service.nodePort.submission }} {{ end }} {{- if .Values.proxyProtocol.enabled }} + - name: smtp-proxy + targetPort: smtp-proxy + port: 12525 - name: subs-proxy targetPort: subs-proxy port: 10465 diff --git a/charts/docker-mailserver/values.yaml b/charts/docker-mailserver/values.yaml index b3050668..4b41bb49 100644 --- a/charts/docker-mailserver/values.yaml +++ b/charts/docker-mailserver/values.yaml @@ -576,6 +576,12 @@ configMaps: -o milter_macro_daemon_name=ORIGINATING -o cleanup_service_name=sender-cleanup -o smtpd_upstream_proxy_protocol=haproxy + + # Smtp with proxy + 12525 inet n - n - 1 postscreen + -o syslog_name=postfix/smtp-proxy + -o postscreen_upstream_proxy_protocol=haproxy + -o postscreen_cache_map=btree:$data_directory/postscreen_10025_cache EOS {{- end }}