2022-03-09 16:18:48 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
case $1 in
|
|
|
|
start)
|
2022-03-29 14:46:41 +00:00
|
|
|
if test -z "${RSPAMD}" ; then
|
|
|
|
echo "Missing rspamd hostname" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-03-09 16:18:48 +00:00
|
|
|
# Reconfigure postfix according to environment
|
|
|
|
postconf -e myhostname="${SUTTY}"
|
|
|
|
postconf -e mydomain="${SUTTY}"
|
|
|
|
postconf -e smtpd_tls_key_file="/etc/letsencrypt/live/${SUTTY}/privkey.pem"
|
|
|
|
postconf -e smtpd_tls_cert_file="/etc/letsencrypt/live/${SUTTY}/fullchain.pem"
|
|
|
|
postconf -e smtpd_milters="inet:${RSPAMD}:11332,inet:opendkim:8891"
|
|
|
|
|
|
|
|
;;
|
|
|
|
stop) ;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exec /usr/sbin/postfix $1
|