Commits

Zhang Huangbin committed 49330e9

Use absolute path of command 'doveadm' in OpenBSD /etc/newsyslog.conf.

Comments (0)

Files changed (2)

iRedMail/conf/dovecot

 export DOVECOT_GROUP='dovecot'
 export DOVECOT_RC_SCRIPT_NAME='dovecot'
 
+export DOVECOT_BIN='/usr/sbin/dovecot'
+export DOVECOT_DOVEADM_BIN='/usr/bin/doveadm'
+export DOVECOT_SIEVEC='/usr/libexec/dovecot/sievec'
+
 # Dovecot running directory, required by dovecot-2.x.
 export DOVECOT_BASE_DIR='/var/run/dovecot'
 
     export DOVECOT_USER='_dovecot'
     export DOVECOT_GROUP='_dovecot'
     export DOVECOT_DELIVER='/usr/local/libexec/dovecot/deliver'
+    export DOVECOT_DOVEADM_BIN='/usr/local/bin/doveadm'
 
 fi
 
 export DOVECOT_AUTH_SOCKET_PATH="${DOVECOT_BASE_DIR}/auth-master"
 export DOVECOT_MASTER_PID="${DOVECOT_BASE_DIR}/master.pid"
 
-export DOVECOT_BIN='/usr/sbin/dovecot'
-export DOVECOT_SIEVEC='/usr/libexec/dovecot/sievec'
-
 # Dovecot plugin: Expire.
 # NOTE: dict process currently runs as root, so this file will be owned as root.
 export DOVECOT_EXPIRE_DICT_BDB='/var/lib/dovecot/expire/expire.db'

iRedMail/functions/dovecot2.sh

         if ! grep "${DOVECOT_LOG_FILE}" /etc/newsyslog.conf &>/dev/null; then
             # Define command used to reopen log service after rotated
             cat >> /etc/newsyslog.conf <<EOF
-${DOVECOT_LOG_FILE}    ${VMAIL_USER_NAME}:${VMAIL_GROUP_NAME}   600  7     *    24    Z "doveadm log reopen"
+${DOVECOT_LOG_FILE}    ${VMAIL_USER_NAME}:${VMAIL_GROUP_NAME}   600  7     *    24    Z "${DOVECOT_DOVEADM_BIN} log reopen"
 EOF
         fi
 
         if ! grep "${SIEVE_LOG_FILE}" /etc/newsyslog.conf &>/dev/null; then
             # Define command used to reopen log service after rotated
             cat >> /etc/newsyslog.conf <<EOF
-${SIEVE_LOG_FILE}    ${VMAIL_USER_NAME}:${VMAIL_GROUP_NAME}   600  7     *    24    Z "doveadm log reopen"
+${SIEVE_LOG_FILE}    ${VMAIL_USER_NAME}:${VMAIL_GROUP_NAME}   600  7     *    24    Z "${DOVECOT_DOVEADM_BIN} log reopen"
 EOF
         fi
     fi