From e114a6040606afabf84f11651a040cef30bc55a2 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Wed, 23 Jan 2013 12:01:02 -0500
Subject: [PATCH] Use LDAP fallback hosts on connect + bind because with OpenLDAP 2.x ldap_connect() always succeeds but ldap_bind() will fail if host isn't reachable. Add option for LDAP bind timeout (sets LDAP_OPT_NETWORK_TIMEOUT on PHP > 5.3.0)

---
 config/main.inc.php.dist |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist
index e6cb9fd..b113b41 100644
--- a/config/main.inc.php.dist
+++ b/config/main.inc.php.dist
@@ -577,6 +577,7 @@
   'port'          => 389,
   'use_tls'	      => false,
   'ldap_version'  => 3,       // using LDAPv3
+  'network_timeout' => 10,    // The timeout (in seconds) for connect + bind arrempts. This is only supported in PHP >= 5.3.0 with OpenLDAP 2.x
   'user_specific' => false,   // If true the base_dn, bind_dn and bind_pass default to the user's IMAP login.
   // %fu - The full username provided, assumes the username is an email
   //       address, uses the username_domain value if not an email address.

--
Gitblit v1.9.1