Skip to content

Commit 2229467

Browse files
authored
Merge pull request docker-mailserver#187 from docker-mailserver/fix/proxy-protocol-postscreen-cache
fix: PROXY protocol should share postscreen cache
2 parents 46df9da + c4a2dd1 commit 2229467

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

charts/docker-mailserver/tests/__snapshot__/configmap_test.yaml.snap

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,15 @@ manifest should match snapshot:
6363

6464
# Create a variant for port 25 too (NOTE: Port 10025 is already assigned in DMS to Amavis):
6565
postconf -Mf smtp/inet | sed -e s/^smtp/12525/ >> /etc/postfix/master.cf
66-
# Enable PROXY Protocol support (different setting as port 25 is handled via postscreen), optionally configure a `syslog_name` to distinguish in logs:
67-
postconf -P 12525/inet/postscreen_upstream_proxy_protocol=haproxy 12525/inet/postscreen_cache_map=proxy:btree:\$data_directory/postscreen_12525_cache 12525/inet/syslog_name=postfix/smtpd-proxyprotocol
66+
# Enable PROXY Protocol support:
67+
# - Uses a different setting as port 25 is handled via the postscreen service
68+
# - Optionally configure a `syslog_name` to distinguish in logs:
69+
postconf -P \
70+
12525/inet/postscreen_upstream_proxy_protocol=haproxy \
71+
12525/inet/syslog_name=postfix/smtpd-proxyprotocol
72+
73+
# Add the `proxy:` prefix to share this cache between each running postscreen service via `proxymap`:
74+
postconf 'postscreen_cache_map = proxy:btree:$data_directory/postscreen_cache'
6875
kind: ConfigMap
6976
metadata:
7077
labels:

charts/docker-mailserver/values.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,15 @@ configMaps:
614614
615615
# Create a variant for port 25 too (NOTE: Port 10025 is already assigned in DMS to Amavis):
616616
postconf -Mf smtp/inet | sed -e s/^smtp/12525/ >> /etc/postfix/master.cf
617-
# Enable PROXY Protocol support (different setting as port 25 is handled via postscreen), optionally configure a `syslog_name` to distinguish in logs:
618-
postconf -P 12525/inet/postscreen_upstream_proxy_protocol=haproxy 12525/inet/postscreen_cache_map=proxy:btree:\$data_directory/postscreen_12525_cache 12525/inet/syslog_name=postfix/smtpd-proxyprotocol
617+
# Enable PROXY Protocol support:
618+
# - Uses a different setting as port 25 is handled via the postscreen service
619+
# - Optionally configure a `syslog_name` to distinguish in logs:
620+
postconf -P \
621+
12525/inet/postscreen_upstream_proxy_protocol=haproxy \
622+
12525/inet/syslog_name=postfix/smtpd-proxyprotocol
623+
624+
# Add the `proxy:` prefix to share this cache between each running postscreen service via `proxymap`:
625+
postconf 'postscreen_cache_map = proxy:btree:$data_directory/postscreen_cache'
619626
{{- end }}
620627
621628
## The secrets key works the same way as the configs key. Use secrets to store sensitive information,

0 commit comments

Comments
 (0)