Commits

Zhang Huangbin  committed 1386972

* Works on OpenBSD 5.5.
* Fix incorrect Fail2ban socket path on FreeBSD.

  • Participants
  • Parent commits f2e1a83

Comments (0)

Files changed (5)

File iRedMail/ChangeLog

 iRedMail-0.8.7:
     * Works on new Linux/BSD distribution releases:
-        - Ubuntu 14.04 LTS. With MariaDB support.
+        + Ubuntu 14.04 LTS. With MariaDB support.
+        + OpenBSD 5.5
 
     * Drop support for below releases:
         - Ubuntu 13.04, 13.10
+        - OpenBSD 5.4
 
     * Increase default Amavisd prefork children to 10 (default is 2).
     * Allows sasl authentication ONLY over a TLS-encrypted smtp connection.

File iRedMail/conf/apache_php

     export HTTPD_LOG_ERRORLOG="${HTTPD_SERVERROOT}/logs/error_log"
 
     # ---- PHP ----
-    export PHP_VERSION='5.3'
+    export PHP_VERSION='5.4'
     export PHP_INI="/etc/php-${PHP_VERSION}.ini"
 fi
 

File iRedMail/conf/fail2ban

 elif [ X"${DISTRO}" == X"FREEBSD" ]; then
     export FAIL2BAN_CONF_ROOT='/usr/local/etc/fail2ban'
     export FAIL2BAN_SSHD_LOGFILE='/var/log/auth.log'
+    export FAIL2BAN_SOCKET='/var/run/fail2ban.sock'
 fi
 
 export FAIL2BAN_MAIN_CONF="${FAIL2BAN_CONF_ROOT}/fail2ban.conf"

File iRedMail/functions/fail2ban.sh

     ECHO_DEBUG "Disable all default filters in ${FAIL2BAN_JAIL_CONF}."
     perl -pi -e 's#^(enabled).*=.*#${1} = false#' ${FAIL2BAN_JAIL_CONF}
 
+    if [ X"${DISTRO}" == X'FREEBSD' ]; then
+        ECHO_DEBUG "Set proper socket path: ${FAIL2BAN_SOCKET}"
+        perl -pi -e 's#^(socket).*#${1} = $ENV{FAIL2BAN_SOCKET}#' ${FAIL2BAN_MAIN_CONF}
+    fi
+
     ECHO_DEBUG "Enable mail server related components."
     cat > ${FAIL2BAN_JAIL_LOCAL_CONF} <<EOF
 ${CONF_MSG}

File iRedMail/functions/packages.sh

     elif [ X"${DISTRO}" == X'OPENBSD' ]; then
         ALL_PKGS="${ALL_PKGS} php php-bz2 php-imap php-mcrypt php-gd pecl-APC"
 
-        [ X"${BACKEND}" == X'OPENLDAP' ] && ALL_PKGS="${ALL_PKGS} php-ldap php-mysql php-mysqli"
-        [ X"${BACKEND}" == X'MYSQL' ] && ALL_PKGS="${ALL_PKGS} php-mysql php-mysqli"
-        [ X"${BACKEND}" == X'PGSQL' ] && ALL_PKGS="${ALL_PKGS} php-pgsql"
+        [ X"${BACKEND}" == X'OPENLDAP' ] && ALL_PKGS="${ALL_PKGS} php-ldap php-mysql php-mysqli php-pdo_mysql"
+        [ X"${BACKEND}" == X'MYSQL' ] && ALL_PKGS="${ALL_PKGS} php-mysql php-mysqli php-pdo_mysql"
+        [ X"${BACKEND}" == X'PGSQL' ] && ALL_PKGS="${ALL_PKGS} php-pgsql php-pdo_pgsql"
     fi
 
     ###############
                 ALL_PKGS="${ALL_PKGS} roundcubemail"
             fi
 
-            ALL_PKGS="${ALL_PKGS} php-pspell pecl-fileinfo"
+            ALL_PKGS="${ALL_PKGS} php-pspell"
 
             # MySQL driver for PHP, required by Roundcube.
             [ X"${BACKEND}" == X'OPENLDAP' ] && ALL_PKGS="${ALL_PKGS} php-pdo_mysql"