diff --git a/install_update_dovecot-2.4.sh b/install_update_dovecot-2.4.sh index 862b552..b8fbc7a 100755 --- a/install_update_dovecot-2.4.sh +++ b/install_update_dovecot-2.4.sh @@ -10179,9 +10179,9 @@ if [[ $dovecot_major_version -gt 2 ]] \ read -r -d '' NEW_BLOCK <<'EOF' protocol imap { - mail_plugins { - imap_acl = yes - } + mail_plugins { + imap_acl = yes + } } EOF @@ -10234,9 +10234,9 @@ namespace shared { prefix = shared/$user/ # Mail location setting - mail_home = /var/vmail/%{user | domain}/%{user | username} mail_driver = maildir - mail_path = ~/Maildir + mail_path = %{owner_home}/Maildir + mail_index_private_path = ~/Maildir/shared/%{owner_user} # Use the default namespace for saving subscriptions. @@ -10273,6 +10273,27 @@ ${NEW_BLOCK} EOF fi + read -r -d '' NEW_BLOCK <<'EOF' +acl_sharing_map { + dict file { + path = /var/vmail/shared-mailboxes.db + } +} +EOF + + if grep -qE "^\s*acl_sharing_map\s+{" "${_conf_file}"; then + + replace_code_block "acl_sharing_map" "${NEW_BLOCK}" "${_conf_file}" || _failed=true + + else + cat <> "${_conf_file}" || _failed=true + +# A shared mailbox dictionary that defines which users may LIST mailboxes shared by other users. +${NEW_BLOCK} +EOF + + fi + if ! $_failed ; then echo -e "$rc_done"