Source

iredmail / iRedMail / conf / dovecot

Full commit
Zhang Huangbin 7c26194 

Zhang Huangbin 69f2f69 
Zhang Huangbin 7c26194 

























Zhang Huangbin 3755fba 


Zhang Huangbin 7c26194 


Zhang Huangbin 72ad0fa 
Zhang Huangbin 7c26194 
Zhang Huangbin 49330e9 



Zhang Huangbin 7c26194 







Zhang Huangbin 5ca47c5 
Zhang Huangbin 7c26194 
Zhang Huangbin 63fa297 

Zhang Huangbin e872cf2 
Zhang Huangbin 63fa297 
Zhang Huangbin 0eea304 

Zhang Huangbin 975af2a 



Zhang Huangbin 7c26194 


Zhang Huangbin 0eea304 
Zhang Huangbin 7c26194 


Zhang Huangbin 975af2a 
Zhang Huangbin a398667 
Zhang Huangbin 76af891 
Zhang Huangbin 7c26194 



Zhang Huangbin 58a1263 
Zhang Huangbin 7c26194 
Zhang Huangbin 0eea304 
Zhang Huangbin 7c26194 

Zhang Huangbin 12efb11 



Zhang Huangbin 49330e9 
Zhang Huangbin 12efb11 
Zhang Huangbin 7c26194 

Zhang Huangbin 0eea304 






Zhang Huangbin 06b33e3 
Zhang Huangbin 0eea304 
Zhang Huangbin 7c26194 





Zhang Huangbin f2f31b2 
Zhang Huangbin 7c26194 
Zhang Huangbin f2f31b2 

Zhang Huangbin 7c26194 






Zhang Huangbin a33942a 
Zhang Huangbin 5c80c92 
Zhang Huangbin 98f0394 
Zhang Huangbin f1e3474 
Zhang Huangbin 5c80c92 






Zhang Huangbin 7c26194 
Zhang Huangbin 12efb11 
Zhang Huangbin 7c26194 


#!/usr/bin/env bash

# Author:   Zhang Huangbin (zhb _at_ iredmail.org)

#---------------------------------------------------------------------
# This file is part of iRedMail, which is an open source mail server
# solution for Red Hat(R) Enterprise Linux, CentOS, Debian and Ubuntu.
#
# iRedMail is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# iRedMail is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with iRedMail.  If not, see <http://www.gnu.org/licenses/>.
#---------------------------------------------------------------------

# ----------------------------------------
# For Dovecot and dovecot-sieve. 
# ----------------------------------------

export ENABLE_DOVECOT="YES"
export ENABLE_DOVECOT_SSL="YES"

# Dovecot major version number
export DOVECOT_VERSION='2'

# Dovecot user & group.
export DOVECOT_USER='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'

# Enabled plugins for protocol 'lda' and 'imap'.
export DOVECOT_LDA_PLUGINS='quota sieve autocreate'
export DOVECOT_IMAP_PLUGINS='quota imap_quota autocreate'

# Default quota type: maildir, dict:user::proxy::quotadict (quotadict).
export DOVECOT_QUOTA_TYPE='dict:user::proxy::quotadict'

# Do not starts with dot (.).
export SIEVE_RULE_FILENAME='dovecot.sieve'
export DOVECOT_GLOBAL_SIEVE_FILE="${SIEVE_DIR}/${SIEVE_RULE_FILENAME}"

# Directory used to store Dovecot config files
export DOVECOT_CONF_DIR='/etc/dovecot'

# Path to Dovecot deliver agant
export DOVECOT_DELIVER='/usr/libexec/dovecot/deliver'

if [ X"${DISTRO}" == X"RHEL" ]; then
    if [ X"${DISTRO_VERSION}" == X"5" ]; then
        export DOVECOT_VERSION='1.2'
        export DOVECOT_CONF_DIR='/etc'
    fi
elif [ X"${DISTRO}" == X"SUSE" ]; then
    export DOVECOT_DELIVER='/usr/lib/dovecot/deliver'

elif [ X"${DISTRO}" == X'DEBIAN' -o X"${DISTRO}" == X'UBUNTU' ]; then
    if [ X"${DISTRO_CODENAME}" == X'squeeze' ]; then
        export DOVECOT_VERSION='1.2'
    fi

    export DOVECOT_DELIVER='/usr/lib/dovecot/deliver'

elif [ X"${DISTRO}" == X"FREEBSD" ]; then
    export DOVECOT_CONF_DIR='/usr/local/etc/dovecot'
    export DOVECOT_DELIVER='/usr/local/libexec/dovecot/deliver'

elif [ X"${DISTRO}" == X'OPENBSD' ]; then
    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

# Dovecot config files
export DOVECOT_CONF="${DOVECOT_CONF_DIR}/dovecot.conf"
export DOVECOT_LDAP_CONF="${DOVECOT_CONF_DIR}/dovecot-ldap.conf"
export DOVECOT_MYSQL_CONF="${DOVECOT_CONF_DIR}/dovecot-mysql.conf"
export DOVECOT_PGSQL_CONF="${DOVECOT_CONF_DIR}/dovecot-pgsql.conf"
export DOVECOT_REALTIME_QUOTA_CONF="${DOVECOT_CONF_DIR}/dovecot-used-quota.conf"
export DOVECOT_SHARE_FOLDER_CONF="${DOVECOT_CONF_DIR}/dovecot-share-folder.conf"
export DOVECOT_MASTER_USER_PASSWORD_FILE="${DOVECOT_CONF_DIR}/dovecot-master-users-password"

# Log & logrotate files.
export DOVECOT_LOG_FILE='/var/log/dovecot.log'
export SIEVE_LOG_FILE='/var/log/sieve.log'
export DOVECOT_LOGROTATE_FILE="${LOGROTATE_DIR}/dovecot"
export SIEVE_LOGROTATE_FILE="${LOGROTATE_DIR}/sieve"

# Dovecot auth socket and pid file.
export DOVECOT_SOCKET_MUX='/var/spool/postfix/dovecot-auth'
export DOVECOT_AUTH_SOCKET_PATH="${DOVECOT_BASE_DIR}/auth-master"
export DOVECOT_MASTER_PID="${DOVECOT_BASE_DIR}/master.pid"

# 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'

# Dovecot quota warning.
export DOVECOT_QUOTA_WARNING_SCRIPT='/usr/local/bin/dovecot-quota-warning.sh'
export DOVECOT_REALTIME_QUOTA_TABLE='used_quota'
export DOVECOT_SHARE_FOLDER_DB_TABLE='share_folder'
export DOVECOT_SHARE_FOLDER_ANYONE_DB_TABLE='anyone_shares'

if [ X"${BACKEND}" == X"OPENLDAP" -o X"${BACKEND}" == X"MYSQL" ]; then
    export DOVECOT_SHARE_FOLDER_SQLTYPE='mysql'
    export DOVECOT_REALTIME_QUOTA_SQLTYPE='mysql'
elif [ X"${BACKEND}" == X"PGSQL" ]; then
    export DOVECOT_SHARE_FOLDER_SQLTYPE='pgsql'
    export DOVECOT_REALTIME_QUOTA_SQLTYPE='pgsql'
fi

if [ X"${DOVECOT_VERSION}" == X"1.2" ]; then
    export DOVECOT_PROTOCOLS="pop3 pop3s imap imaps managesieve"
else
    export DOVECOT_PROTOCOLS="pop3 imap sieve"
fi