coreos-home-server/service/postfix/container/run-postfix
Alex Palaistras de1627f4a6 postfix: Use recommended method for service start
This commit updates Postfix to the latest version available for Debian
Bullseye, and switches the Docker entrypoint from an internal to a
publicly documented command, which is guaranteed to work in the future.
2022-07-11 21:22:38 +01:00

17 lines
489 B
Bash
Executable File

#!/bin/sh
# Prepare configuration files for environment variable substitution.
ENV_NAMES="`env | awk -F '=' '{printf "$%s ", $1}'`"
for file in /etc/postfix/*.template; do
envsubst "${ENV_NAMES}" < "$file" > "`echo $file | awk -F '.template$' '{print $1}'`"
done
# Generate local aliases and virtual maps.
postalias /etc/postfix/aliases
# Ensure local files are correctly configured.
postfix set-permissions
# Run master daemon for Postfix.
/usr/sbin/postfix -c /etc/postfix start-fg