Lightweight Directory Access Protocol (LDAP) is an open-standard protocol for accessing X.500 directory services. The following article describes how to use Mailtraq's LDAP implementation in a step-by-step non-technical manner.
LDAP is an Internet protocol used by email clients (Outlook Express, Outlook, Netscape Mail, Pine, Eudora, MUTT, etc ) to access user directory information.
LDAP is analogous to a phone directory for users on the mail server.
Note: the example below details steps on installing LDAP with the simplest of options and descriptions.
Installing the LDAP service :-
- From the Mailtraq Console open Services... and choose to Add a new service
- From the list of services select Lightweight Directory Access Protocol ( LDAP)
- A dialog specifying technical specifics concerning the LDAP service is presented ( all of these options can be changed in the future ). In general, most users can just click Ok and have the LDAP service running. Problems that may present itself; if another service is listening on port 389, if access restrictions need to be enforced, if the directory information is not the user database, etc. The Firewall and any Port Forwarding must be set up to allow access on Port 389.
- The service can be started at any time from the Console (left column),
Services | [LDAP] | (right-click) All Tasks | Start
Configuring user information :-
- The basic installation outlined above will retrieve Mailtraq user information from the server ( as opposed only members of a mailing list ). The user information to be displayed must be configured for each user on the server. Ideally when the administrator creates each user account the user information is entered and the proper permissions set.
- To configure user information open the User Properties dialog ( right click on a users account from the console and select Properties OR open the menu Options | Users... | Properties ).
- From the Directory tab in the User Properties dialog select the fields and the values of the fields to be displayed
- Once all of the fields desired have been entered the permission to display the directory for the user must be set. By default, Mailtraq sets the local directory permission to Private. This means that no result will be returned for directory searches.
Set Local Directory Visibility
In general, the permission in Local Directory Visibility must be set to Protected (only LAN users can view the information) or Public (any user can view the user information).
Querying the Global Address Book
An LDAP query by default returns the Local Directory information from the Mailtraq server - the local users. You may force the client to include the GAB and PAB for a specified user. You may find it appropriate to create a place-holder user for this purpose.
Select "Directory" in the LDAP service options and then in the LDAP Client (below) specify a user to "Bind*" to (authenticate as). Set the Bind DN to the login name of the user, and the client will ask for Authentication as required. The search is applied to the local directory, the global address book and that user's personal address book.
An Outlook example
It is important to remember that LDAP is a searchable directory.
In order to locate an address you must configure Outlook to use Mailtraq as the 'Directory Service'.
All versions of Outlook including Outlook 2016 work in a similar way.
In Outlook , go to Accounts Settings, Address Books or Directory Service tab
and click [Add], to add a new Directory Service.
Set the name of the Directory Service Account to: Mailtraq
Set the Server name, to be the local IP address of the Mailtraq machine.
Mailtraq requires that you log in, so check the box, and supply a valid username and password for the Mailtraq server. This is normally the same as the email account username and password.
Finding an address
In order to locate an address it is necessary to run a search.
For example, in Outlook Express, at 'Tools | Accounts' add the Mailtraq LDAP service as a Directory Service 'Account', as described in Setup, above.
Next, open 'Addresses', then select 'Find People'.
At the 'Find People' dialog, select the Mailtraq LDAP service in the 'Look in:' drop down list.
Select the 'Advanced' tab, and enter the search criteria:
'Name' + 'contains' + '*'
Add this to the search, then click the [Find Now] button.
The tool will then return a list of all entries in the LDAP directory.
First add a new LDAP Directory
Then configure it to connect to the User account on Mailtraq.
- Enter the following within the 'General' tab:
- Name: Mailtraq
- Hostname: 192.168.1.10 (the IP address of the Mailtraq server)
- Base DN: leave blank for default
- Port Number: 389
- Bind DN: *username
To access an address, select the LDAP source Address Book - in this example called 'Mailtraq' - and in the Search Box start typing an address to do a live search, or enter * (asterisk) to display all available addresses.
Searching from the Composition dialog
In general Thunderbird operates in a similar manner to the Outlook Express example above.
- Open Thunderbird.
- Go to Tools | Options. If you are using a Mac go to Thunderbird | Preferences.
- Under "Options" select Composition. Then click on the 'Addressing' tab.
- Place a checkmark on Directory Server and click on Edit Directories.
- Click on Add.
And then 'OK'
You can have multiple LDAP services running providing you set each on its own Port. The base port for LDAP is 389. You can run LDAP on any unused port to provide additional address books.
For example, you could configure the base LDAP service on 389 to render the Local Directory. You could then create an additional LDAP Service on port 8389, and set that to render a "Mailing List". That mailing list can itself be set to be populated by an address book - for instance, the Global Address Book, or any other shared Address Book.