Creating External User Database for a Mail Domain

IMail Server can use an external database to register and authenticate users on a particular mail domain . Users that you add to and delete from an IMail Server host are also added to and deleted from the external database.

Important: Remember to restart the IMail Services, after creating external database.

Before you use an external database for a mail domain, use the Windows Control Panel to make sure there is a System DSN (Data Source Name) that points to a valid database name. See your Windows and database documentation for information on the System DSN .

Important: When you configure a DSN to an SQL data source in the Microsoft Windows ODBC Data Source Administrator, it may default to Named Pipes network library. Make sure that you set the connection type to TCP/IP in order for the external database to work correctly.

After you have verified the System DSN that points to the database you want to use, you can configure an external database.

Note: The external database can reside locally with the IMail Server.

Configuring an External User Database

The connection between IMail Server and an external user database is accomplished via a dynamic link library (DLL file). IMail Server includes a sample .dll file (ODBCUSER.DLL). This DLL uses the ODBC method, but can be modified to support other external database methods. The complete source code for this DLL is provided upon request from Ipswitch.

When you configure an external user database, IMail Server creates an ODBC database that holds tables configured with the correct fields. The fields are identified in the Table Name text box. After the database is created and the ODBC system data source name is established in the ODBC Source Administration tool (located in the Windows Control Panel), you can use the database to store user authentication information and user properties. This information can be managed through IMail Administrator, including adding and deleting users.

Important: When using an external database, any IMail service you run (except the Log Server) must be set up from the Windows Control Panel Services application so the account that IMail Server runs under has access to the external database.

To create a mail domain that uses an external database:

  1. In IMail Administrator, click Domain > Domain Properties.
  2. In the User Database section, select External Database from the User Database type list box.
  3. Click the Configure button. A domain options page appears.
    • External Database Implementation DLL. Enter the full path to the odbcuser.dll installed on your local server or the path of a .DLL that supports the functions: GetUserEntry, SetUserEntry, DeleteUserEntry, AuthorizeUser, GetFirstUserEntry, and GetNextUserEntry. (These are defined in the odbcuser.h file.)
    • ODBC System Data Source Name (DSN). Enter the source name for the database where the user information is stored. IMAILSECDB is the default name that the ODBC link uses.

      Important: For users using SQL 7.0 or above, enter the following information after the ODBC System Data Source Name box: DSN_NAME;UID=<username>;PWD=<password>. The user name and password need to be the User ID and password for the SQL database and not an IMail Server account.

    • Table Name. Enter the table name within your ODBC database. Leaving "[default]" in this text box will use your domain name as the table name. All periods will be replaced with underscores.

      Important: The table name cannot begin with a number.

Example:
If you use the Data Source Name IMAILSECDB and the username AUGUSTA and password GEORGIA, the correct format of the ODBC System Data Source Name box is: IMAILSECDB;UID=AUGUSTA;PWD=GEORGIA

Save. Click this button to save your settings.

Cancel. Click Cancel to exit without saving changes.

Related Topic

Domain Properties