config: ensure SASL socket file is not inside a volume mount (#3131)

This commit is contained in:
Georg Lauterbach 2023-03-03 23:42:55 +01:00 committed by GitHub
parent 9a9380150e
commit f0edcc28d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 34 additions and 27 deletions

View file

@ -3,12 +3,17 @@
# This user script will be executed between configuration and starting daemons
# To enable it you must save it in your config directory as "user-patches.sh"
##
echo "[user-patches.sh] Changing Dovecot LMTP service listener from a unix socket to TCP on port 24"
sedfile -i \
-e "s|unix_listener lmtp|inet_listener lmtp|" \
-e "s|mode = 0660|address = 0.0.0.0|" \
-e "s|group = postfix|port = 24|" \
/etc/dovecot/conf.d/10-master.conf
cat >/etc/dovecot/conf.d/lmtp-master.inc << EOF
service lmtp {
inet_listener lmtp {
address = 127.0.0.1
port = 24
}
}
EOF
### Before / After ###
@ -21,7 +26,7 @@ sedfile -i \
# service lmtp {
# inet_listener lmtp {
# address = 0.0.0.0
# address = 127.0.0.1
# port = 24
# }
# }