Previous Topic

Next Topic

Book Contents

Connect Elements Example: Multi

The following example shows a Multi verifier that connects to many different LDAP directories. A copy of each directory is hosted on one or more LDAP servers using anonymous binding for each directory. When a request to verify an email address is received, the first available cached connection to the host 1.2.3.4 or 1.2.3.5 is queried with search base of dc=redcondor,dc=com using a one-second timeout.

If this query returns no hits, then the first cached connection to 1.2.3.6 is queried with search base of dc=redcondor,dc=net using an eight-second timeout. If this query returns no hits then the first cached connection to the host 1.2.3.7, 1.2.3.8 or 1.2.3.9 is searched. The search base is the LDAP server's published default search base. If this query returns no hits, the email address is not verified. If any one of the three searches times out or returns an error, then a "failure to verify" error is reported for that address.

When establishing connections, this verifier allows only one active connection to either host 1.2.3.4 or 1.2.3.5. If that connection times out or has an error, the other server is tried. If an error or timeout occurs during connection establishment to host 1.2.3.4 or 1.2.3.5, then the other server will be tried immediately. If the error occurs during connection use, the pending command fails.

This verifier also manages 18 separate connections to the LDAP server on host 1.2.3.6. Lastly, this verifier manages up to three simultaneous connections across the host set 1.2.3.7, 1.2.3.8 or 1.2.3.9. It will always try 1.2.3.7 first. If that connection attempt fails, it tries 1.2.3.8. Only if both 1.2.3.7 and 1.2.3.8 fail will it attempt a connection to host 1.2.3.9. All connection attempts will have eight-second timeouts.

When enumerating email addresses, one active connection from host 1.2.3.4 or 1.2.3.5 is used and, simultaneously, one active connection to 1.2.3.6 is used, and one active connection to any of host 1.2.3.7, 1.2.3.8, or 1.2.3.9 is used. The result from all three directory services are combined to yield the enumeration of this Multi verifier.

<Vrfy version = "101.4635"

name = "My LDAP Verifier"

uid = "64378E86-A459-11DD-1273-09173F13E4C5">

<Multi>

<BackendMax>3</BackendMax>

<Timeout>8</Timeout>

<LDAP>

<Host>1.2.3.4</Host>

<Host>1.2.3.5</Host>

<BackendMax>1</BackendMax>

<Timeout>1</Timeout>

<HostListOrder>Rotate</HostListOrder>

<BaseDN>dc=redcondor,dc=com</BaseDN>

</LDAP>

<LDAP>

<Host>1.2.3.6</Host>

<BackendMax>18</BackendMax>

<BaseDN>dc=redcondor,dc=net</BaseDN>

</LDAP>

<LDAP>

<Host>1.2.3.7</Host>

<Host>1.2.3.8</Host>

<Host>1.2.3.9</Host>

</LDAP>

</Multi>

</Vrfy>