ldap-mail1: ldap1 (1), ldap2 (10), ldap3 (100), ldap4 (1000), ldap7
(1000) ldap-mail2: ldap2 (1), ldap3 (10), ldap1 (100), ldap5 (1000),
ldap8 (1000) ldap-mail3: ldap3 (1), ldap1 (10), ldap2 (100), ldap6
(1000), ldap9 (1000)
This sounds like DNS load balancing. Consider when ldap{1,2,3,4,7} are
down, and therefore your entire ldap-mail1 DNS alias is toast, you still
need an algorithm to drop down to ldap-mail2--which I interpreted as the
question at hand, and (I think, but please point out flaws) could be
addressed at the application level by any of the responses on this thread.