VMAIL_GROUP='vmail'
SIEVE_FILE_BASE="Normal.sieve"
DOVECOT_SIEVE_FILE_BASE=".dovecot.sieve"
+COMPILED_SIEVE_BASE=".dovecot.svbin"
declare -a MAIL_DNS=()
declare -A ENSURED_DIRS=()
local domain_dir="${VMAIL_ROOT_DIR}/${domain}"
local mailbox_dir="${domain_dir}/${mail_address}"
local dovecot_sieve_file="${mailbox_dir}/${DOVECOT_SIEVE_FILE_BASE}"
+ local compiled_sieve="${mailbox_dir}/${COMPILED_SIEVE_BASE}"
local sieve_dir="${mailbox_dir}/sieve"
local sieve_file="${sieve_dir}/${SIEVE_FILE_BASE}"
local dovecot_link_target="sieve/${SIEVE_FILE_BASE}"
ls -l "${color_param}" "${dovecot_sieve_file}"
fi
+ info "Compiling '${CYAN}${dovecot_sieve_file}${NORMAL}' ..."
+ debug "Executing: sievec \"${dovecot_sieve_file}\""
+ if [[ "${SIMULATE}" != "y" ]] ; then
+ sievec "${dovecot_sieve_file}"
+ fi
+ CHOWN "${VMAIL_USER}:${VMAIL_GROUP}" "${compiled_sieve}"
+ CHMOD 0600 "${compiled_sieve}"
+ if [[ -e "${compiled_sieve}" && "${QUIET}" != "y" ]] ; then
+ ls -l "${color_param}" "${compiled_sieve}"
+ fi
+
}
#------------------------------------------------