Mail: NT SQL PO – Configuration of SQL Mail for NT Post Office

[SQL Server Version 6.5]

For those of you who are managing SQL Server on a machine, or a domain without Exchange Server and wish to utilise the SQL Mail service for Alert Notification and Management Microsoft Mail can offer a very similar service using an NT Post Office.

A typical scenario that I manage involves an NT 4 application server running batch processes from bulk-copied data on SQL Server 6.5, the total length of which is about 5-6 working days. The server is manually logged in on the SQL Server service account with Exchange client running minimised. On my workstation I have Microsoft Mail service on Outlook 98. As the run proceeds I receive mails informing me of milestones passed or failed. On completion of the run I am sent a number of queries containing run times and checking results.

The following method is one that I have implemented on many servers successfully. I am not promising that you will not have any problems, I myself spent several weeks trying the implement SQL Mail from scratch. I searched the internet for information on SQL Mail with Microsoft Mail, but didn’t find any extensive information, so after I eventually configured SQL Mail, I devised this configuration method.

At times you may find it frustrating, but the results are worth the effort, I hope that the following will ease the installation.

Security Context for SQL Server

Creation of a NT account for SQL Server service to use as it’s security context.

  1. Open User Manager for Domains on the domain that SQL server is participating in.
  2. Create an NT user account for SQL Server to log into the network. Make sure this account (e.g. sqlsrvr) has the following properties and a password set:

    • Unchecked – User Must Change Password at Next Logon
    • Checked – User Cannot Change Password
    • Checked – Password Never Expires
    • Unchecked – Account Disabled

  1. Make this NT account a part of the local Administrators group on the server where SQL Server is installed.
  2. Still in User Manager for Domains, choose the Policies menu and select User Rights. In the User Rights dialog, select the Show Advanced User Rights checkbox.
  3. Add the sqlsrvr account to the following Rights:
    • Act As Part Of the Operating System

      Log On As a Service

  4. Exit User Manager for Domains.


Microsoft Mail Post Office for NT Server


Installation of a Microsoft Post Office is accomplished the following;

  1. Go to Control Panel, double-click on Microsoft Mail Postoffice. If no such icon is present the Microsoft Mail component has not yet been installed (see Microsoft Personal Support Center, Knowledge Base Article 158862).
  2. Follow the on-screen instruction to create a post office locally.
  3. Create a post office Administrator account (e.g. sqlsrvr). This will be the account that SQL Server will use. Be sure to note the Name associated with the Mailbox for this account, as this is how SQL Server will reference the mail account.
  4. Create a post office account for each client user, again be sure to note the account note the Name associated with the Mailbox, as this is how SQL Server will reference the mail account.
  5. Exit Microsoft Mail Postoffice.


SQL Server Service on NT Server


SQL Server must now be configured to logon to NT under it’s own security context.

  1. Go to Control Panel, double-click on Services.
  2. In the Service list box, choose the MSSQLSERVER service. Press the Startup button. SQL Server probably is logged into the network as the System Account.
  3. Choose Log on as This account, this will default to the local system account, LocalSystem.
  4. Press the browse button [.] and select the newly created account and set and confirm the password.
  5. Stop and Restart the MSSQLSERVER service to have SQL Server log into the network under the new security context.


Windows Messaging on NT Server


Prior to testing SQL Mail, Microsoft Mail needs to be configured and tested independently on SQL Server. This assumes that Exchange (or similar) client has been installed on the server.

  1. Log out of the NT server, and log in under the SQL Server account (e.g. sqlsrvr).
  2. Right-click on Inbox icon on the desktop and select Properties.
  3. Add the following services:
    • Microsoft Mail

      Personal Folders

  4. Configure Microsoft Mail to connect to the NT post office, under the post office Administrator account created for SQL Server. Ensure that the Delivery is configured to Personal Folders, and that Addressing is configured to Postoffice Address List
  5. Click on Show Profiles, and note the name of the current mail profile being configured.
  6. Close and Re-start Exchange client.
  7. Confirm that Microsoft Mail is working correctly by sending mail to post office Administrator account (the account the Exchange is currently using), and this mail should promptly arrive in the Inbox.
  8. Exit Exchange.


SQL Mail on SQL Server


Mail now has been installed and tested manually, configuration of SQL Mail remains.

  1. Run SQL Setup. Select Set Server Options.
  2. Click Mail Login, enter the Profile Name (Point 5, section above) (e.g. Windows Messaging Settings).
  3. Exit from SQL Setup.
  4. Run SQL Enterprise Manager, and select the server on the Server Manager and expand to display the databases and services.
  5. Right-click on the SQL Mail icon and select Start.
  6. The icon should turn from red to green (wait a few seconds as it may turn back to red).
  7. Testing SQL Mail can be accomplished by opening ‘Managing Alerts and Operators‘ and creating a new operator for SQL Server. Select an appropriate Name (e.g. SQL Server) and enter the name of the post office account, not the mailbox, as the Email-Name.
  8. Confirm that everything you have spent the last half-an-hour doing by clicking on Test.
  9. You should be rewarded with a dialogue box informing you of the success of the mail test.
  10. Confirmation of this can be achieved by examining Exchange. The test mail will be either in the Outbox, awaiting delivery, or have been delivered and retain a copy in Sent Items. In which case the message itself should have arrived in the Inbox.
  11. Minimise Exchange, SQL Mail configuration is complete.
Previous article
Next article

Get the Free Newsletter!

Subscribe to Cloud Insider for top news, trends & analysis

Latest Articles