diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index 1ea64a50..39045046 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -194,7 +194,7 @@ tools/editconf.py /etc/postfix/main.cf virtual_transport=lmtp:[127.0.0.1]:10025 # whitelisted) then postfix does a DEFER_IF_REJECT, which results in all "unknown user" sorts of messages turning into #NODOC # "450 4.7.1 Client host rejected: Service unavailable". This is a retry code, so the mail doesn't properly bounce. #NODOC RECIPIENT_RESTRICTIONS=permit_sasl_authenticated,permit_mynetworks,\"reject_rbl_client zen.spamhaus.org\",reject_unlisted_recipient -if [ $NO_GREYLISTING != "1" ]; then +if [ $GREYLISTING != "1" ]; then RECIPIENT_RESTRICTIONS=${RECIPIENT_RESTRICTIONS},\"check_policy_service inet:127.0.0.1:10023\" fi tools/editconf.py /etc/postfix/main.cf \ diff --git a/setup/start.sh b/setup/start.sh index 60a0349e..b84d720c 100755 --- a/setup/start.sh +++ b/setup/start.sh @@ -42,18 +42,20 @@ else FIRST_TIME_SETUP=1 fi -if [ -z "${DEFAULT_HTTP_SSL_PORT:-}" ]; then - HTTP_SSL_PORT=443 -else - HTTP_SSL_PORT=$DEFAULT_HTTP_SSL_PORT +if [ -z "${HTTP_SSL_PORT:-}" ]; then + HTTP_SSL_PORT=$([[ -z "${DEFAULT_HTTP_SSL_PORT:-}" ]] && echo "443" || echo "$DEFAULT_HTTP_SSL_PORT") fi -if [ -z "${DEFAULT_NO_GREYLISTING:-}" ]; then - NO_GREYLISTING=0 -elif (($DEFAULT_NO_GREYLISTING > 0)); then - NO_GREYLISTING=1 -else - NO_GREYLISTING=0 +if [ -z "${GREYLISTING:-}" ]; then + GREYLISTING=$([[ -z "${DEFAULT_GREYLISTING:-}" ]] && echo "1" || echo "$DEFAULT_GREYLISTING") +fi + +if [ -z "${POSTSRSD:-}" ]; then + POSTSRSD=$([[ -z "${DEFAULT_POSTSRSD:-}" ]] && echo "0" || echo "$DEFAULT_POSTSRSD") +fi + +if [ -z "${POLICY_SPF:-}" ]; then + POLICY_SPF=$([[ -z "${DEFAULT_POLICY_SPF:-}" ]] && echo "0" || echo "$DEFAULT_POLICY_SPF") fi # Put a start script in a global location. We tell the user to run 'mailinabox' @@ -108,7 +110,9 @@ PUBLIC_IPV6=$PUBLIC_IPV6 PRIVATE_IP=$PRIVATE_IP PRIVATE_IPV6=$PRIVATE_IPV6 HTTP_SSL_PORT=$HTTP_SSL_PORT -NO_GREYLISTING=$NO_GREYLISTING +GREYLISTING=$GREYLISTING +POSTSRSD=$POSTSRSD +POLICY_SPF=$POLICY_SPF EOF # Start service configuration.