Commits

Zhang Huangbin committed babaecc

Code cleanup.

Comments (0)

Files changed (5)

iRedMail/functions/amavisd.sh

     fi
 
     # Use 'utf8' character set.
-    grep -i 'set names' ${AMAVISD_BIN} >/dev/null 2>&1
-    if [ X"$?" != X"0" ]; then
-        perl -pi -e 's#(.*)(section_time.*sql-connect.*)#${1}\$dbh->do("SET NAMES utf8"); ${2}#' ${AMAVISD_BIN}
+    if [ X"${BACKEND}" != X'PGSQL' ]; then
+        grep -i 'set names' ${AMAVISD_BIN} >/dev/null 2>&1
+        if [ X"$?" != X"0" ]; then
+            perl -pi -e 's#(.*)(section_time.*sql-connect.*)#${1}\$dbh->do("SET NAMES utf8"); ${2}#' ${AMAVISD_BIN}
+        fi
     fi
 
     cat >> ${AMAVISD_CONF} <<EOF

iRedMail/functions/dovecot1.sh

 # ipv4: *
 # ipv6: [::]
 #listen = *, [::]
-listen = *, [::]
+listen = *
 
 # mail uid/gid.
 mail_uid = ${VMAIL_USER_UID}

iRedMail/functions/postfix.sh

         postconf -e mydomain="${HOSTNAME}"
     fi
 
-    postconf -e inet_protocols="all"
+    postconf -e inet_protocols="ipv4"
     postconf -e mydestination="\$myhostname, localhost, localhost.localdomain, localhost.\$myhostname"
     postconf -e biff="no"   # Do not notify local user.
     postconf -e inet_interfaces="all"

iRedMail/functions/postgresql.sh

     fi
 
     if [ X"${DISTRO}" == X'RHEL' ]; then
-        if [ X"${DISTRO_VERSION}" == X'5' ]; then
-            if [ -d ${PGSQL_DATA_DIR} ]; then
-                # Remove it to force /etc/init.d/postgresql initialize database
-                mv ${PGSQL_DATA_DIR} ${PGSQL_DATA_DIR}-backup &>/dev/null
-            fi
-        elif [ X"${DISTRO_VERSION}" == X'6' ]; then
-            ${PGSQL_RC_SCRIPT} initdb &>/dev/null
-        fi
+        ${PGSQL_RC_SCRIPT} initdb &>/dev/null
     fi
 
     backup_file ${PGSQL_CONF_PG_HBA} ${PGSQL_CONF_POSTGRESQL}

iRedMail/samples/dovecot/dovecot2.conf

 #   - '[::]' means all available IPv6 addresses.
 # Use below setting to listen on all available addresses:
 #listen = *, [::]
-listen = *, [::]
+listen = *
 
 #base_dir = PH_BASE_DIR
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.