From 2876aba6e2cb1f3520f0293cd47ed619bd456d57 Mon Sep 17 00:00:00 2001 From: f Date: Sat, 7 Jan 2023 18:26:01 -0300 Subject: [PATCH] BREAKING CHANGE: deprecate RSPAMD env var --- postfixd.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/postfixd.sh b/postfixd.sh index 8af2776..93026e3 100755 --- a/postfixd.sh +++ b/postfixd.sh @@ -2,18 +2,17 @@ case $1 in start) - if test -z "${RSPAMD}" ; then - echo "Missing rspamd hostname" >&2 - exit 1 - fi - # Reconfigure postfix according to environment postconf -e myhostname="${DOMAIN}" postconf -e mydomain="${SUTTY}" postconf -e smtpd_tls_key_file="/etc/letsencrypt/live/${DOMAIN}/privkey.pem" postconf -e smtpd_tls_cert_file="/etc/letsencrypt/live/${DOMAIN}/fullchain.pem" - postconf -e smtpd_milters="${MILTERS}" - postconf -e non_smtpd_milters="${MILTERS}" + + if test -n "${MILTERS}"; then + postconf -e smtpd_milters="${MILTERS}" + postconf -e non_smtpd_milters="${MILTERS}" + fi + test -n "${NETWORKS}" && postconf -e mynetworks="${NETWORKS}" ;;