Zhang Huangbin avatar Zhang Huangbin committed 5cf07d6

* Disable Dovecot expire plugin by default.
* Install Fail2ban on FreeBSD. Work in progress to make it work with ipfw.

Comments (0)

Files changed (5)

iRedMail/functions/dovecot1.sh

 
 dict {
     # NOTE: dict process currently runs as root, so this file will be owned as root.
-    expire = db:${DOVECOT_EXPIRE_DICT_BDB}
+    #expire = db:${DOVECOT_EXPIRE_DICT_BDB}
 }
 
 plugin {
     # Trash: 7 days
     # Trash's children directories: 7 days
     # Junk: 30 days
-    expire = Trash 7 Trash/* 7 Junk 30
-    expire_dict = proxy::expire
+    #expire = Trash 7 Trash/* 7 Junk 30
+    #expire_dict = proxy::expire
 
     # If you have a non-default path to auth-master, set also:
     auth_socket_path = ${DOVECOT_AUTH_SOCKET_PATH}

iRedMail/functions/optional_components.sh

 
     # Fail2ban.
     [ X"${USE_FAIL2BAN}" == X'YES' \
-        -a X"${DISTRO}" != X'FREEBSD' \
         -a X"${DISTRO}" != X'OPENBSD' \
         ] && \
         check_status_before_run fail2ban_config

iRedMail/functions/packages.sh

         # Authentication modules
         ALL_PKGS="${ALL_PKGS} libapache2-mod-auth-mysql libapache2-mod-auth-pgsql"
 
-        if [ X"${DISTRO_CODENAME}" == X'squeeze' ]; then
-            ALL_PKGS="${ALL_PKGS} php5-mhash"
-        fi
-
         if [ X"${DISTRO_CODENAME}" != X'squeeze' ]; then
             if [ X"${BACKEND}" == X"OPENLDAP" ]; then
                 ALL_PKGS="${ALL_PKGS} php-net-ldap2"

iRedMail/functions/packages_freebsd.sh

     ALL_PORTS="${ALL_PORTS} www/mod_wsgi www/webpy devel/py-Jinja2 net/py-netifaces"
 
     # Fail2ban.
-    #if [ X"${USE_FAIL2BAN}" == X"YES" ]; then
-    #    # python-ldap.
-    #    ALL_PORTS="${ALL_PORTS} security/py-fail2ban"
-    #    ENABLED_SERVICES="${ENABLED_SERVICES} fail2ban"
-    #fi
+    if [ X"${USE_FAIL2BAN}" == X"YES" ]; then
+        # python-ldap.
+        ALL_PORTS="${ALL_PORTS} security/py-fail2ban"
+        ENABLED_SERVICES="${ENABLED_SERVICES} fail2ban"
+    fi
 
     # Misc
     ALL_PORTS="${ALL_PORTS} sysutils/logwatch"
                 if [ X"$?" == X"0" ]; then
                     # Log used time
                     used_time="$(($(date +%s)-port_start_time))"
-                    echo "export status_fetch_port_${portname}='DONE'  # ${used_time} seconds, ~$((used_time/60)) minutes" >> ${STATUS_FILE}
+                    echo "export status_fetch_port_${portname}='DONE'  # ${used_time} seconds, ~$((used_time/60)) minute(s)" >> ${STATUS_FILE}
                 else
                     ECHO_ERROR "Tarballs were not downloaded correctly, please fix it manually and then re-execute iRedMail.sh."
                     exit 255
                         # Log used time
                         used_time="$(($(date +%s)-port_start_time))"
 
-                        echo "export status_install_port_${portname}='DONE'  # ${used_time} seconds, ~$((used_time/60)) minutes" >> ${STATUS_FILE}
+                        echo "export status_install_port_${portname}='DONE'  # ${used_time} seconds, ~$((used_time/60)) minute(s)" >> ${STATUS_FILE}
                     else
                         ECHO_ERROR "Port was not success installed, please fix it manually and then re-execute this script."
                         exit 255
 
     # Log and print used time
     all_used_time="$(($(date +%s)-start_time))"
-    ECHO_INFO "Total time of ports compiling: ${all_used_time} seconds (~ $((all_used_time/60)) minutes)"
+    ECHO_INFO "Total time of ports compiling: ${all_used_time} seconds, ~$((all_used_time/60)) minute(s)"
 
     echo 'export status_install_all="DONE"' >> ${STATUS_FILE}
 }

iRedMail/samples/dovecot/dovecot2.conf

     autosubscribe5 = Junk
 
     # Plugin: expire.
-    expire = Trash 7 Trash/* 7 Junk 30
-    expire_dict = proxy::expire
+    #expire = Trash 7 Trash/* 7 Junk 30
+    #expire_dict = proxy::expire
 
     # ACL and share folder
     acl = vfile
 }
 
 dict {
-    expire = db:/var/lib/dovecot/expire/expire.db
+    #expire = db:/var/lib/dovecot/expire/expire.db
     quotadict = PH_DOVECOT_REALTIME_QUOTA_SQLTYPE:PH_DOVECOT_REALTIME_QUOTA_CONF
     acl = PH_DOVECOT_SHARE_FOLDER_SQLTYPE:PH_DOVECOT_SHARE_FOLDER_CONF
 }
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.