Eric AUGE writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Sam,
I sent you a mail few days ago, about a quick patch i've done
to allow 'hostname' keyword to handle more than one server in the
LDAP part of the code. (i.e. hostname ldapserv1,ldapserv2,ldapserv3,ldapserv4).
This patch adds a fallback on the next server in the list if the previous
one doesn't answer and if timeout elapsed, the code browse the server list
'retry' times before returning 'user unknown' (new keyword in
maildropldap.config -> 'retry').
You are reinventing the wheel.
ldap_init is already capable of using fallback servers if the hostname
parameter contains a whitespace-separated list of hostnames.
So all you need to do is modify ldap_get_config to be a bit smarter about
parsing the config file.
old mail:
[snipped]
...
I just did a small patch for 1.4.0 version, which provides
the ability to have
...
hostname ldap1.mydomain.com,ldap2.mydomain.com,ldap3.mydomain.com
...
retry 3
...
in the maildropldap.config file.
which allows the ldap code part to fallback on another LDAP server if
the search timeouted on one server.
The retry is how many times it need to browse the servers list
before saying that all servers are dead.
I hope this could help and be part of maildrop code.
Many thanks,
...
[snipped]
I hope it could help some other maildrop's users,
that's why i'm sending it to the maildrop users list.
You can contact me if any questions/problems/comments/etc...
Thanks.
Best Regards,
Eric.
- ----
Eric AUGE
NB: attached the patch.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org
iD8DBQE9SothL/U5psk9l1gRAmzZAKDSoBXaYiIXxRb9+g/nsPyf9m7BoACgn65A
bjPiUL66R9CCHsK4Q6Ruq1w=
=H0Xz
-----END PGP SIGNATURE-----