Compare commits
8 Commits
d1694bf3a4
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d516ed25a | |||
| c6909c937d | |||
| 9708c595c4 | |||
| 9c52e54182 | |||
| 849cbfa2e4 | |||
| 0a51e44b93 | |||
| 16618f9949 | |||
| b4b47d5a79 |
@@ -145,7 +145,7 @@ dbhost=""
|
|||||||
# - Cert/Key configurations
|
# - Cert/Key configurations
|
||||||
# ---
|
# ---
|
||||||
|
|
||||||
cert_base_dir="/etc/postfix/ssl"
|
cert_base_dir="/etc/dovecot/ssl"
|
||||||
server_cert=${cert_base_dir}/mailserver.crt
|
server_cert=${cert_base_dir}/mailserver.crt
|
||||||
server_key=${cert_base_dir}/mailserver.key
|
server_key=${cert_base_dir}/mailserver.key
|
||||||
dh_pem_file="${cert_base_dir}/dh_4096.pem"
|
dh_pem_file="${cert_base_dir}/dh_4096.pem"
|
||||||
|
|||||||
@@ -3299,6 +3299,18 @@ if $INSTALL_CLAMAV_UNOFFICIAL_SIGS ; then
|
|||||||
if [[ "$?" -ne 0 ]] ; then
|
if [[ "$?" -ne 0 ]] ; then
|
||||||
installation_failed=true
|
installation_failed=true
|
||||||
error "$(cat $tmp_err_msg)"
|
error "$(cat $tmp_err_msg)"
|
||||||
|
|
||||||
|
warn "command was:
|
||||||
|
|
||||||
|
git clone https://github.com/extremeshok/clamav-unofficial-sigs.git /tmp/clamav-unofficial-sigs"
|
||||||
|
echononl "continue anyway [yes/no]: "
|
||||||
|
read OK
|
||||||
|
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||||
|
echononl "Wrong entry! - repeat [yes/nno]: "
|
||||||
|
read OK
|
||||||
|
done
|
||||||
|
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
|
||||||
fi
|
fi
|
||||||
if ! $installation_failed ; then
|
if ! $installation_failed ; then
|
||||||
echo_ok
|
echo_ok
|
||||||
@@ -4996,6 +5008,7 @@ fi
|
|||||||
## - localhost:10025 inet n - y - - smtpd
|
## - localhost:10025 inet n - y - - smtpd
|
||||||
## - -o content_filter=
|
## - -o content_filter=
|
||||||
## - -o smtpd_proxy_filter=
|
## - -o smtpd_proxy_filter=
|
||||||
|
## - -o smtpd_milters=
|
||||||
## - -o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128
|
## - -o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128
|
||||||
## - -o smtpd_client_restrictions=
|
## - -o smtpd_client_restrictions=
|
||||||
## - -o smtpd_helo_restrictions=
|
## - -o smtpd_helo_restrictions=
|
||||||
@@ -5070,6 +5083,8 @@ EOF
|
|||||||
localhost:10025 inet n - y - - smtpd
|
localhost:10025 inet n - y - - smtpd
|
||||||
-o content_filter=
|
-o content_filter=
|
||||||
-o smtpd_proxy_filter=
|
-o smtpd_proxy_filter=
|
||||||
|
-o smtpd_milters=
|
||||||
|
-o milter_macro_daemon_name=ORIGINATING
|
||||||
-o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128
|
-o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128
|
||||||
-o smtpd_client_restrictions=
|
-o smtpd_client_restrictions=
|
||||||
-o smtpd_helo_restrictions=
|
-o smtpd_helo_restrictions=
|
||||||
@@ -5132,6 +5147,8 @@ EOF
|
|||||||
localhost:10025 inet n - y - - smtpd
|
localhost:10025 inet n - y - - smtpd
|
||||||
-o content_filter=
|
-o content_filter=
|
||||||
-o smtpd_proxy_filter=
|
-o smtpd_proxy_filter=
|
||||||
|
-o smtpd_milters=
|
||||||
|
-o milter_macro_daemon_name=ORIGINATING
|
||||||
-o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128
|
-o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128
|
||||||
-o smtpd_client_restrictions=
|
-o smtpd_client_restrictions=
|
||||||
-o smtpd_helo_restrictions=
|
-o smtpd_helo_restrictions=
|
||||||
@@ -5184,6 +5201,8 @@ EOF
|
|||||||
localhost:10025 inet n - y - - smtpd
|
localhost:10025 inet n - y - - smtpd
|
||||||
-o content_filter=
|
-o content_filter=
|
||||||
-o smtpd_proxy_filter=
|
-o smtpd_proxy_filter=
|
||||||
|
-o smtpd_milters=
|
||||||
|
-o milter_macro_daemon_name=ORIGINATING
|
||||||
-o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128
|
-o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128
|
||||||
-o smtpd_client_restrictions=
|
-o smtpd_client_restrictions=
|
||||||
-o smtpd_helo_restrictions=
|
-o smtpd_helo_restrictions=
|
||||||
@@ -5220,6 +5239,8 @@ EOF
|
|||||||
localhost:10025 inet n - y - - smtpd
|
localhost:10025 inet n - y - - smtpd
|
||||||
-o content_filter=
|
-o content_filter=
|
||||||
-o smtpd_proxy_filter=
|
-o smtpd_proxy_filter=
|
||||||
|
-o smtpd_milters=
|
||||||
|
-o milter_macro_daemon_name=ORIGINATING
|
||||||
-o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128
|
-o smtpd_authorized_xforward_hosts=127.0.0.0/8,[::1]/128
|
||||||
-o smtpd_client_restrictions=
|
-o smtpd_client_restrictions=
|
||||||
-o smtpd_helo_restrictions=
|
-o smtpd_helo_restrictions=
|
||||||
|
|||||||
@@ -881,26 +881,26 @@ else
|
|||||||
error "$(cat $log_file)"
|
error "$(cat $log_file)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echononl " Set Variable non_smtpd_milters at '/etc/postfix/main.cf'.."
|
#echononl " Set Variable non_smtpd_milters at '/etc/postfix/main.cf'.."
|
||||||
if $(grep -q -E "^\s*non_smtpd_milters\s*=\s*.*opendkim.sock" /etc/postfix/main.cf 2> /dev/null) ; then
|
#if $(grep -q -E "^\s*non_smtpd_milters\s*=\s*.*opendkim.sock" /etc/postfix/main.cf 2> /dev/null) ; then
|
||||||
if $(grep -q -E "^\s*non_smtpd_milters\s*=\s*.*$(basename "${opendmarc_socket_file}")" /etc/postfix/main.cf); then
|
# if $(grep -q -E "^\s*non_smtpd_milters\s*=\s*.*$(basename "${opendmarc_socket_file}")" /etc/postfix/main.cf); then
|
||||||
echo_skipped
|
# echo_skipped
|
||||||
else
|
# else
|
||||||
perl -i -n -p -e "s&^\s*(non_smtpd_milters\s*=.*opendkim.sock)&\1,local:/$(basename "${opendmarc_socket_dir}")/$(basename "${opendmarc_socket_file}")&" \
|
# perl -i -n -p -e "s&^\s*(non_smtpd_milters\s*=.*opendkim.sock)&\1,local:/$(basename "${opendmarc_socket_dir}")/$(basename "${opendmarc_socket_file}")&" \
|
||||||
/etc/postfix/main.cf > $log_file 2>&1
|
# /etc/postfix/main.cf > $log_file 2>&1
|
||||||
if [[ $? -eq 0 ]] ; then
|
# if [[ $? -eq 0 ]] ; then
|
||||||
echo_ok
|
# echo_ok
|
||||||
postfix_needs_restart=true
|
# postfix_needs_restart=true
|
||||||
else
|
# else
|
||||||
echo_failed
|
# echo_failed
|
||||||
error "$(cat $log_file)"
|
# error "$(cat $log_file)"
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
else
|
#else
|
||||||
|
#
|
||||||
echo_skipped
|
# echo_skipped
|
||||||
warn "non_smtpd_milters is not adjusted. Complete Postfix configuration (main.cf) manually\!"
|
# warn "non_smtpd_milters is not adjusted. Complete Postfix configuration (main.cf) manually\!"
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
|
|
||||||
echononl " Set Variable smtpd_milters at '/etc/postfix/main.cf'.."
|
echononl " Set Variable smtpd_milters at '/etc/postfix/main.cf'.."
|
||||||
@@ -975,53 +975,53 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if grep -q -E "^\s*#?\s*non_smtpd_milters\s*=" ${main_cf_file} ; then
|
#if grep -q -E "^\s*#?\s*non_smtpd_milters\s*=" ${main_cf_file} ; then
|
||||||
|
|
||||||
ensure_dmarc_var "non_smtpd_milters" > "${tmp_main_cf_file}"
|
|
||||||
cp "${tmp_main_cf_file}" "${main_cf_file}"
|
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
cat <<EOF >> /etc/postfix/main.cf 2> $log_file
|
|
||||||
|
|
||||||
# Was sind non_smtpd_milters?
|
|
||||||
#
|
#
|
||||||
# non_smtpd_milters gilt für alle Postfix-Prozesse, die Mails verarbeiten, aber NICHT
|
# ensure_dmarc_var "non_smtpd_milters" > "${tmp_main_cf_file}"
|
||||||
# der smtpd-Daemon sind.
|
# cp "${tmp_main_cf_file}" "${main_cf_file}"
|
||||||
#
|
#
|
||||||
# Das betrifft z. B.:
|
#else
|
||||||
#
|
#
|
||||||
# cleanup Header/Content-Bereinigung
|
# cat <<EOF >> /etc/postfix/main.cf 2> $log_file
|
||||||
# qmgr Queue-Manager
|
|
||||||
# lmtp / smtp Auslieferung nach extern
|
|
||||||
# local lokale Zustellung
|
|
||||||
#
|
#
|
||||||
# Das sind z. B.:
|
## Was sind non_smtpd_milters?
|
||||||
#
|
##
|
||||||
# - interne Bounces (MAILER-DAEMON)
|
## non_smtpd_milters gilt für alle Postfix-Prozesse, die Mails verarbeiten, aber NICHT
|
||||||
#
|
## der smtpd-Daemon sind.
|
||||||
# - Cron-Mails vom Server
|
##
|
||||||
#
|
## Das betrifft z. B.:
|
||||||
# - Weiterleitungen, die Postfix selbst generiert
|
##
|
||||||
#
|
## cleanup Header/Content-Bereinigung
|
||||||
# - Mails, die über sendmail CLI gesendet werden
|
## qmgr Queue-Manager
|
||||||
#
|
## lmtp / smtp Auslieferung nach extern
|
||||||
# - Mails, die Amavis über LMTP zurückgibt
|
## local lokale Zustellung
|
||||||
#
|
##
|
||||||
# - etc.
|
## Das sind z. B.:
|
||||||
#
|
##
|
||||||
#
|
## - interne Bounces (MAILER-DAEMON)
|
||||||
# DKIM soll auch die ausgehenden Mails signieren, die nicht über smtpd daemon versendet werden.
|
##
|
||||||
non_smtpd_milters = $opendmarc_socket_string
|
## - Cron-Mails vom Server
|
||||||
EOF
|
##
|
||||||
fi
|
## - Weiterleitungen, die Postfix selbst generiert
|
||||||
postfix_needs_restart=true
|
##
|
||||||
if [[ $? -eq 0 ]] ; then
|
## - Mails, die über sendmail CLI gesendet werden
|
||||||
echo_ok
|
##
|
||||||
else
|
## - Mails, die Amavis über LMTP zurückgibt
|
||||||
echo_failed
|
##
|
||||||
error "$(cat $log_file)"
|
## - etc.
|
||||||
fi
|
##
|
||||||
|
##
|
||||||
|
## DKIM soll auch die ausgehenden Mails signieren, die nicht über smtpd daemon versendet werden.
|
||||||
|
#non_smtpd_milters = $opendmarc_socket_string
|
||||||
|
#EOF
|
||||||
|
#fi
|
||||||
|
#postfix_needs_restart=true
|
||||||
|
#if [[ $? -eq 0 ]] ; then
|
||||||
|
# echo_ok
|
||||||
|
#else
|
||||||
|
# echo_failed
|
||||||
|
# error "$(cat $log_file)"
|
||||||
|
#fi
|
||||||
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -2911,8 +2911,13 @@ fi
|
|||||||
cat <<EOF >> /etc/postfix/main.cf
|
cat <<EOF >> /etc/postfix/main.cf
|
||||||
# Policyd-Weight
|
# Policyd-Weight
|
||||||
#check_policy_service inet:127.0.0.1:12525,
|
#check_policy_service inet:127.0.0.1:12525,
|
||||||
|
# ---------------------------------------------------------------------------------
|
||||||
|
# DEPRECATED permit_mx_backup
|
||||||
|
#
|
||||||
|
# warning: support for restriction "permit_mx_backup" will be removed from Postfix;
|
||||||
# permit Backup MX
|
# permit Backup MX
|
||||||
permit_mx_backup,
|
# permit_mx_backup,
|
||||||
|
# ---------------------------------------------------------------------------------
|
||||||
# permit, if all restrictions so far passed
|
# permit, if all restrictions so far passed
|
||||||
permit
|
permit
|
||||||
|
|
||||||
@@ -2953,8 +2958,13 @@ smtpd_relay_restrictions =
|
|||||||
# managed by the verify(8) server; see http://www.postfix.org/ADDRESS_VERIFICATION_README.html
|
# managed by the verify(8) server; see http://www.postfix.org/ADDRESS_VERIFICATION_README.html
|
||||||
# for more details
|
# for more details
|
||||||
reject_unverified_recipient,
|
reject_unverified_recipient,
|
||||||
|
# ---------------------------------------------------------------------------------
|
||||||
|
# DEPRECATED permit_mx_backup
|
||||||
|
#
|
||||||
|
# warning: support for restriction "permit_mx_backup" will be removed from Postfix;
|
||||||
# permit Backup MX
|
# permit Backup MX
|
||||||
permit_mx_backup,
|
# permit_mx_backup,
|
||||||
|
# ---------------------------------------------------------------------------------
|
||||||
# permit, if all restrictions so far passed
|
# permit, if all restrictions so far passed
|
||||||
permit
|
permit
|
||||||
|
|
||||||
@@ -3058,20 +3068,18 @@ EOF
|
|||||||
#
|
#
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [[ -n "$(which opendkim)" ]] && [[ -n "$(which opendmarc)" ]] ; then
|
if [[ -n "$(which opendkim)" ]] ; then
|
||||||
cat <<EOF >> /etc/postfix/main.cf
|
|
||||||
non_smtpd_milters = local:/opendkim/opendkim.sock,local:/opendmarc/opendmarc.sock
|
|
||||||
EOF
|
|
||||||
elif [[ -n "$(which opendkim)" ]] ; then
|
|
||||||
cat <<EOF >> /etc/postfix/main.cf
|
cat <<EOF >> /etc/postfix/main.cf
|
||||||
non_smtpd_milters = local:/opendkim/opendkim.sock
|
non_smtpd_milters = local:/opendkim/opendkim.sock
|
||||||
EOF
|
EOF
|
||||||
else
|
else
|
||||||
cat <<EOF >> /etc/postfix/main.cf
|
cat <<EOF >> /etc/postfix/main.cf
|
||||||
non_smtpd_milters = local:/opendmarc/opendmarc.sock
|
non_smtpd_milters =
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
cat <<EOF >> /etc/postfix/main.cf
|
cat <<EOF >> /etc/postfix/main.cf
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -938,6 +938,16 @@ done
|
|||||||
if $_failed ; then
|
if $_failed ; then
|
||||||
echo_failed
|
echo_failed
|
||||||
error "$(cat $log_file)"
|
error "$(cat $log_file)"
|
||||||
|
|
||||||
|
echononl "\tcontinue anyway [yes/no]: "
|
||||||
|
read OK
|
||||||
|
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||||
|
echononl "Wrong entry! - repeat [yes/nno]: "
|
||||||
|
read OK
|
||||||
|
done
|
||||||
|
[[ $OK = "yes" ]] || fatal "Script terminated by user input.."
|
||||||
|
|
||||||
else
|
else
|
||||||
echo_ok
|
echo_ok
|
||||||
fi
|
fi
|
||||||
@@ -2198,7 +2208,7 @@ fi
|
|||||||
|
|
||||||
echo -e "\n\n\t\033[37m\033[1mConfigure Postfix Admin\033[m\n"
|
echo -e "\n\n\t\033[37m\033[1mConfigure Postfix Admin\033[m\n"
|
||||||
|
|
||||||
if [[ $MAJOR_VERSION -eq 3 ]] && [[ $MINOR_VERSION -gt 0 ]]; then
|
if [[ $MAJOR_VERSION -gt 3 ]] || [[ $MAJOR_VERSION -eq 3 ]] && [[ $MINOR_VERSION -gt 0 ]]; then
|
||||||
pfa_conf_file="${WEBSITE_BASEDIR}/postfixadmin-${PF_ADMIN_VERSION}/config.local.php"
|
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"
|
cp -a "${WEBSITE_BASEDIR}/postfixadmin-${PF_ADMIN_VERSION}/config.inc.php" "$pfa_conf_file"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user