Commits

Zhang Huangbin committed a395edd

Use samples/dovecot/dovecot22.conf for all distributions except Ubuntu 12.04 (Dovecot-2.0).

  • Participants
  • Parent commits 4915dab

Comments (0)

Files changed (3)

iRedMail/conf/dovecot

 export ENABLE_DOVECOT="YES"
 export ENABLE_DOVECOT_SSL="YES"
 
-# Dovecot major version number:
-#   - 2 -> 2.0, 2.1
-#   - 2.2 -> 2.2
-export DOVECOT_VERSION='2'
-
 # Dovecot user & group.
 export DOVECOT_USER='dovecot'
 export DOVECOT_GROUP='dovecot'
     export DOVECOT_DELIVER='/usr/lib/dovecot/deliver'
 
 elif [ X"${DISTRO}" == X"FREEBSD" ]; then
-    export DOVECOT_VERSION='2.2'
     export DOVECOT_CONF_DIR='/usr/local/etc/dovecot'
     export DOVECOT_DELIVER='/usr/local/libexec/dovecot/deliver'
 

iRedMail/conf/global

 
         # Ubuntu version number and code name:
         #   - 12.04: precise (Long Term support by Ubuntu)
-        #   - 13.04: raring
         #   - 13.10: saucy
         #   - 14.04: trusty
         export DISTRO_ID="$(grep 'DISTRIB_ID' /etc/lsb-release | awk -F'=' '{print $2}')"
 
         # Unsupported releases.
         #   8, 9, 10, 11, 12.10
-        if echo "${DISTRO_VERSION}" | grep -E '^(7|8|9|10|11|12\.10)' &>/dev/null ; then
+        if echo "${DISTRO_VERSION}" | grep -E '^(7|8|9|10|11|12\.10|13\.04)' &>/dev/null ; then
             export UNSUPPORTED_RELEASE='YES'
         fi
     elif [ -f /etc/debian_version ]; then

iRedMail/functions/dovecot.sh

 
 dovecot2_config()
 {
-    ECHO_INFO "Configure Dovecot-${DOVECOT_VERSION} (pop3/imap/managesieve server)."
+    ECHO_INFO "Configure Dovecot (pop3/imap/managesieve server)."
 
     backup_file ${DOVECOT_CONF}
 
     ECHO_DEBUG "Configure dovecot: ${DOVECOT_CONF}."
 
-    # FreeBSD ships Dovecot-2.2
-    if [ X"${DOVECOT_VERSION}" == X'2.2' ]; then
+    # Ubuntu 12.04 ships Dovecot-2.0.
+    if [ X"${DISTRO_CODENAME}" == X'precise' ]; then
+        cp ${SAMPLE_DIR}/dovecot/dovecot2.conf ${DOVECOT_CONF}
+    else
         cp ${SAMPLE_DIR}/dovecot/dovecot22.conf ${DOVECOT_CONF}
-    else
-        cp ${SAMPLE_DIR}/dovecot/dovecot2.conf ${DOVECOT_CONF}
     fi
     chmod 0664 ${DOVECOT_CONF}