Commits

Zhang Huangbin committed 27c9fbb

Enable iRedAPD plugin 'ldap_recipient_restrictions' for OpenLDAP backend by default.
Code cleanup in functions/packages.sh.

  • Participants
  • Parent commits c719e9f

Comments (0)

Files changed (2)

File iRedMail/functions/iredapd.sh

         perl -pi -e 's#^(ldap_bindpw).*#${1} = "$ENV{LDAP_BINDPW}"#' settings.py
         perl -pi -e 's#^(ldap_basedn).*#${1} = "$ENV{LDAP_BASEDN}"#' settings.py
 
-        perl -pi -e 's#^(plugins).*#${1} = ["ldap_maillist_access_policy", "ldap_amavisd_block_blacklisted_senders"]#' settings.py
+        perl -pi -e 's#^(plugins).*#${1} = ["ldap_maillist_access_policy", "ldap_amavisd_block_blacklisted_senders", "ldap_recipient_restrictions"]#' settings.py
 
     elif [ X"${BACKEND}" == X"MYSQL" -o X"${BACKEND}" == X'PGSQL' ]; then
         perl -pi -e 's#^(sql_server).*#${1} = "$ENV{SQL_SERVER}"#' settings.py

File iRedMail/functions/packages.sh

         fi
         eval ${install_pkg} ${ALL_PKGS}
 
+        if [ X"${DISTRO}" == X'OPENBSD' ]; then
+            # Fix incorrect file permission required by py-ldap
+            # NOTE: This issue was fixed in OpenBSD 5.4.
+            chmod o+r /usr/local/lib/libsasl2.so* &>/dev/null
+        fi
+
         echo 'export status_install_all_pkgs="DONE"' >> ${STATUS_FILE}
     }
 
 
     check_status_before_run install_all_pkgs
     check_status_before_run enable_all_services
-
-    # Fix incorrect file permission which required by py-ldap
-    chmod o+r /usr/local/lib/libsasl2.so* &>/dev/null
 }