Creating an External User Database for a Mail Domain

作者:ipswitch 发布时间 10/03/20 来源 ipswitch

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.

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 create a new host to use an external database.

To create a mail domain that uses an external database:

  1. In IMail Administrator, click the Domain tab, then click Add. The Domain Properties appear.

  2. Enter the new mail domain name in the Domain Name (OHN) box.

  3. Enter other General Domain Settings and select other Message. For more information, see Setting Domain Properties.

  4. Under the User Database Setting options, select External Database.

  5. Click Configure. The External User Database dialog box appears. For more information, see Configuring an External User Database below.

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 section below. 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 you use 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 configure an external database connection:

  1. Follow the instructions in To create a host based on an external database.

  2. In the External User Database dialog box, enter the parameters for the external user database:

  • 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.)

External User Database dialog box used to configure an external database connection for IMail users.

  • ODBC. Enter the source name for the database where the user information is stored. IMAILSECDB is the default name that the ODBC link uses. System Data Source Name (DSN)

Important: For users using SQL 7.0 or above, enter the following information after the ODBC System Data Source Name box:
The user name and password need to be the User ID and password for the SQL database and not an IMail Server account.
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:

  • Table name. Enter the database table name. If the field is blank or contains [default], the host name is used with dots replaced by underscores. The Table name cannot begin with a number.

  1. Select:

  • Enable Multiple Connections to allow multiple connections from the external database to IMail Server.

  • Maximum Number of Connections to set the maximum number of connections from the external database to IMail Server

  1. Click OK.