30 lines
580 B
Bash
Executable File
30 lines
580 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -e
|
|
|
|
postconf -e inet_interfaces=all
|
|
postconf -e inet_protocols=ipv4
|
|
postconf -e smtp_tls_security_level=may
|
|
|
|
if [ -n "$MY_HOSTNAME" ]; then
|
|
postconf -e myhostname="$MY_HOSTNAME"
|
|
fi
|
|
|
|
if [ -n "$MY_DOMAIN" ]; then
|
|
postconf -e mydomain="$MY_DOMAIN"
|
|
fi
|
|
|
|
if [ -n "$MY_NETWORKS" ]; then
|
|
postconf -e mynetworks="$MY_NETWORKS"
|
|
fi
|
|
|
|
if [ -n "$MY_ROOT_ALIAS" ]; then
|
|
sed -iE "s/^#root:.*/root: $MY_ROOT_ALIAS/" /etc/postfix/aliases
|
|
fi
|
|
|
|
newaliases -v
|
|
|
|
# Ensure rsyslog is up
|
|
sv start rsyslog || exit 1
|
|
|
|
/usr/libexec/postfix/master -c /etc/postfix -d 2>&1
|