1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2026-05-17 04:51:49 +00:00

Postfix: Split TLSPol companion app into separate container (#6688)

* postfix: split postfix-tlspol service into new container

* postfix-tls-pol: added debug mode

* pf-tlspol: removed obsoleted standalone conf from Dockerfiles

* pf-tlspol: use git instead of wget
This commit is contained in:
DerLinkman
2025-08-28 10:18:18 +02:00
committed by GitHub
parent 169aafec50
commit 1cb38bacdb
12 changed files with 257 additions and 44 deletions

View File

@@ -3,9 +3,6 @@
trap "postfix stop" EXIT
[[ ! -d /opt/postfix/conf/sql/ ]] && mkdir -p /opt/postfix/conf/sql/
[[ ! -d /opt/postfix/conf/postfix-tlspol ]] && mkdir -p /opt/postfix/conf/postfix-tlspol
[[ ! -d /etc/postfix-tlspol ]] && mkdir -p /etc/postfix-tlspol
[[ ! -d /var/lib/postfix-tlspol ]] && mkdir -p /var/lib/postfix-tlspol
# Wait for MySQL to warm-up
while ! mariadb-admin status --ssl=false --socket=/var/run/mysqld/mysqld.sock -u${DBUSER} -p${DBPASS} --silent; do
@@ -506,26 +503,6 @@ if [[ ! -f /opt/postfix/conf/custom_postscreen_whitelist.cidr ]]; then
EOF
fi
cat <<EOF > /opt/postfix/conf/postfix-tlspol/config.yaml
server:
address: 127.0.0.1:8642
log-level: info
prefetch: true
cache-file: /var/lib/postfix-tlspol/cache.db
dns:
# must support DNSSEC
address: 127.0.0.11:53
EOF
# Fixing local command execution of postfix-tlspol with symlink to config
if [ ! -L /etc/postfix-tlspol/config.yaml ]; then
ln -s /opt/postfix/conf/postfix-tlspol/config.yaml /etc/postfix-tlspol/config.yaml
fi
# Fix Postfix permissions
chown -R root:postfix /opt/postfix/conf/sql/ /opt/postfix/conf/custom_transport.pcre
chmod 640 /opt/postfix/conf/sql/*.cf /opt/postfix/conf/custom_transport.pcre