DOVECOT_SIEVE_FILE_BASE=".dovecot.sieve"
declare -a MAIL_DNS=()
+declare -A ENSURED_DIRS=()
#-------------------------------------------------------------------
detect_color() {
ensure_vmail_dir() {
local vdir="$1"
+
+ if [[ -v ENSURED_DIRS[${vdir}] ]] ; then
+ debug "Directory '${CYAN}${vdir}${NORMAL}' already handled."
+ return
+ fi
+
if [[ ! -d "${vdir}" ]] ; then
MKDIR "${vdir}"
fi
CHMOD 0700 "${vdir}"
CHOWN "${VMAIL_USER}:${VMAIL_GROUP}" "${vdir}"
+ ENSURED_DIRS[${vdir}]="y"
}