|
@@ -3,6 +3,7 @@
|
|
|
trap "postfix stop" EXIT
|
|
|
|
|
|
[[ ! -d /opt/postfix/conf/sql/ ]] && mkdir -p /opt/postfix/conf/sql/
|
|
|
+[[ ! -d /opt/postfix/conf/mta-sts-resolver/ ]] && mkdir -p /opt/postfix/conf/mta-sts-resolver/
|
|
|
|
|
|
# Wait for MySQL to warm-up
|
|
|
while ! mariadb-admin status --ssl=false --socket=/var/run/mysqld/mysqld.sock -u${DBUSER} -p${DBPASS} --silent; do
|
|
@@ -503,6 +504,33 @@ if [[ ! -f /opt/postfix/conf/custom_postscreen_whitelist.cidr ]]; then
|
|
|
EOF
|
|
|
fi
|
|
|
|
|
|
+cat <<EOF > /opt/postfix/conf/mta-sts-resolver/daemon.yml
|
|
|
+# Autogenerated by mailcow | DO NOT TOUCH!
|
|
|
+host: 127.0.0.1
|
|
|
+port: 8461
|
|
|
+reuse_port: true
|
|
|
+shutdown_timeout: 20
|
|
|
+cache:
|
|
|
+ type: redis
|
|
|
+ options:
|
|
|
+ url: "redis://redis/1" # Use seperate Redis Database for mta-sts keys
|
|
|
+ max_connections: 25
|
|
|
+ socket_timeout: 1.0
|
|
|
+ socket_connect_timeout: 1.0
|
|
|
+ password: ${REDISPASS}
|
|
|
+proactive_policy_fetching:
|
|
|
+ enabled: true
|
|
|
+ interval: 86400
|
|
|
+default_zone:
|
|
|
+ strict_testing: false
|
|
|
+ timeout: 4
|
|
|
+ tlsrpt: false # TODO for Postfix Deb 13
|
|
|
+zones:
|
|
|
+ myzone:
|
|
|
+ strict_testing: false
|
|
|
+ timeout: 4
|
|
|
+EOF
|
|
|
+
|
|
|
# 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
|
|
@@ -524,4 +552,4 @@ if [[ $? != 0 ]]; then
|
|
|
else
|
|
|
postfix -c /opt/postfix/conf start
|
|
|
sleep 126144000
|
|
|
-fi
|
|
|
+fi
|