Show/Hide Toolbars

Navigation: Admin Settings > Services > LDAP > Advanced

LDAP ODBC Database

Scroll Prev Top Next More

In VPOP3 Enterprise, you can have VPOP3 retrieve address book contents from an external database using ODBC (Open DataBase Connectivity) to allow users to access addresses from a separate company database as well as the built-in address book in VPOP3.

 

LDAP is a hierarchical system with many different attributes and object types which doesn't map nicely onto a standard database record format. So, the ODBC->LDAP gateway in VPOP3 only supports a subset of LDAP features. In most cases users won't notice anything when using normal email client software, but if you are using software which uses certain features of LDAP, then that software may have problems with data from the ODBC database.

Configuring the ODBC Driver

To use the ODBC gateway you need to first configure a suitable ODBC driver on the VPOP3 PC. This must be a 32 bit or 64 bit ODBC driver to match the 32 or 64 bit version of VPOP3, and must be a 'System' driver (not for the current user, because VPOP3 runs as a service, not in the current user's account).

To do this, go to the appropriate directory as below and run odbcad32.exe

- 32 bit VPOP3 on 32 bit Windows - c:\windows\system32

- 32 bit VPOP3 on 64 bit Windows - c:\windows\syswow64

- 64 bit VPOP3 on 64 bit Windows - c:\windows\system32 (note that the program is still odbcad32.exe and it's in the 'system32' folder even though it's a 64 bit version...)

 

Go to the System DSN tab. (DSN stands for 'Data Source Name' and is the way databases are referred to in ODBC).

odbcad_1_zoom50

Press Add and choose the appropriate ODBC driver, and configure it as appropriate. Unfortunately, we cannot give details here because there are many ODBC drivers and they need different settings. The documentation for the ODBC driver you are using should tell you how to configure it. If the database type you want is not shown, then you may need to install an ODBC driver for it - see the documentation for the database you want for details.

Unfortunately, this section is vague, because all this depends on which database you need, whether there's an ODBC driver for it, and how you obtain the ODBC driver and configure it can be very different for different databases

Configuring VPOP3

Once you have the ODBC driver installed on the VPOP3 PC, then you can go to Services -> LDAP -> Advanced, check the Use ODBC database as well as local database box and press the Configure ODBC button. This should show all the ODBC DSNs available to VPOP3.

ldapodbc1_zoom50

If the DSN you want is not available, then you haven't configured it correctly in the ODBC setup. Check that it is configured in the System DSN tab, not the User DSN tab. Also check that you have used the correct version of odbcad32 - if you configure the DSN in the 64 bit version, it will not be available to the 32 bit version of VPOP3, and vice versa.

If the DSN you want is available, then select it, and enter the username & password needed to connect to the database (if any) and press Next. If the username & password are correct, then the next page should show you all the database tables and views available to that user.

ldapodbc2_zoom50

Select the table or view you want VPOP3 to use as data source and press Next.

Note that VPOP3 cannot perform JOINs or data manipulation on tables. It can use a simple 'WHERE' query to filter the data if you wish. If you need to perform JOINs or other manipulation beyond a simple WHERE clause, then you should create a suitable VIEW in the database schema and have VPOP3 use that for the data source. If possible it can be best to use a custom VIEW even if you just need a simple WHERE clause because that can make testing easier.

ldapodbc3_zoom50

Now, you can specify a WHERE clause to filter the data if you wish.

If the table may contain duplicate entries, checking the Use SELECT DISTINCT may help (it's better to use a custom view if possible).

You can also link some standard LDAP attributes to the relevant table columns. If the database table does not contain certain data, then just leave it set to <None> and the LDAP service will not return data for that attribute.

There must be a unique id column in the table which VPOP3 can use to identify a value. Specify that in the Key column setting.

Press Finish once you have finished, and the VPOP3 LDAP service will return the database data to any LDAP clients.

 

Technical note - the LDAP data is returned as children of the OU=ODBC,OU=EXTERNAL,O=VPOP3 LDAP DN (distinguished name), so if you want the email client to only see this data, set that DN as the 'base DN' in the email client's LDAP configuration.

 

If you think this help topic could be improved, please send us constructive feedback