Merge branch 'master' of https://git.oopen.de/install/mailsystem
This commit is contained in:
@@ -2639,6 +2639,58 @@ if $_new ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Dovecot's configure script queries pkg-config for "systemd" and expects
|
||||||
|
# the variable "systemdsystemunitdir" to be defined.
|
||||||
|
# On minimal Debian(13)-based systems, only libsystemd.pc is provided and
|
||||||
|
# no systemd.pc (and often no systemd binary) exists.
|
||||||
|
# This pkg-config wrapper provides the missing metadata so configure
|
||||||
|
# can auto-detect the correct systemd unit installation directory.
|
||||||
|
#
|
||||||
|
if [[ "${os_dist,,}" = "debian" ]] && [[ "$os_version" -ge 13 ]] ; then
|
||||||
|
echononl " Create '/usr/lib/x86_64-linux-gnu/pkgconfig/systemd.pc'."
|
||||||
|
if [[ ! -f "/usr/lib/x86_64-linux-gnu/pkgconfig/systemd.pc" ]] ; then
|
||||||
|
cat <<'EOF' > /usr/lib/x86_64-linux-gnu/pkgconfig/systemd.pc 2>>${_log_dir}/debian-install.log
|
||||||
|
prefix=/usr
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=/usr/lib/x86_64-linux-gnu
|
||||||
|
includedir=/usr/include
|
||||||
|
|
||||||
|
# Some build systems (incl. Dovecot's configure) query this to decide where
|
||||||
|
# to install systemd service/unit files:
|
||||||
|
systemdsystemunitdir=/usr/lib/systemd/system
|
||||||
|
|
||||||
|
Name: systemd
|
||||||
|
Description: systemd (pkg-config compatibility wrapper)
|
||||||
|
Version: 0
|
||||||
|
Requires: libsystemd
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [[ $? -gt 0 ]] ; then
|
||||||
|
echo -e "$rc_failed"
|
||||||
|
error "$(cat $log_file)"
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo " command was:"
|
||||||
|
echo " ln -s libsystemd.pc /usr/lib/x86_64-linux-gnu/pkgconfig/systemd.pc"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
echononl " continue anyway [yes/no]: "
|
||||||
|
read OK
|
||||||
|
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
|
||||||
|
echononl "Wrong entry! - repeat [yes/no]: "
|
||||||
|
read OK
|
||||||
|
done
|
||||||
|
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
|
||||||
|
else
|
||||||
|
echo -e "$rc_done"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -e "$rc_skipped"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
## -----------------
|
## -----------------
|
||||||
## - Create Users/groups needed for dovecot
|
## - Create Users/groups needed for dovecot
|
||||||
|
|
||||||
@@ -2778,6 +2830,11 @@ if $systemd_support ; then
|
|||||||
fi
|
fi
|
||||||
#--with-systemdsystemunitdir=/etc/systemd/system/"
|
#--with-systemdsystemunitdir=/etc/systemd/system/"
|
||||||
|
|
||||||
|
#if [[ "${os_dist,,}" = "debian" ]] && [[ "$os_version" -ge 13 ]] ; then
|
||||||
|
# config_params="$config_params systemdsystemunitdir=/lib/systemd/system"
|
||||||
|
#fi
|
||||||
|
|
||||||
|
|
||||||
echononl " Configure Dovecot.."
|
echononl " Configure Dovecot.."
|
||||||
#./configure \
|
#./configure \
|
||||||
# --prefix=/usr/local/dovecot-${_version} \
|
# --prefix=/usr/local/dovecot-${_version} \
|
||||||
@@ -3151,12 +3208,12 @@ EOF
|
|||||||
echononl " Create empty file '$(basename "${_conf_file}")'.."
|
echononl " Create empty file '$(basename "${_conf_file}")'.."
|
||||||
if [[ ! -f "${_conf_file}" ]] ; then
|
if [[ ! -f "${_conf_file}" ]] ; then
|
||||||
_failed=false
|
_failed=false
|
||||||
cat <<'EOF' > "${_conf_file}" 2> "${log_file}"
|
cat <<EOF > "${_conf_file}" 2> "${log_file}"
|
||||||
##
|
##
|
||||||
## Settings for the Sieve interpreter
|
## Settings for the Sieve interpreter
|
||||||
##
|
##
|
||||||
|
|
||||||
# see also: https://doc.dovecot.org/2.4.1/core/plugins/sieve.html
|
# see also: https://doc.dovecot.org/${_version}/core/plugins/sieve.html
|
||||||
|
|
||||||
# To use Sieve, you will first need to make sure you are using Dovecot LDA or LMTP Server
|
# To use Sieve, you will first need to make sure you are using Dovecot LDA or LMTP Server
|
||||||
# for delivering incoming mail to users' mailboxes.
|
# for delivering incoming mail to users' mailboxes.
|
||||||
@@ -3221,12 +3278,12 @@ EOF
|
|||||||
echononl " Create empty file '$(basename "${_conf_file}")'.."
|
echononl " Create empty file '$(basename "${_conf_file}")'.."
|
||||||
if [[ ! -f "${_conf_file}" ]] ; then
|
if [[ ! -f "${_conf_file}" ]] ; then
|
||||||
_failed=false
|
_failed=false
|
||||||
cat <<'EOF' > "${_conf_file}" 2> "${log_file}"
|
cat <<EOF > "${_conf_file}" 2> "${log_file}"
|
||||||
##
|
##
|
||||||
## Settings for the Sieve Vacation Extension
|
## Settings for the Sieve Vacation Extension
|
||||||
##
|
##
|
||||||
|
|
||||||
# see also: https://doc.dovecot.org/2.4.1/core/config/sieve/extensions/vacation.html
|
# see also: https://doc.dovecot.org/${_version}/core/config/sieve/extensions/vacation.html
|
||||||
|
|
||||||
# The Sieve vacation extension (RFC 5230) defines a mechanism to generate automatic
|
# The Sieve vacation extension (RFC 5230) defines a mechanism to generate automatic
|
||||||
# replies to incoming email messages. It takes various precautions to make sure replies
|
# replies to incoming email messages. It takes various precautions to make sure replies
|
||||||
@@ -6291,7 +6348,7 @@ EOF
|
|||||||
# same as IMAP's LOGIN command. The LOGIN command is internally handled using PLAIN
|
# same as IMAP's LOGIN command. The LOGIN command is internally handled using PLAIN
|
||||||
# mechanism.
|
# mechanism.
|
||||||
#
|
#
|
||||||
# see https://doc.dovecot.org/2.4.1/core/config/auth/mechanisms/overview.html for
|
# see https://doc.dovecot.org/${_version}/core/config/auth/mechanisms/overview.html for
|
||||||
# further (non-rcCleartext) Authentication.
|
# further (non-rcCleartext) Authentication.
|
||||||
auth_mechanisms = ${auth_mechanisms}
|
auth_mechanisms = ${auth_mechanisms}
|
||||||
EOF
|
EOF
|
||||||
@@ -6417,11 +6474,11 @@ if [[ $dovecot_major_version -gt 2 ]] \
|
|||||||
|
|
||||||
if [[ "$db_driver" = "pgsql" ]]; then
|
if [[ "$db_driver" = "pgsql" ]]; then
|
||||||
|
|
||||||
read -r -d '' NEW_BLOCK <<'EOF'
|
read -r -d '' NEW_BLOCK <<EOF
|
||||||
passdb sql {
|
passdb sql {
|
||||||
|
|
||||||
# Load SQL connection data
|
# Load SQL connection data
|
||||||
!include /usr/local/dovecot-2.4.1-4/etc/dovecot/sql-connect.conf.ext
|
!include /usr/local/dovecot-${_version}/etc/dovecot/sql-connect.conf.ext
|
||||||
|
|
||||||
query = SELECT username AS user, password \\
|
query = SELECT username AS user, password \\
|
||||||
FROM mailbox \\
|
FROM mailbox \\
|
||||||
@@ -6449,18 +6506,18 @@ EOF
|
|||||||
# LMTP mail delivery YES YES
|
# LMTP mail delivery YES YES
|
||||||
# doveadm commands YES YES
|
# doveadm commands YES YES
|
||||||
#
|
#
|
||||||
# see also: https://doc.dovecot.org/2.4.1/core/config/auth/passdb.html
|
# see also: https://doc.dovecot.org/${_version}/core/config/auth/passdb.html
|
||||||
#
|
#
|
||||||
$(echo -e "${NEW_BLOCK}")
|
$(echo -e "${NEW_BLOCK}")
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
read -r -d '' NEW_BLOCK <<'EOF'
|
read -r -d '' NEW_BLOCK <<EOF
|
||||||
userdb sql {
|
userdb sql {
|
||||||
|
|
||||||
# Load SQL connection data
|
# Load SQL connection data
|
||||||
!include /usr/local/dovecot-2.4.1-4/etc/dovecot/sql-connect.conf.ext
|
!include /usr/local/dovecot-${_version}/etc/dovecot/sql-connect.conf.ext
|
||||||
|
|
||||||
query = SELECT '/var/vmail/' || maildir AS home, \\
|
query = SELECT '/var/vmail/' || maildir AS home, \\
|
||||||
'5000' AS uid, '5000' AS gid \\
|
'5000' AS uid, '5000' AS gid \\
|
||||||
@@ -6497,7 +6554,7 @@ EOF
|
|||||||
# The userdb and passdb may be the same or they may be different depending on your needs.
|
# The userdb and passdb may be the same or they may be different depending on your needs.
|
||||||
# You can also have multiple authentication databases.
|
# You can also have multiple authentication databases.
|
||||||
#
|
#
|
||||||
# see: https://doc.dovecot.org/2.4.1/core/config/auth/userdb.html
|
# see: https://doc.dovecot.org/${_version}/core/config/auth/userdb.html
|
||||||
#
|
#
|
||||||
$(echo -e "${NEW_BLOCK}")
|
$(echo -e "${NEW_BLOCK}")
|
||||||
EOF
|
EOF
|
||||||
@@ -6509,7 +6566,7 @@ EOF
|
|||||||
passdb sql {
|
passdb sql {
|
||||||
|
|
||||||
# Load SQL connection data
|
# Load SQL connection data
|
||||||
!include /usr/local/dovecot-2.4.1-4/etc/dovecot/sql-connect.conf.ext
|
!include /usr/local/dovecot-${_version}/etc/dovecot/sql-connect.conf.ext
|
||||||
|
|
||||||
query = SELECT username AS user, password \\
|
query = SELECT username AS user, password \\
|
||||||
FROM mailbox \\
|
FROM mailbox \\
|
||||||
@@ -6537,17 +6594,17 @@ EOF
|
|||||||
# LMTP mail delivery YES YES
|
# LMTP mail delivery YES YES
|
||||||
# doveadm commands YES YES
|
# doveadm commands YES YES
|
||||||
#
|
#
|
||||||
# see also: https://doc.dovecot.org/2.4.1/core/config/auth/passdb.html
|
# see also: https://doc.dovecot.org/${_version}/core/config/auth/passdb.html
|
||||||
#
|
#
|
||||||
$(echo -e "${NEW_BLOCK}")
|
$(echo -e "${NEW_BLOCK}")
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
read -r -d '' NEW_BLOCK <<'EOF'
|
read -r -d '' NEW_BLOCK <<EOF
|
||||||
userdb sql {
|
userdb sql {
|
||||||
|
|
||||||
# Load SQL connection data
|
# Load SQL connection data
|
||||||
!include /usr/local/dovecot-2.4.1-4/etc/dovecot/sql-connect.conf.ext
|
!include /usr/local/dovecot-${_version}/etc/dovecot/sql-connect.conf.ext
|
||||||
|
|
||||||
query = SELECT CONCAT('/var/vmail/',maildir) AS home, \\
|
query = SELECT CONCAT('/var/vmail/',maildir) AS home, \\
|
||||||
'5000' AS uid, '5000' AS gid \\
|
'5000' AS uid, '5000' AS gid \\
|
||||||
@@ -6584,7 +6641,7 @@ EOF
|
|||||||
# The userdb and passdb may be the same or they may be different depending on your needs.
|
# The userdb and passdb may be the same or they may be different depending on your needs.
|
||||||
# You can also have multiple authentication databases.
|
# You can also have multiple authentication databases.
|
||||||
#
|
#
|
||||||
# see: https://doc.dovecot.org/2.4.1/core/config/auth/userdb.html
|
# see: https://doc.dovecot.org/${_version}/core/config/auth/userdb.html
|
||||||
#
|
#
|
||||||
$(echo -e "${NEW_BLOCK}")
|
$(echo -e "${NEW_BLOCK}")
|
||||||
EOF
|
EOF
|
||||||
@@ -7081,7 +7138,7 @@ if [[ $dovecot_major_version -gt 2 ]] \
|
|||||||
#
|
#
|
||||||
# As used here, %{user | domain} expands to the domain of the local user. Other Mail user
|
# As used here, %{user | domain} expands to the domain of the local user. Other Mail user
|
||||||
# variables can be used as well.
|
# variables can be used as well.
|
||||||
# see: https://doc.dovecot.org/2.4.1/core/settings/variables.html#mail-user-variables
|
# see: https://doc.dovecot.org/${_version}/core/settings/variables.html#mail-user-variables
|
||||||
postmaster_address = ${postmaster_address}
|
postmaster_address = ${postmaster_address}
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
@@ -7231,7 +7288,7 @@ protocol lmtp {
|
|||||||
#
|
#
|
||||||
# As used here, %{user | domain} expands to the domain of the local user. Other Mail user
|
# As used here, %{user | domain} expands to the domain of the local user. Other Mail user
|
||||||
# variables can be used as well.
|
# variables can be used as well.
|
||||||
# see: https://doc.dovecot.org/2.4.1/core/settings/variables.html#mail-user-variables
|
# see: https://doc.dovecot.org/${_version}/core/settings/variables.html#mail-user-variables
|
||||||
postmaster_address = ${postmaster_address}
|
postmaster_address = ${postmaster_address}
|
||||||
|
|
||||||
mail_plugins {
|
mail_plugins {
|
||||||
@@ -9180,11 +9237,11 @@ if [[ $dovecot_major_version -gt 2 ]] \
|
|||||||
|
|
||||||
if [[ "$db_driver" = "pgsql" ]]; then
|
if [[ "$db_driver" = "pgsql" ]]; then
|
||||||
|
|
||||||
read -r -d '' NEW_BLOCK <<'EOF'
|
read -r -d '' NEW_BLOCK <<EOF
|
||||||
userdb sql {
|
userdb sql {
|
||||||
|
|
||||||
# Load SQL connection data
|
# Load SQL connection data
|
||||||
!include /usr/local/dovecot-2.4.1-4/etc/dovecot/sql-connect.conf.ext
|
!include /usr/local/dovecot-${_version}/etc/dovecot/sql-connect.conf.ext
|
||||||
|
|
||||||
query = SELECT '/var/vmail/' || maildir AS home, \\
|
query = SELECT '/var/vmail/' || maildir AS home, \\
|
||||||
'5000' AS uid, '5000' AS gid, \\
|
'5000' AS uid, '5000' AS gid, \\
|
||||||
@@ -9222,7 +9279,7 @@ EOF
|
|||||||
# The userdb and passdb may be the same or they may be different depending on your needs.
|
# The userdb and passdb may be the same or they may be different depending on your needs.
|
||||||
# You can also have multiple authentication databases.
|
# You can also have multiple authentication databases.
|
||||||
#
|
#
|
||||||
# see: https://doc.dovecot.org/2.4.1/core/config/auth/userdb.html
|
# see: https://doc.dovecot.org/${_version}/core/config/auth/userdb.html
|
||||||
#
|
#
|
||||||
${NEW_BLOCK}
|
${NEW_BLOCK}
|
||||||
EOF
|
EOF
|
||||||
@@ -9234,11 +9291,11 @@ EOF
|
|||||||
|
|
||||||
elif [[ "$db_driver" = "mysql" ]]; then
|
elif [[ "$db_driver" = "mysql" ]]; then
|
||||||
|
|
||||||
read -r -d '' NEW_BLOCK <<'EOF'
|
read -r -d '' NEW_BLOCK <<EOF
|
||||||
userdb sql {
|
userdb sql {
|
||||||
|
|
||||||
# Load SQL connection data
|
# Load SQL connection data
|
||||||
!include /usr/local/dovecot-2.4.1-4/etc/dovecot/sql-connect.conf.ext
|
!include /usr/local/dovecot-${_version}/etc/dovecot/sql-connect.conf.ext
|
||||||
|
|
||||||
query = SELECT CONCAT('/var/vmail/',maildir) AS home, \
|
query = SELECT CONCAT('/var/vmail/',maildir) AS home, \
|
||||||
'5000' AS uid, '5000' AS gid, \
|
'5000' AS uid, '5000' AS gid, \
|
||||||
@@ -9276,7 +9333,7 @@ EOF
|
|||||||
# The userdb and passdb may be the same or they may be different depending on your needs.
|
# The userdb and passdb may be the same or they may be different depending on your needs.
|
||||||
# You can also have multiple authentication databases.
|
# You can also have multiple authentication databases.
|
||||||
#
|
#
|
||||||
# see: https://doc.dovecot.org/2.4.1/core/config/auth/userdb.html
|
# see: https://doc.dovecot.org/${_version}/core/config/auth/userdb.html
|
||||||
#
|
#
|
||||||
$(echo -e "${NEW_BLOCK}")
|
$(echo -e "${NEW_BLOCK}")
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
Reference in New Issue
Block a user