Compare commits

..

11 Commits

3 changed files with 162 additions and 126 deletions

View File

@@ -396,8 +396,13 @@ while [[ "$SASL_AUTH_ENABLED" != "yes" &&
SASL_AUTH_ENABLED=${SASL_AUTH_ENABLED,,}
fi
if [[ "$SASL_AUTH_ENABLED" != "yes" && "$SASL_AUTH_ENABLED" != "no" ]] ; then
_SASL_AUTH_ENABLED=""
[[ -z "${SASL_AUTH_ENABLED}" ]] && SASL_AUTH_ENABLED=${_SASL_AUTH_ENABLED}
if [[ "$SASL_AUTH_ENABLED" != "yes" &&
"$SASL_AUTH_ENABLED" != "true" &&
"$SASL_AUTH_ENABLED" != "false" &&
"$SASL_AUTH_ENABLED" != "no" ]] ; then
SASL_AUTH_ENABLED=""
echo -e "\n\t\033[33m\033[1mWrong entry!\033[m\n Type 'yes' or 'no'"
fi
@@ -444,7 +449,8 @@ if ! ${SASL_AUTH_ENABLED} ; then
else
IS_SYMPA_LIST_SERVER=false
fi
else
IS_SYMPA_LIST_SERVER=false
fi

View File

@@ -171,8 +171,10 @@ fi
if [[ -z "$_RELAY_HOST" ]]; then
_IS_RELAY_HOST=$DEFAULT_IS_RELAY_HOST
else
_IS_RELAY_HOST="$_RELAY_HOST"
_IS_RELAY_HOST="${_RELAY_HOST,,}"
fi
[[ "${_IS_RELAY_HOST}" == "yes" ]] && _IS_RELAY_HOST=true
[[ "${_IS_RELAY_HOST}" == "no" ]] && _IS_RELAY_HOST=false
if [[ -z "$_LISTEN_ON_ADDITIONAL_RELAY_PORT" ]] ; then
_LISTEN_ON_ADDITIONAL_RELAY_PORT=${DEFAULT_LISTEN_ON_ADDITIONAL_RELAY_PORT}
@@ -2144,9 +2146,24 @@ smtp_tls_security_level=dane
smtpd_tls_loglevel = 1
smtp_tls_loglevel = 1
# TLS RSA keys path
smtpd_tls_cert_file = $_TLS_CERT_FILE
smtpd_tls_key_file = $_TLS_KEY_FILE
EOF
if [[ -f "/etc/postfix/ssl/mailserver-ecdsa.crt" &&
-f "/etc/postfix/ssl/mailserver-ecdsa.key" ]] ; then
cat <<EOF >> /etc/postfix/main.cf
# TLS ECDSA keys path
smtpd_tls_eccert_file = /etc/postfix/ssl/mailserver-ecdsa.crt
smtpd_tls_eckey_file = /etc/postfix/ssl/mailserver-ecdsa.key
EOF
fi
cat <<EOF >> /etc/postfix/main.cf
## - File with DH parameters that the Postfix SMTP server should use with EDH ciphers.
## -
@@ -2714,7 +2731,7 @@ EOF
if [[ -n "$(which postfwd)" ]] ; then
cat <<EOF >> /etc/postfix/main.cf
127.0.0.1:10040_time_limit = 3600
#127.0.0.1:10040_time_limit = 3600
EOF
else
cat <<EOF >> /etc/postfix/main.cf
@@ -2732,7 +2749,7 @@ if [[ -n "$(which policyd-spf)" ]] ; then
# policyd-spf unix - n n - 0 spawn
# user=policyd-spf argv=/usr/bin/policyd-spf
#
policyd-spf_time_limit = 3600
#policyd-spf_time_limit = 3600
EOF
fi
@@ -3032,7 +3049,7 @@ else
EOF
fi
if ${IS_SYMPA_LIST_SERVER} ; then
if ${IS_SYMPA_LIST_SERVER} || ${IS_RELAY_HOST}; then
cat <<EOF >> /etc/postfix/main.cf
@@ -4130,6 +4147,14 @@ else
dmarc_pipe_present=false
fi
if ${LISTEN_ON_ADDITIONAL_RELAY_PORT} ; then
if grep -iq -E "^${ADDITIONAL_RELAY_LISTEN_PORT}\s+" $postfix_master_cf > /dev/null 2>&1 ; then
additional_relay_port_present=true
else
additional_relay_port_present=false
fi
fi
_found=false
echononl " Create new file \"${postfix_master_cf}\""
if [[ -f "${postfix_master_cf}.$backup_date" ]]; then
@@ -4159,9 +4184,11 @@ smtps inet n - y - - smtpd
EOF
fi
elif $LISTEN_ON_ADDITIONAL_RELAY_PORT ; then
if ! ${additional_relay_port_present} ; then
cat >> $postfix_master_cf << EOF
${ADDITIONAL_RELAY_LISTEN_PORT} inet n - y - - smtpd
EOF
fi
fi
continue
fi

View File

@@ -2208,7 +2208,11 @@ fi
echo -e "\n\n\t\033[37m\033[1mConfigure Postfix Admin\033[m\n"
if [[ $MAJOR_VERSION -gt 3 ]] || [[ $MAJOR_VERSION -eq 3 ]] && [[ $MINOR_VERSION -gt 0 ]]; then
if [[ $MAJOR_VERSION -gt 3 ]] ; then
pfa_conf_file="${WEBSITE_BASEDIR}/postfixadmin-${PF_ADMIN_VERSION}/config.local.php"
cp -a "${WEBSITE_BASEDIR}/postfixadmin-${PF_ADMIN_VERSION}/config.inc.php" "$pfa_conf_file"
elif [[ $MAJOR_VERSION -eq 3 ]] && [[ $MINOR_VERSION -gt 0 ]] ; then
pfa_conf_file="${WEBSITE_BASEDIR}/postfixadmin-${PF_ADMIN_VERSION}/config.local.php"
cp -a "${WEBSITE_BASEDIR}/postfixadmin-${PF_ADMIN_VERSION}/config.inc.php" "$pfa_conf_file"
else
@@ -2217,7 +2221,6 @@ else
fi
# - Use 'Re: $SUBJECT' as the default subject template for vacation
# - in postfixadmin
# -