Compare commits
9 Commits
f2f3797c1e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 50bc28dc2a | |||
| b87793cbad | |||
|
|
cc155c578a | ||
| b28b3a8316 | |||
| ecfd630612 | |||
| 68d2bd18b7 | |||
|
|
6521b03aa2 | ||
| 05723c0514 | |||
| 32b3c8b01e |
@@ -165,8 +165,16 @@ max_userip_connections=24
|
|||||||
#auth_mechanisms="plain login digest-md5 cram-md5"
|
#auth_mechanisms="plain login digest-md5 cram-md5"
|
||||||
auth_mechanisms="plain login"
|
auth_mechanisms="plain login"
|
||||||
|
|
||||||
|
|
||||||
|
# ---
|
||||||
# - Settings for quota warning sript
|
# - Settings for quota warning sript
|
||||||
# -
|
# ---
|
||||||
|
|
||||||
|
# msg_language
|
||||||
|
#
|
||||||
|
# possible Vallues are 'en' or 'de'
|
||||||
|
#
|
||||||
|
msg_language=de
|
||||||
from_address="o.open <oo@oopen.de>"
|
from_address="o.open <oo@oopen.de>"
|
||||||
reply_to="oo@oopen.de"
|
reply_to="oo@oopen.de"
|
||||||
webmailer="https://webmail.oopen.de"
|
webmailer="https://webmail.oopen.de"
|
||||||
|
|||||||
@@ -115,9 +115,11 @@ DEFAULT_ADMIN_EMAIL="argus@oopen.de"
|
|||||||
|
|
||||||
# - Is this a systemd system?
|
# - Is this a systemd system?
|
||||||
# -
|
# -
|
||||||
if [[ "X`which systemd`" = "X" ]]; then
|
systemd_exists=false
|
||||||
systemd_exists=false
|
systemd=$(which systemd)
|
||||||
else
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
|
||||||
systemd_exists=true
|
systemd_exists=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -154,9 +154,11 @@ QUARANTINE_ADMIN=$DEFAULT_QUARANTINE_ADMIN
|
|||||||
|
|
||||||
# - Is this a systemd system?
|
# - Is this a systemd system?
|
||||||
# -
|
# -
|
||||||
if [[ "X`which systemd`" = "X" ]]; then
|
systemd_exists=false
|
||||||
systemd_exists=false
|
systemd=$(which systemd)
|
||||||
else
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
|
||||||
systemd_exists=true
|
systemd_exists=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -4315,6 +4317,23 @@ if (-r \$policy_banks_file) {
|
|||||||
\$final_bad_header_destiny = D_PASS;
|
\$final_bad_header_destiny = D_PASS;
|
||||||
|
|
||||||
|
|
||||||
|
# ----------------------------------------------------------
|
||||||
|
# Admin E-Mails / Warnungen direct von AMaViS (nicht DSN- oder Bounce-Mails)
|
||||||
|
# ----------------------------------------------------------
|
||||||
|
|
||||||
|
# Bemerkung:
|
||||||
|
# *nochmal*: das hat nichts mit den eigentlichen DSN-/Bounce-Mails zu tun.
|
||||||
|
|
||||||
|
\$virus_admin = undef;
|
||||||
|
\$spam_admin = undef;
|
||||||
|
|
||||||
|
\$warnvirusrecip = 0;
|
||||||
|
\$warnbannedrecip = 0;
|
||||||
|
\$warnbannedsender = 0;
|
||||||
|
\$warnbadhrecip = 0;
|
||||||
|
\$warn_offsite = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Bypass spam checking for trusted networks using mynetworks
|
# Bypass spam checking for trusted networks using mynetworks
|
||||||
#
|
#
|
||||||
@@ -4989,19 +5008,6 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ${listen_on_additional_smtp_port} ; then
|
|
||||||
cat >> $postfix_master_cf << EOF
|
|
||||||
${additional_smtp_port} inet n - y - - smtpd
|
|
||||||
-o smtpd_proxy_filter=127.0.0.1:10024
|
|
||||||
-o content_filter=
|
|
||||||
EOF
|
|
||||||
if [[ "$SASL_AUTH_ENABLED" = "no" ]] ; then
|
|
||||||
cat >> $postfix_master_cf << EOF
|
|
||||||
-o smtpd_sasl_auth_enable=no
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! $submission_present && ! $smtps_present && ! $localhost_10025_present ; then
|
if ! $submission_present && ! $smtps_present && ! $localhost_10025_present ; then
|
||||||
cat >> $postfix_master_cf << EOF
|
cat >> $postfix_master_cf << EOF
|
||||||
localhost:10025 inet n - y - - smtpd
|
localhost:10025 inet n - y - - smtpd
|
||||||
@@ -5016,13 +5022,9 @@ localhost:10025 inet n - y - - smtpd
|
|||||||
-o mynetworks=127.0.0.0/8,[::1]/128
|
-o mynetworks=127.0.0.0/8,[::1]/128
|
||||||
-o receive_override_options=no_unknown_recipient_checks
|
-o receive_override_options=no_unknown_recipient_checks
|
||||||
EOF
|
EOF
|
||||||
if [[ -n "$(which opendkim)" && -n "$(which opendmarc)" ]] ; then
|
if [[-n "$(which opendmarc)" ]] ; then
|
||||||
cat >> $postfix_master_cf << EOF
|
cat >> $postfix_master_cf << EOF
|
||||||
-o smtpd_milters=local:/opendkim/opendkim.sock,local:/opendmarc/opendmarc.sock
|
-o smtpd_milters=local:/opendmarc/opendmarc.sock
|
||||||
EOF
|
|
||||||
elif [[ -n "$(which opendkim)" ]] ; then
|
|
||||||
cat >> $postfix_master_cf << EOF
|
|
||||||
-o smtpd_milters=local:/opendkim/opendkim.sock
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
cat >> $postfix_master_cf << EOF
|
cat >> $postfix_master_cf << EOF
|
||||||
@@ -5033,8 +5035,26 @@ EOF
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ${listen_on_additional_smtp_port} \
|
||||||
|
&& echo "$_line" | grep -i -E "^\s*${additional_smtp_port}\s+inet" > /dev/null 2>&1 ; then
|
||||||
|
_found=true
|
||||||
|
cat >> $postfix_master_cf << EOF
|
||||||
|
${additional_smtp_port} inet n - y - - smtpd
|
||||||
|
-o smtpd_proxy_filter=127.0.0.1:10024
|
||||||
|
-o content_filter=
|
||||||
|
EOF
|
||||||
|
if [[ "$SASL_AUTH_ENABLED" = "no" ]] ; then
|
||||||
|
cat >> $postfix_master_cf << EOF
|
||||||
|
-o smtpd_sasl_auth_enable=no
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
if $submission_present && echo "$_line" | grep -i -E "^^submission\s+" > /dev/null 2>&1 ; then
|
continue
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if $submission_present && echo "$_line" | grep -i -E "^submission\s+" > /dev/null 2>&1 ; then
|
||||||
_found=true
|
_found=true
|
||||||
cat >> $postfix_master_cf << EOF
|
cat >> $postfix_master_cf << EOF
|
||||||
submission inet n - y - 20 smtpd
|
submission inet n - y - 20 smtpd
|
||||||
@@ -5042,6 +5062,13 @@ submission inet n - y - 20 smtpd
|
|||||||
-o smtpd_tls_security_level=encrypt
|
-o smtpd_tls_security_level=encrypt
|
||||||
-o smtpd_sasl_auth_enable=yes
|
-o smtpd_sasl_auth_enable=yes
|
||||||
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
||||||
|
EOF
|
||||||
|
if [[ -n "$(which opendkim)" ]] ; then
|
||||||
|
cat >> $postfix_master_cf << EOF
|
||||||
|
-o smtpd_milters=local:/opendkim/opendkim.sock
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
cat >> $postfix_master_cf << EOF
|
||||||
#-o milter_macro_daemon_name=ORIGINATING
|
#-o milter_macro_daemon_name=ORIGINATING
|
||||||
EOF
|
EOF
|
||||||
if ! $smtps_present ; then
|
if ! $smtps_present ; then
|
||||||
@@ -5059,13 +5086,9 @@ localhost:10025 inet n - y - - smtpd
|
|||||||
-o mynetworks=127.0.0.0/8,[::1]/128
|
-o mynetworks=127.0.0.0/8,[::1]/128
|
||||||
-o receive_override_options=no_unknown_recipient_checks
|
-o receive_override_options=no_unknown_recipient_checks
|
||||||
EOF
|
EOF
|
||||||
if [[ -n "$(which opendkim)" && -n "$(which opendmarc)" ]] ; then
|
if [[ -n "$(which opendmarc)" ]] ; then
|
||||||
cat >> $postfix_master_cf << EOF
|
cat >> $postfix_master_cf << EOF
|
||||||
-o smtpd_milters=local:/opendkim/opendkim.sock,local:/opendmarc/opendmarc.sock
|
-o smtpd_milters=local:/opendmarc/opendmarc.sock
|
||||||
EOF
|
|
||||||
elif [[ -n "$(which opendkim)" ]] ; then
|
|
||||||
cat >> $postfix_master_cf << EOF
|
|
||||||
-o smtpd_milters=local:/opendkim/opendkim.sock
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
cat >> $postfix_master_cf << EOF
|
cat >> $postfix_master_cf << EOF
|
||||||
@@ -5096,6 +5119,13 @@ smtps inet n - y - - smtpd
|
|||||||
-o smtpd_tls_wrappermode=yes
|
-o smtpd_tls_wrappermode=yes
|
||||||
-o smtpd_sasl_auth_enable=yes
|
-o smtpd_sasl_auth_enable=yes
|
||||||
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
||||||
|
EOF
|
||||||
|
if [[ -n "$(which opendkim)" ]] ; then
|
||||||
|
cat >> $postfix_master_cf << EOF
|
||||||
|
-o smtpd_milters=local:/opendkim/opendkim.sock
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
cat >> $postfix_master_cf << EOF
|
||||||
#-o milter_macro_daemon_name=ORIGINATING
|
#-o milter_macro_daemon_name=ORIGINATING
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@@ -5113,13 +5143,9 @@ localhost:10025 inet n - y - - smtpd
|
|||||||
-o mynetworks=127.0.0.0/8,[::1]/128
|
-o mynetworks=127.0.0.0/8,[::1]/128
|
||||||
-o receive_override_options=no_unknown_recipient_checks
|
-o receive_override_options=no_unknown_recipient_checks
|
||||||
EOF
|
EOF
|
||||||
if [[ -n "$(which opendkim)" && -n "$(which opendmarc)" ]] ; then
|
if [[ -n "$(which opendmarc)" ]] ; then
|
||||||
cat >> $postfix_master_cf << EOF
|
cat >> $postfix_master_cf << EOF
|
||||||
-o smtpd_milters=local:/opendkim/opendkim.sock,local:/opendmarc/opendmarc.sock
|
-o smtpd_milters=local:/opendmarc/opendmarc.sock
|
||||||
EOF
|
|
||||||
elif [[ -n "$(which opendkim)" ]] ; then
|
|
||||||
cat >> $postfix_master_cf << EOF
|
|
||||||
-o smtpd_milters=local:/opendkim/opendkim.sock
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
cat >> $postfix_master_cf << EOF
|
cat >> $postfix_master_cf << EOF
|
||||||
@@ -5156,13 +5182,9 @@ localhost:10025 inet n - y - - smtpd
|
|||||||
-o mynetworks=127.0.0.0/8,[::1]/128
|
-o mynetworks=127.0.0.0/8,[::1]/128
|
||||||
-o receive_override_options=no_unknown_recipient_checks
|
-o receive_override_options=no_unknown_recipient_checks
|
||||||
EOF
|
EOF
|
||||||
if [[ -n "$(which opendkim)" && -n "$(which opendmarc)" ]] ; then
|
if [[ -n "$(which opendmarc)" ]] ; then
|
||||||
cat >> $postfix_master_cf << EOF
|
cat >> $postfix_master_cf << EOF
|
||||||
-o smtpd_milters=local:/opendkim/opendkim.sock,local:/opendmarc/opendmarc.sock
|
-o smtpd_milters=local:/opendmarc/opendmarc.sock
|
||||||
EOF
|
|
||||||
elif [[ -n "$(which opendkim)" ]] ; then
|
|
||||||
cat >> $postfix_master_cf << EOF
|
|
||||||
-o smtpd_milters=local:/opendkim/opendkim.sock
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
cat >> $postfix_master_cf << EOF
|
cat >> $postfix_master_cf << EOF
|
||||||
|
|||||||
@@ -94,9 +94,11 @@ echo_skipped() {
|
|||||||
|
|
||||||
# - Is 'systemd' supported on this system
|
# - Is 'systemd' supported on this system
|
||||||
# -
|
# -
|
||||||
if [ "X`which systemd`" = "X" ]; then
|
SYSTEMD_EXISTS=false
|
||||||
SYSTEMD_EXISTS=false
|
systemd=$(which systemd)
|
||||||
else
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
|
||||||
SYSTEMD_EXISTS=true
|
SYSTEMD_EXISTS=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -116,9 +116,11 @@ echo_skipped() {
|
|||||||
|
|
||||||
# - Is 'systemd' supported on this system
|
# - Is 'systemd' supported on this system
|
||||||
# -
|
# -
|
||||||
if [ "X`which systemd`" = "X" ]; then
|
SYSTEMD_EXISTS=false
|
||||||
SYSTEMD_EXISTS=false
|
systemd=$(which systemd)
|
||||||
else
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
|
||||||
SYSTEMD_EXISTS=true
|
SYSTEMD_EXISTS=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -136,9 +136,11 @@ DEFAULT_INSTALL_DMARC_REPORT_SUPPORT=false
|
|||||||
|
|
||||||
# - Is this a systemd system?
|
# - Is this a systemd system?
|
||||||
# -
|
# -
|
||||||
if [[ "X`which systemd`" = "X" ]]; then
|
systemd_exists=false
|
||||||
systemd_exists=false
|
systemd=$(which systemd)
|
||||||
else
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
|
||||||
systemd_exists=true
|
systemd_exists=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -136,9 +136,11 @@ DEFAULT_REWRITE_SENDER_DOMAIN=None
|
|||||||
|
|
||||||
# - Is this a systemd system?
|
# - Is this a systemd system?
|
||||||
# -
|
# -
|
||||||
if [[ "X`which systemd`" = "X" ]]; then
|
systemd_exists=false
|
||||||
systemd_exists=false
|
systemd=$(which systemd)
|
||||||
else
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
|
||||||
systemd_exists=true
|
systemd_exists=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,14 @@ echo_skipped() {
|
|||||||
echo -e "\033[80G[ \033[33m\033[1mskipped\033[m ]"
|
echo -e "\033[80G[ \033[33m\033[1mskipped\033[m ]"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
systemd_exists=false
|
||||||
|
systemd=$(which systemd)
|
||||||
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
|
||||||
|
systemd_exists=true
|
||||||
|
fi
|
||||||
|
|
||||||
## - Install Postfix Firewall Daemon from debian packages system
|
## - Install Postfix Firewall Daemon from debian packages system
|
||||||
## -
|
## -
|
||||||
echononl " Install Postfix Firewall Daemon from debian packages system"
|
echononl " Install Postfix Firewall Daemon from debian packages system"
|
||||||
|
|||||||
@@ -964,9 +964,11 @@ delete_variable_with_comments() {
|
|||||||
|
|
||||||
# - Support systemd ?
|
# - Support systemd ?
|
||||||
# -
|
# -
|
||||||
if [[ "X$(which systemd)" = "X" ]]; then
|
SYSTEMD_EXISTS=false
|
||||||
SYSTEMD_EXISTS=false
|
systemd=$(which systemd)
|
||||||
else
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
|
||||||
SYSTEMD_EXISTS=true
|
SYSTEMD_EXISTS=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1024,6 +1026,13 @@ if [[ "$database" != "postgres" ]] && [[ "$database" != "mysql" ]] ; then
|
|||||||
fi
|
fi
|
||||||
[[ -n "$dbpassword" ]] || fatal "Parameter "dbpassword" not set."
|
[[ -n "$dbpassword" ]] || fatal "Parameter "dbpassword" not set."
|
||||||
|
|
||||||
|
lang="${msg_language,,}"
|
||||||
|
if [[ "$lang" =~ ^(en|us|en_us)$ ]]; then
|
||||||
|
msg_language="en"
|
||||||
|
else
|
||||||
|
msg_language="de"
|
||||||
|
fi
|
||||||
|
|
||||||
[[ -n "$from_address" ]] || fatal ""Parameter "from_address" not set.""
|
[[ -n "$from_address" ]] || fatal ""Parameter "from_address" not set.""
|
||||||
[[ -n "$reply_to" ]] || fatal ""Parameter "reply_to" not set.""
|
[[ -n "$reply_to" ]] || fatal ""Parameter "reply_to" not set.""
|
||||||
[[ -n "$webmailer" ]] || fatal ""Parameter "webmailer" not set.""
|
[[ -n "$webmailer" ]] || fatal ""Parameter "webmailer" not set.""
|
||||||
@@ -2790,11 +2799,12 @@ fi
|
|||||||
## - Compile dovecot
|
## - Compile dovecot
|
||||||
## -
|
## -
|
||||||
echononl " Compile Dovecot Sources.."
|
echononl " Compile Dovecot Sources.."
|
||||||
make > ${_log_dir}/dovecot-${_version}-make.log 2>&1 || clean_up 1
|
make > ${_log_dir}/dovecot-${_version}-make.log 2>&1
|
||||||
if [ "$?" = 0 ]; then
|
if [ "$?" = 0 ]; then
|
||||||
echo -e "$rc_done"
|
echo -e "$rc_done"
|
||||||
else
|
else
|
||||||
echo -e "$rc_failed"
|
echo -e "$rc_failed"
|
||||||
|
echo -e "\n See file \033[1m${_log_dir}/dovecot-${_version}-make.log\033[m for more details."
|
||||||
fatal Compiling dovecot failed
|
fatal Compiling dovecot failed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -7586,6 +7596,7 @@ if [[ $dovecot_major_version -gt 2 ]] \
|
|||||||
read -r -d '' NEW_BLOCK <<EOF
|
read -r -d '' NEW_BLOCK <<EOF
|
||||||
|
|
||||||
sieve_script personal {
|
sieve_script personal {
|
||||||
|
type = personal # kann man schreiben, ist aber Default
|
||||||
driver = file
|
driver = file
|
||||||
path = ~/sieve
|
path = ~/sieve
|
||||||
active_path = ~/.dovecot.sieve
|
active_path = ~/.dovecot.sieve
|
||||||
@@ -7603,6 +7614,8 @@ EOF
|
|||||||
# personal
|
# personal
|
||||||
# --------
|
# --------
|
||||||
#
|
#
|
||||||
|
# ** Used by both the Sieve plugin and the ManageSieve protocol **
|
||||||
|
#
|
||||||
# The personal storage serves as the user's main personal storage. Although more than a single
|
# The personal storage serves as the user's main personal storage. Although more than a single
|
||||||
# personal storage can be defined, only the first one listed in the configuration is used.
|
# personal storage can be defined, only the first one listed in the configuration is used.
|
||||||
#
|
#
|
||||||
@@ -7625,6 +7638,7 @@ EOF
|
|||||||
# no default script is executed.
|
# no default script is executed.
|
||||||
|
|
||||||
sieve_script personal {
|
sieve_script personal {
|
||||||
|
type = personal # kann man schreiben, ist aber Default
|
||||||
driver = file
|
driver = file
|
||||||
path = ~/sieve
|
path = ~/sieve
|
||||||
active_path = ~/.dovecot.sieve
|
active_path = ~/.dovecot.sieve
|
||||||
@@ -7637,16 +7651,17 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if grep -qE "^\s*sieve_script\s+before\s*{" "${_conf_file}"; then
|
if grep -qE "^\s*sieve_script\s+before_spam\s*{" "${_conf_file}"; then
|
||||||
|
|
||||||
read -r -d '' NEW_BLOCK <<EOF
|
read -r -d '' NEW_BLOCK <<EOF
|
||||||
|
|
||||||
sieve_script before {
|
sieve_script before_spam {
|
||||||
|
type = before
|
||||||
driver = file
|
driver = file
|
||||||
path = /usr/local/dovecot/etc/dovecot/sieve/
|
path = /usr/local/dovecot/etc/dovecot/sieve/
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
replace_or_append_code_block "sieve_script before" "${NEW_BLOCK}" "${_conf_file}" >> "${log_file}" 2>&1
|
replace_or_append_code_block "sieve_script before_spam" "${NEW_BLOCK}" "${_conf_file}" >> "${log_file}" 2>&1
|
||||||
if [[ $? -gt 0 ]]; then
|
if [[ $? -gt 0 ]]; then
|
||||||
_failed=true
|
_failed=true
|
||||||
fi
|
fi
|
||||||
@@ -7675,7 +7690,8 @@ EOF
|
|||||||
# A before storage behaves identical to an after storage, except the contained script or
|
# A before storage behaves identical to an after storage, except the contained script or
|
||||||
# scripts are run before user's personal script (instead of after).
|
# scripts are run before user's personal script (instead of after).
|
||||||
|
|
||||||
sieve_script before {
|
sieve_script before_spam {
|
||||||
|
type = before
|
||||||
driver = file
|
driver = file
|
||||||
path = /usr/local/dovecot/etc/dovecot/sieve/
|
path = /usr/local/dovecot/etc/dovecot/sieve/
|
||||||
}
|
}
|
||||||
@@ -7687,16 +7703,17 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if grep -qE "^\s*sieve_script\s+global\s*{" "${_conf_file}"; then
|
if grep -qE "^\s*sieve_script\s+global_includes\s*{" "${_conf_file}"; then
|
||||||
|
|
||||||
read -r -d '' NEW_BLOCK <<EOF
|
read -r -d '' NEW_BLOCK <<EOF
|
||||||
|
|
||||||
sieve_script global {
|
sieve_script global_includes {
|
||||||
|
type = global
|
||||||
driver = file
|
driver = file
|
||||||
path = /usr/local/dovecot/etc/dovecot/sieve/global/
|
path = /usr/local/dovecot/etc/dovecot/sieve/global/
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
replace_or_append_code_block "sieve_script global" "${NEW_BLOCK}" "${_conf_file}" >> "${log_file}" 2>&1
|
replace_or_append_code_block "sieve_script global_includes" "${NEW_BLOCK}" "${_conf_file}" >> "${log_file}" 2>&1
|
||||||
if [[ $? -gt 0 ]]; then
|
if [[ $? -gt 0 ]]; then
|
||||||
_failed=true
|
_failed=true
|
||||||
fi
|
fi
|
||||||
@@ -7745,7 +7762,8 @@ EOF
|
|||||||
# storages are defined in the configuration until the script is found. The order can be
|
# storages are defined in the configuration until the script is found. The order can be
|
||||||
# overridden by the sieve_script_precedence setting.
|
# overridden by the sieve_script_precedence setting.
|
||||||
|
|
||||||
sieve_script global {
|
sieve_script global_includes {
|
||||||
|
type = global
|
||||||
driver = file
|
driver = file
|
||||||
path = /usr/local/dovecot/etc/dovecot/sieve/global/
|
path = /usr/local/dovecot/etc/dovecot/sieve/global/
|
||||||
}
|
}
|
||||||
@@ -9901,6 +9919,46 @@ if [[ $dovecot_major_version -gt 2 ]] \
|
|||||||
echononl " Create quota warning script.."
|
echononl " Create quota warning script.."
|
||||||
## - create the user-warning script
|
## - create the user-warning script
|
||||||
## -
|
## -
|
||||||
|
if [[ "${msg_language}" == "en" ]] ; then
|
||||||
|
cat <<EOF >/usr/local/bin/quota-warning.sh
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# author: zhang huangbin <michaelbibby (at) gmail.com>
|
||||||
|
# purpose: send mail to notify user when his mailbox quota exceeds a
|
||||||
|
# specified limit.
|
||||||
|
# project: iredmail (http://www.iredmail.org/)
|
||||||
|
|
||||||
|
LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
percent=\$1
|
||||||
|
user=\$2
|
||||||
|
|
||||||
|
cat << EOF | /usr/local/dovecot/libexec/dovecot/dovecot-lda -d \${user} -o quota_enforce=no
|
||||||
|
Date: `date +"%a, %e %b %Y %H:%M:%S %z"`
|
||||||
|
From: $from_address
|
||||||
|
Reply-to: $reply_to
|
||||||
|
To:\${user}
|
||||||
|
Subject: Quota warning - mailbox is ${percent}% full
|
||||||
|
content-type: text/plain;
|
||||||
|
charset=utf-8
|
||||||
|
|
||||||
|
Hello!
|
||||||
|
|
||||||
|
Your email inbox
|
||||||
|
\${user}
|
||||||
|
is over \${percent}% full. To continue receiving emails, please delete emails from your inbox on the server.
|
||||||
|
|
||||||
|
You can also use the webmail service:
|
||||||
|
$webmailer
|
||||||
|
|
||||||
|
After deleting emails, please remember to empty the trash folder as well.
|
||||||
|
|
||||||
|
Best regards
|
||||||
|
|
||||||
|
$salutation
|
||||||
|
${_EOF:-EOF}
|
||||||
|
EOF
|
||||||
|
else
|
||||||
cat <<EOF >/usr/local/bin/quota-warning.sh
|
cat <<EOF >/usr/local/bin/quota-warning.sh
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
@@ -9940,6 +9998,7 @@ Viele Grüße
|
|||||||
$salutation
|
$salutation
|
||||||
${_EOF:-EOF}
|
${_EOF:-EOF}
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
if [ "$?" = 0 ]; then
|
if [ "$?" = 0 ]; then
|
||||||
echo -e "$rc_done"
|
echo -e "$rc_done"
|
||||||
else
|
else
|
||||||
@@ -9952,6 +10011,32 @@ EOF
|
|||||||
echononl " Create quota warn-under script.."
|
echononl " Create quota warn-under script.."
|
||||||
## - create the user-warning script
|
## - create the user-warning script
|
||||||
## -
|
## -
|
||||||
|
if [[ "${msg_language}" == "en" ]] ; then
|
||||||
|
cat <<EOF >/usr/local/bin/quota-warn-under.sh
|
||||||
|
cat << EOF | /usr/local/dovecot/libexec/dovecot/dovecot-lda -d \${user} -o quota_enforce=no
|
||||||
|
Date: \`date +"%a, %e %b %Y %H:%M:%S %z"\`
|
||||||
|
From: $from_address
|
||||||
|
Reply-to: $reply_to
|
||||||
|
To:\${user}
|
||||||
|
Subject: Mailbox quota: less than ${percent}% used
|
||||||
|
content-type: text/plain;
|
||||||
|
charset=utf-8
|
||||||
|
|
||||||
|
Your mailbox
|
||||||
|
\${user}
|
||||||
|
can now receive e-mail again.
|
||||||
|
|
||||||
|
Please note that, depending on how much space you have freed, your available storage may fill up again quickly.
|
||||||
|
|
||||||
|
You can check the current usage in your mail client or via the webmailer here:
|
||||||
|
$webmailer
|
||||||
|
|
||||||
|
Best regards
|
||||||
|
|
||||||
|
$salutation
|
||||||
|
${_EOF:-EOF}
|
||||||
|
EOF
|
||||||
|
else
|
||||||
cat <<EOF >/usr/local/bin/quota-warn-under.sh
|
cat <<EOF >/usr/local/bin/quota-warn-under.sh
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
@@ -9984,6 +10069,7 @@ Viele Grüße
|
|||||||
$salutation
|
$salutation
|
||||||
${_EOF:-EOF}
|
${_EOF:-EOF}
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
if [ "$?" = 0 ]; then
|
if [ "$?" = 0 ]; then
|
||||||
echo -e "$rc_done"
|
echo -e "$rc_done"
|
||||||
else
|
else
|
||||||
@@ -10870,24 +10956,27 @@ EOF
|
|||||||
replace_or_append_code_block "protocol sieve" "${NEW_BLOCK}" "${_conf_file}" || _failed=true
|
replace_or_append_code_block "protocol sieve" "${NEW_BLOCK}" "${_conf_file}" || _failed=true
|
||||||
|
|
||||||
|
|
||||||
read -r -d '' NEW_BLOCK <<'EOF'
|
# read -r -d '' NEW_BLOCK <<'EOF'
|
||||||
sieve_script personal {
|
#sieve_script personal {
|
||||||
path = ~/sieve
|
# type = personal # kann man schreiben, ist aber Default
|
||||||
active_path = ~/.dovecot.sieve
|
# type = personal
|
||||||
}
|
# driver = file
|
||||||
EOF
|
# path = ~/sieve
|
||||||
if grep -qE "^\s*sieve_script\s+personal\s+{" "${_conf_file}"; then
|
# active_path = ~/.dovecot.sieve
|
||||||
|
#}
|
||||||
replace_code_block "sieve_script personal" "${NEW_BLOCK}" "${_conf_file}" || _failed=true
|
#EOF
|
||||||
|
# if grep -qE "^\s*sieve_script\s+personal\s+{" "${_conf_file}"; then
|
||||||
else
|
#
|
||||||
|
# replace_code_block "sieve_script personal" "${NEW_BLOCK}" "${_conf_file}" || _failed=true
|
||||||
cat <<EOF >> "${_conf_file}" || _failed=true
|
#
|
||||||
|
# else
|
||||||
# Used by both the Sieve plugin and the ManageSieve protocol
|
#
|
||||||
${NEW_BLOCK}
|
# cat <<EOF >> "${_conf_file}" || _failed=true
|
||||||
EOF
|
#
|
||||||
fi
|
## Used by both the Sieve plugin and the ManageSieve protocol
|
||||||
|
#${NEW_BLOCK}
|
||||||
|
#EOF
|
||||||
|
# fi
|
||||||
|
|
||||||
|
|
||||||
if ! $_failed ; then
|
if ! $_failed ; then
|
||||||
|
|||||||
@@ -148,9 +148,11 @@ detect_os_1 () {
|
|||||||
|
|
||||||
# - Support systemd ?
|
# - Support systemd ?
|
||||||
# -
|
# -
|
||||||
if [[ "X$(which systemd)" = "X" ]]; then
|
SYSTEMD_EXISTS=false
|
||||||
SYSTEMD_EXISTS=false
|
systemd=$(which systemd)
|
||||||
else
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
|
||||||
SYSTEMD_EXISTS=true
|
SYSTEMD_EXISTS=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -95,6 +95,16 @@ echo_skipped() {
|
|||||||
echo -e "\033[75G[ \033[30m\033[1mskipped\033[m ]"
|
echo -e "\033[75G[ \033[30m\033[1mskipped\033[m ]"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# -Is systemd supported on this system?
|
||||||
|
# -
|
||||||
|
systemd_supported=false
|
||||||
|
systemd=$(which systemd)
|
||||||
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
|
||||||
|
systemd_supported=true
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ "$POSTFIX_DB_TYPE" = "postgres" -o "$POSTFIX_DB_TYPE" = "postgresql" -o "$POSTFIX_DB_TYPE" = "pgsql" -o "$POSTFIX_DB_TYPE" = "psql" ];then
|
if [ "$POSTFIX_DB_TYPE" = "postgres" -o "$POSTFIX_DB_TYPE" = "postgresql" -o "$POSTFIX_DB_TYPE" = "pgsql" -o "$POSTFIX_DB_TYPE" = "psql" ];then
|
||||||
POSTFIX_DB_TYPE=pgsql
|
POSTFIX_DB_TYPE=pgsql
|
||||||
|
|||||||
@@ -182,9 +182,11 @@ fi
|
|||||||
|
|
||||||
# - Is this a systemd system?
|
# - Is this a systemd system?
|
||||||
# -
|
# -
|
||||||
if [[ "X`which systemd`" = "X" ]]; then
|
systemd_exists=false
|
||||||
systemd_exists=false
|
systemd=$(which systemd)
|
||||||
else
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
|
||||||
systemd_exists=true
|
systemd_exists=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -126,9 +126,11 @@ DEFAULT_SASL_AUTH=false
|
|||||||
|
|
||||||
# - Is this a systemd system?
|
# - Is this a systemd system?
|
||||||
# -
|
# -
|
||||||
if [[ "X`which systemd`" = "X" ]]; then
|
systemd_exists=false
|
||||||
systemd_exists=false
|
systemd=$(which systemd)
|
||||||
else
|
systemctl=$(which systemctl)
|
||||||
|
|
||||||
|
if [[ -n "$systemd" ]] || [[ -n "$systemctl" ]] ; then
|
||||||
systemd_exists=true
|
systemd_exists=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user