Microsoft SMTP Service

Microsoft SMTP Service uses the Internet-standard Simple Mail Transfer Protocol (SMTP) to transport and deliver messages based on specifications in Request for Comments (RFC) 821 and RFC 822. It also includes enhancements that build upon the basic delivery functions of the protocol. There are options available that give you control over the routing and delivery of messages, and that provide secure communications.

  • For help with specific tasks, see How To....
  • For general background information, see Concepts.
  • For information about monitoring performance, see Maintenance.
  • For problem-solving instructions, see Troubleshooting.

    • © 2001 Microsoft Corporation. All rights reserved.


How To...

This section contains instructions for configuring and operating Microsoft SMTP Service.
  • Use Administrative Tools
  • Start Microsoft Management Console
  • Start, Stop, or Pause an SMTP Virtual Server
  • Start, Stop, or Pause Microsoft SMTP Service
  • Configure SMTP Virtual Servers
  • Change the Default Startup Setting
  • Create Additional SMTP Virtual Servers
  • Set Connections
  • Enable Protocol Logging
  • Set Up a Virtual Server for Clustering
  • Set Security Options
  • Manage Messages
  • Deliver Messages
  • Create or Delete a Domain
  • Configure Local Domains
  • Configure Remote Domains


Administrative Tools

Use Microsoft Management Console

The administrative tool for Microsoft SMTP Service is called Microsoft Management Console (MMC). It can perform all operation tasks and requires a local area network (LAN) connection.

This administration tool is installed by default on the computer running Microsoft SMTP Service.

To operate the service using Microsoft Management Console from a remote computer, you must be using a computer running Microsoft Windows 2000, and the remote computer must have the Windows 2000 Administration Tools installed.

Note You must grant operators the appropriate permissions to operate Microsoft SMTP Service. For more information, see Set Security Options.


Start Microsoft Management Console

You can operate Microsoft SMTP Service using Microsoft Management Console (MMC) from the computer on which the service is running.

Note You can also use Microsoft Management Console to administer your Simple Mail Transfer Protocol (SMTP) virtual server from a remote computer, provided it's on the same LAN as the Microsoft SMTP Service. However, the remote computer must be running Microsoft Windows 2000 and have Windows 2000 Administration Tools installed.

To run Microsoft Management Console on the computer on which Microsoft SMTP Service is running

  1. On the Start menu, point to Settings, and then click Control Panel.
  2. Double-click Administrative Tools, and then double-click Computer Management.
  3. In the console tree, expand Server Applications and Services, and then expand Internet Information Services.
  4. Expand the entry for Microsoft SMTP Service.

Note The virtual server that is provided upon installation of the service is Default SMTP Virtual Server.

To view or modify the properties of an SMTP virtual server

  1. Click to select the SMTP virtual server you want to modify.
  2. On the Action menu, click Properties.
  3. Click the tab that you want to view or modify.
  4. Change any options as needed. (For more information about tab options, see Tabs.)


Start, Stop, or Pause an SMTP Virtual Server

The Default SMTP Virtual Server starts upon installation of Microsoft SMTP Service. You can pause, stop, and restart it from Microsoft Management Console.

Note You can also start, stop, and pause the entire Microsoft SMTP Service. However, if you have more than one virtual server, stopping the service effects all of the Simple Mail Transfer Protocol (SMTP) virtual servers running on your computer. When Microsoft SMTP Service is stopped, you cannot use Microsoft Management Console to perform administrative functions on any SMTP virtual server.

You can stop and start Microsoft SMTP Service manually. However, while it's operating, you must be careful when stopping, pausing, or restarting the service to minimize the impact on users.

This section describes how to start, stop, and pause Microsoft SMTP Service with Microsoft Management Console. It includes:

  • Starting an SMTP Virtual Server
  • Stopping an SMTP Virtual Server
  • Pausing an SMTP Virtual Server


Starting an SMTP Virtual Server

If the default startup setting is Manual, you can use Microsoft Management Console to start a Simple Mail Transfer Protocol (SMTP) virtual server.

  1. In Microsoft Management Console, expand the tree structure for the SMTP virtual server.
  2. Click the SMTP virtual server to select it.
  3. On the Action menu, click Start.


Pausing an SMTP Virtual Server

You can pause a Simple Mail Transfer Protocol (SMTP) virtual server for configuration changes and maintenance. Pausing prevents new client connections, but it enables the virtual server to continue processing existing client connections and delivering queued messages.

  1. In Microsoft Management Console, expand the tree structure for the SMTP virtual server.
  2. Click to select the SMTP virtual server.
  3. On the Action menu, click Pause.


Stopping an SMTP Virtual Server

You can stop a Simple Mail Transfer Protocol (SMTP) virtual server for configuration changes and maintenance.

  1. In Microsoft Management Console, expand the tree structure for the SMTP virtual server.
  2. Click to select the SMTP virtual server.
  3. On the Action menu, click Stop.


Start, Stop, or Pause Microsoft SMTP Service

Microsoft SMTP Service runs as a service on Microsoft Windows 2000 Server and starts upon installation. While there is only one Microsoft SMTP Service on a computer, it is possible to have more than one Simple Mail Transfer Protocol (SMTP) virtual server. You can start, stop, or pause each virtual server independently of one another while the Microsoft SMTP Service is running.

If you have more than one SMTP virtual server, it is important to remember that pausing or stopping the entire Microsoft SMTP Service will effect all of the SMTP virtual servers. When the service is stopped, you cannot use Microsoft Management Console to perform administrative functions on any SMTP virtual server.

Note The one exception is that you can start a virtual server while Microsoft SMTP Service is stopped. Starting an SMTP virtual server will also restart the entire Microsoft SMTP Service. This, in turn, will start all other SMTP virtual servers that had been running when the Microsoft SMTP Service was originally stopped.

When you start Microsoft SMTP Service, it accepts new connections from users. When you stop Microsoft SMTP Service, it does not accept new connections. When you pause Microsoft SMTP Service, every running SMTP virtual server will cease accepting new connections but will continue to service existing connections.

To start, stop, or pause Microsoft SMTP Service using Administrative Tools

  1. On the Start menu, point to Programs, point to Administrative Tools, and then click Component Services.
  2. In the console tree, select Services (local).
  3. In the details pane, right-click Microsoft SMTP Service, then click Start, Stop, or Pause.
Note When you restart Microsoft SMTP Service, all SMTP virtual servers that had been running when you shut down the service will automatically restart. However, an SMTP virtual server that was already stopped when the service was shut down will remain stopped, even after Microsoft SMTP Service is restarted.


Configure the SMTP Virtual Server

There are two identifying features for a Simple Mail Transfer Protocol (SMTP) virtual server: the display name and the IP address/TCP port combination. Setup assigns a Microsoft Management Console display name for the default SMTP virtual server. You can keep the name (Default SMTP Virtual Server) or change it using the following steps. You can also select the IP address that will be associated with this SMTP virtual server.

To identify an SMTP virtual server

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Rename on the Action menu.
  2. Type a new name for the virtual server name if you want to change it from the default.

    Note Do not use extended characters when naming your SMTP virtual server.

  3. Select the SMTP virtual server, and then click Properties on the Action menu.
  4. In IP address, select the IP address for this virtual server. The SMTP virtual server can respond to connection requests for all IP addresses configured on the computer. To identify the TCP port for each IP address configured for the virtual server, click Advanced. Port 25 is the SMTP standard TCP port and is recommended. More than one virtual server can use Port 25, provided they are associated with different IP addresses.
Note When you change an SMTP virtual server's configuration, you may want to use the Pause command. Pausing prevents new client connections but enables Microsoft SMTP Service to continue to process existing client connections and deliver queued messages.


Changing the Default Startup Setting

Change the Default Startup Setting

You can use Administrative Tools to configure the default state of Microsoft SMTP Service at startup.

  1. On the Start menu, point to Programs, point to Administrative Tools, and then click Component Services.
  2. In the console tree, select Services (local).
  3. In the details pane, right-click Microsoft SMTP Service, then click Properties.
  4. On the General tab, under Startup, select Automatic, Manual, or Disabled.


Create Additional SMTP Virtual Servers

Creating Additional SMTP Virtual Servers

In most cases, you should only need one Simple Mail Transfer Protocol (SMTP) virtual server. However, if you are hosting multiple domains and want to have more than one default domain, for example, you can create multiple SMTP virtual servers. To an end user, each SMTP virtual server appears as a separate server with a unique IP address/TCP port combination.

When you create an SMTP virtual server, you are prompted to enter a path to your home directory. This directory must be local to the computer the Microsoft SMTP Service is running on.

To create a new SMTP virtual server using Microsoft Management Console
  1. If the SMTP virtual server will be using a new IP address, configure an IP address by selecting Settings from the Start menu, and then clicking Network and Dial-Up Connections. See your Windows 2000 documentation for more information on Network and Dial-Up Connections.
  2. After the IP address is configured, select an existing SMTP virtual server in Microsoft Management Console. Then, on the Action menu, point to New, and then click Virtual Server.
  3. Follow the instructions of the New SMTP Virtual Server Wizard. Be sure to select an IP address/TCP port combination that is not being used by another SMTP virtual server. The recommended TCP port is 25, which is the SMTP standard TCP port. More than one virtual server can use the same TCP port provided they are configured with different IP addresses.
  4. Provided the default startup setting for Microsoft SMTP Service is set to Automatic, the new SMTP virtual server will start on its own. If it doesn't start, it's because you selected an IP address/TCP port combination that is already in use.
  5. Configure the new SMTP Virtual Server.


Set Connections

A connection is initiated whenever a message is sent to or received from a remote server.

Configure incoming connections

Note Designating the TCP port that Microsoft SMTP Service uses to receive incoming messages is done when you identify the Simple Mail Transfer Protocol (SMTP) virtual server.

To configure incoming connections

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the General tab, select the Limit number of connections to check box (the default is no limit) and set the following options.

    Option | Description
    Limit number of connections to | When the check box is selected, this option specifies the number of concurrent connections for incoming message delivery. The minimum is 1 connection. When the check box is not selected, no limit is imposed.
    Time-out (minutes) | Specifies the time allowed before an inactive connection is closed. The default is 10 minutes.

Configure outbound connections

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Delivery tab, click Outbound connections to open the Outbound connections dialog box.
  3. Under Outbound connections, select the check box (the default is no limit) and set the following options.

    Option | Description
    Limit number of connections to When the check box is selected, this option specifies the total number of simultaneous outbound connections to all remote domains that can exist at one time. The default is 1,000 connections. The minimum is 1.

    This setting can be used to improve system performance in conjunction with Limit number of messages per connection to on the Messages tab.
    Time-out (minutes) | Specifies the time allowed before an inactive connection is closed. The default is 10 minutes.
    Limit connections per domain to | When the check box is selected, this option limits connections to any single remote domain. The default is 100 connections. This number should be less than or equal to the value for the Limit connections to option.
    TCP port | Designates the TCP port used for outgoing transmissions. The default is port 25. The outgoing port setting can be the same as that for incoming transmissions, or it can be different.

For an overview of the processes involved in sending messages, see Concepts.


Enable Protocol Logging

Protocol logs track the commands the Simple Mail Transfer Protocol (SMTP) virtual server receives from SMTP clients over the network. You can choose which logging format Microsoft SMTP Service uses for recording information.

When setting up a log file, remember that the log formats and default file names are the same as those used by other services in Internet Information Services (IIS). If you choose the default names, all transactions for all services are recorded in the same file. You can set up a separate file for each service if you want to maintain separate records. If you set up the file in a different location from the default, be sure it is stored on a local drive, not on a network. Also, because logging is shared with IIS, some of the names are not SMTP specific.

For detailed information about transaction logging and formats, see Monitoring Message Transactions.

To enable logging that uses an ASCII text format

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the General tab, select Enable logging.
  3. In the Active log format drop-down menu, select a log format.
  4. Click Properties, and then on the General Properties tab, specify the log file size and location.
  5. If you have selected the World Wide Web Consortium (W3C) Extended Logging format, click the Extended Properties tab, and then select the items you want to track.

To enable logging that uses the ODBC format

  1. Set up an ODBC-compliant database.
  2. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  3. On the General tab, select Enable logging.
  4. In Active log format, select ODBC Logging.
  5. Click Properties, and then specify the log file size and location.


Set Up a Virtual Server for Clustering

Windows Clustering is a feature of Windows 2000 Advanced Server. See your Windows 2000 documentation for more information on installing Windows Clustering.

A server cluster is a group of independent computer systems, known as nodes, working together as a single system to ensure that mission-critical applications and resources remain available to clients. Server clusters provide high availability. High availability in a Simple Mail Transfer Protocol (SMTP) server cluster means that, if one virtual server fails, its work is dispersed to the remaining virtual servers in the cluster, ensuring mail service is not interrupted. The other benefit of server clusters is the failover of server resources, which is when a virtual server goes down and another one comes online to assumes its role.

In clustering, a node is a system that has a working installation of Windows 2000 Advanced Server and the Cluster service. Microsoft recommends creating a new virtual server on your node for clustering, rather than reconfiguring your default SMTP virtual server.

For more information about Windows Clustering and server clusters, see your Windows 2000 Advanced Server documentation. That documentation contains detailed information about setting up and administrating server clusters.

To set up an SMTP virtual server for clustering

  1. If necessary, change the default startup setting of the Microsoft SMTP Service to Manual.
  2. Before creating a new virtual server, start Microsoft Management Console, right-click the default SMTP virtual server, and then click Properties.
  3. On the General tab, click Advanced.
  4. Under IP address, double-click (All Unassigned).
  5. In the Identification dialog box, change the TCP port number from the default 25. Any unassigned port will work. It is important to change this port number to avoid conflicts with the new SMTP virtual server you will be creating for clustering. Type in the new port number (make sure it is unique) and click OK.
  6. Create a new SMTP virtual server. After it is created, you will have to manually start it. Make sure to use the default TCP port on the new virtual server, port 25.

    Important

    When you get to the Select Home Directory and Default Domain screen of the New SMTP Virtual Server Wizard, be sure to type paths to the shared resource that will be used in clustering. Do not type paths to a local hard drive.

  7. Run the IIS Synchronization command to synchronize all IIS information on your node with the other nodes in the server cluster. At a command prompt, go to the \WINNT\System32\Inetsrv directory on your node and type iissync servername, where servername is another node in the server cluster. See your IIS documentation for more information on the IIS Synchronization command.
  8. With the server cluster nodes synchronized, you may still have to check the TCP port numbers on your newly created SMTP virtual server as well as on the default virtual server. Specifically, when viewing your local node from other nodes in the server cluster, make sure the TCP port settings are identical to how you set them on the local node. On all nodes, the default SMTP virtual server should no longer be pointing to the default port (25), while the new SMTP virtual server should be assigned port 25. Settings must be identical on every node for clustering to work.
  9. Start Cluster Administrator. Follow the wizard and associate a resource type to the new SMTP virtual server.

    Note In the Parameters dialog box, be sure to select your new SMTP virtual server from the drop-down menu, and not the default SMTP virtual server. See your Windows 2000 Advanced Server documentation for more information about Cluster Administrator.


Set Security Options

This section describes the available SMTP virtual server security options:

  • About Security Settings
  • Setting Operator Permissions
  • Requiring Authentication for Incoming Connections
  • Configuring Authentication for Outbound Messages
  • Requiring TLS Encryption
  • Setting IP Access Restrictions to the Server
  • Removing Relay Restrictions from a Virtual Server


About Security Settings

You can choose how secure you want the Simple Mail Transfer Protocol (SMTP) virtual server to be and use the security options on the two security tabs to obtain the level of protection needed. Settings on the tabs apply to all domains on the virtual server.

Tab | Settings
Security | Designates the user accounts that have operator permissions to run Microsoft SMTP Service. Operators have the ability to configure SMTP virtual server properties.
Access | Contains settings to require authentication and the use of Transport Layer Security (TLS) for all incoming connections. You can also grant or deny access to specific computers or networks.


Setting Operator Permissions

You can designate which user accounts can have operator permissions for the Simple Mail Transfer Protocol (SMTP) virtual server. After Windows 2000 Server accounts are set up, you can grant permissions by selecting the account from a list. These permissions can be rescinded by removing the account from the list of virtual server operators.

To assign operator permissions

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Security tab, click Add to open the Select Users or Groups dialog box.
  3. Select a Windows 2000 Server account, click Add, and then click OK. The selected account will now appear in Operators.

To remove operator permissions

You can also remove operator permissions from the Windows 2000 Server user accounts that are listed in Operators.

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Security tab, click the operator you want to remove.
  3. Click Remove.


Requiring Authentication for Incoming Connections

There are three authentication methods available. You can choose one, two, or all three methods. All three are set by default.

Authentication option | Description
Anonymous access | An account name or password is not required. You can use this option to disable authentication for the Simple Mail Transfer Protocol (SMTP) virtual server.
Basic authentication | An account name and a password are sent using clear text. Specify a Windows domain that is appended to the account name for authentication.
Integrated Windows Authentication | A Windows account name and password are authenticated using this option.

To disable authentication for incoming messages

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Access tab, under Access control, click Authentication to open the Authentication dialog box.
  3. Select Anonymous access, and then click to clear the remaining check boxes for the other options.

To set clear text authentication for incoming messages

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Access tab, under Access control, click Authentication to open the Authentication dialog box.
  3. Select Basic authentication.
  4. In Default domain, type a Windows domain name. This default domain differs from the SMTP virtual server default domain.

To use Integrated Windows Authentication to authenticate incoming messages

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Access tab, under Access control, click Authentication to open the Authentication dialog box.
  3. Select Integrated Windows Authentication.


Configuring Authentication for Outbound Messages

You can configure the Simple Mail Transfer Protocol (SMTP) virtual server to provide the authentication credentials required by a receiving server. There are three types of authentication available: anonymous, basic (clear text), and Integrated Windows Authentication. Anonymous requires no authentication. With the clear text option, the account name and password of the server you're connecting to are transmitted in clear text. The Integrated Windows Authentication option requires a Windows account name and password.

The option set here can be overridden for a specific remote domain. This enables you to set the virtual server authentication level to handle most of the transmissions, while allowing exceptions for individual addresses. The following table describes several configuration examples.

Note For information on encrypting outgoing messages, see Requiring TLS encryption.

SMTP transmissions | Authentication option
Messages are commonly sent to multiple addresses. | Disable authentication for the SMTP virtual server. If attempts to deliver messages to an address fail because of authentication requirements, add a remote domain for the address. Then enable authentication for the domain at the same level required by the server.
Messages are commonly sent to one address, which requires authentication. | Determine what level of authentication is required to connect. Then enable authentication for the SMTP virtual server using the same level. If you want to then send messages to other addresses, set up remote domains and set different authentication options. If you use this option, it is likely that the account name used is the one that identifies the computer set up as the smart host.

To disable authentication for outgoing messages

  1. On the Delivery tab, click Outbound Security to open the Outbound Security dialog box.
  2. Click Anonymous access.
  3. Clear all other options.

To set Basic authentication for outgoing messages

  1. On the Delivery tab, click Outbound Security to open the Outbound Security dialog box.
  2. Click Basic authentication.
  3. Under User name and Password, type the account name and password that will grant you access to the computer you are connecting to.

To set Integrated Windows Authentication for outgoing messages

  1. On the Delivery tab, click Outbound Security to open the Outbound Security dialog box.
  2. Select Integrated Windows Authentication.
  3. Under Account and Password, type a Windows account name and password that will grant you access to the computer you're connecting to.


Requiring TLS Encryption

You can require that all clients use Transport Layer Security (TLS) encryption, a generic security protocol similar to Secure Sockets Layer (SSL), to connect to the default Simple Mail Transfer Protocol (SMTP) virtual server. This option secures the connection, but it is not used for authentication.

To use TLS encryption for the virtual server, you must create key pairs and configure key certificates. Clients can then use TLS to encrypt the session with Microsoft SMTP Service, and thus all messages sent. Microsoft SMTP Service can also use TLS to encrypt sessions with remote servers.

To create and manage key certificates

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Access tab, under Secure communication, click Certificate to set up new key certificates and manage installed key certificates for the SMTP virtual server.

Key pairs consist of a number of bits that indicate the key's security level. You can strengthen security by increasing the encryption level from 40 bits (the default) to 128 bits. The greater the number of bits, the more difficult the item is to decrypt. Users attempting to secure access must use the same encryption level that you set, or messages will be returned with a non-deliver report (NDR).

To set TLS encryption levels for the server

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Access tab, under Access control, click Authentication to open the Authentication dialog box.
  3. Select Basic authentication.
  4. Select the Require TLS encryption check box.

Note There are two additional TLS options available. To use TLS for all outgoing connections, click Outbound Security on the Delivery tab, and then click TLS encryption. Also, if a server you commonly connect to requires the use of TLS for all incoming connections, you can create a remote domain and click TLS encryption when creating the domain.


Setting IP Access Restrictions to the Server

You can grant or deny Simple Mail Transfer Protocol (SMTP) virtual server access to specific IP addresses. By default, the SMTP virtual server is accessible to all IP addresses. You can set restrictions by specifying a single IP address, a group of addresses using a subnet mask, or a Windows 2000 Server domain name.

To set IP address access restrictions

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Access tab, under Connection control, click Connection to open the Connection dialog box.
  3. Select either Only the list below or All except the list below.
  4. To add to the list of computers, click Add. The Computer dialog box will open.
  5. To delete from the list of computers, select a listing and then click Remove.


Setting or Removing Relay Restrictions from a Virtual Server

By default, Microsoft SMTP Service blocks computers from relaying unwanted mail through the virtual server. To enable relay access through the Simple Mail Transfer Protocol (SMTP) virtual server, click Relay on the Access tab. By default, all computers are blocked except those that meet the authentication requirements designated in the Authentication dialog box, which you can view by clicking Authentication on the Access the tab.

You can also allow messages to be relayed to a specific remote domain; see Configure Remote Domains for more information. The domain setting overrides the SMTP virtual server setting.

Note If your virtual server is on the Internet, you shouldn't allow relaying in order to avoid propagating unsolicited e-mail.

To remove relay restrictions from a virtual server

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Access tab, under Relay restrictions, click Relay. The Relay Restrictions dialog box will open.
  3. Click either Only the list below or All except the list below.
  4. Click Add to open the Computer dialog box and add exceptions to the global access option you chose in step 3.

You can specify the following options in the Relay Restrictions dialog box.

Option | Description
Only the list below | Only the computers listed below can relay messages through the SMTP virtual server.
All except the list below | All computers can relay messages through the SMTP virtual server, except those listed below. This is set by default, along with Allow any computers which successfully authenticate to relay, regardless of the list above.
Add and Remove | Adds and removes entries to the list of those computers either granted or denied relay access.
Allow all computers which successfully authenticate to relay, regardless of the list above | Allows computers that meet authentication requirements set in the Authentication dialog box to relay messages to the SMTP virtual server. This is set by default.


Manage Messages

This section describes how to set connection limits to maximize performance, how to set limits for message size and number of recipients, and how to manage undeliverable messages. It contains:

  • Limiting the Number of Messages per Connection
  • Setting Message Size Limits
  • Setting Recipient Limits
  • Storing NDRs


Limiting the Number of Messages per Connection

This option enables you to limit the number of messages sent in a single connection. It also provides a method to improve system performance by allowing the use of multiple connections to deliver messages to a remote domain. When the set limit is reached, a new connection is automatically opened and the transmission continues until all messages are delivered.

For example, if you commonly send a large number of messages to certain remote domains, you could set the Limit number of messages per connection to value to a relatively small number, such as 20. As a result, when sending 100 messages in one session, Microsoft SMTP Service immediately opens a new connection after the first 20 are sent, another after the next 20 are sent, and so on. In this case, there could be up to five simultaneous connections delivering queued messages to one destination. Message delivery would be faster, because fewer messages are delivered simultaneously, instead of in one long stream over one connection.

To determine a value for the limit, review the Messages Sent/sec performance counter for the SMTP Server object in System Monitor. The Limit number of messages per connection to value should be less than the value indicated by the performance counter. If the counter indicates a value of 30, and you set your maximum connections to 50, no simultaneous connection would be opened because the server wouldn't exceed 30 messages per second. It would work as though the messages were sent in one long stream over one connection. This setting affects outgoing messages only. You can use it to increase your server output speed, but it has no effect on the rate that other servers process incoming messages.

To limit the number of messages sent in one connection

  1. In Microsoft Management Console, select the Simple Mail Transfer Protocol (SMTP) virtual server, and then click Properties on the Action menu.
  2. On the Messages tab, select Limit number of messages per connection to, and then type a value in the box. The default is 20. The maximum is 2000000000.


Setting Message Size Limits

There are two message size limit settings. The first, Limit message size to, is a preferred message limit for the virtual server. This is what Microsoft SMTP Service will advertise as the maximum message size this Simple Mail Transfer Protocol (SMTP) virtual server will accept. If a mail client sends a message that exceeds the limit, they will get an error. If a remote server supports EHLO, it will detect the advertised maximum message size value when it connects to the SMTP virtual server and won't attempt to deliver a message that exceeds the limit. Instead it will simply send a non-delivery report (NDR) to the sender of the message. A remote server that doesn't support EHLO will try to send a message that exceeds the size limit, but will still end up sending an NDR to the sender when the message doesn't go through.

The Limit session size to is the maximum amount of data accepted during the total connection. This is the sum of all messages sent during the connection (applying to the message body only).

To set message size limits

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Messages tab, select Limit message size to (KB), and then type a value (in kilobytes) for the maximum size of a message. The default is 2048 KB. The minimum value is 1 KB.
  3. On the Messages tab, select Limit session size to (KB), and then type a value to indicate the maximum total size (in kilobytes) of all messages in a given connection. This number will always be larger than the maximum message size and should be set carefully because the connecting message transfer agent (MTA) is likely to resubmit the message repeatedly. The default size is 10240 KB. This value should be greater than or equal to the value entered for Limit message size to (KB).


Setting Recipient Limits

You can determine the maximum number of recipients for a single message sent in one connection. The default is 100, which is the minimum number specified in Request for Comment (RFC) 821. Many clients return messages with a non-delivery report (NDR) after an error message is received, indicating that the maximum number of recipients has been exceeded. Microsoft SMTP Service does not return messages in this instance. It opens a new connection immediately and processes the remaining recipients. For example, if the recipient limit is set to 100 and a message with 105 recipients is received, the first 100 are delivered in one connection. Then a new connection is opened and the message is processed for the remaining five recipients.

To set recipient limits

  1. In Microsoft Management Console, select the Simple Mail Transfer Protocol (SMTP) virtual server, and then click Properties on the Action menu.
  2. On the Messages tab, in Limit number of recipients per message to, type a number to represent the recipient limit. To impose no limit, click to clear the check box.


Storing NDRs

When a message is undeliverable, Microsoft SMTP Service returns it to the sender with a non-delivery report (NDR). You can also designate that copies of the NDR be sent to a location of your choice. If the NDR cannot be delivered to the sender, a copy of the message is put in the Badmail directory.

All NDRs go through the same delivery process as other messages, including attempts to resend the message. If the NDR has reached the retry limit and cannot be delivered to the sender, a copy of the message is placed in the Badmail directory. Messages placed in the Badmail directory cannot be delivered or returned.

To set a storage location for NDRs

  1. In Microsoft Management Console, select the Simple Mail Transfer Protocol (SMTP) virtual server, and then click Properties on the Action menu.
  2. On the Messages tab, in Send copy of Non-Delivery report to, type the e-mail address of the mailbox you want to use to store copies of the NDRs. This can be any valid SMTP e-mail address, and is optional. To disable the feature, clear the text box .
  3. In Badmail directory, type the directory you want to use to store undeliverable messages. The default location is root:\Inetpub\Mailroot\Badmail. Click Browse to select another folder. You can designate a different directory, provided it is on the same computer as Microsoft SMTP Service.


Deliver Messages

After a connection has been opened and the receiving server has acknowledged that it is ready to receive data, messages can be transmitted for delivery. This section describes the settings that determine how delivery occurs, including route options and the number of times to attempt delivery:

  • About Message Delivery Options
  • Configuring Retry Attempts and Intervals
  • Setting the Message Hop Count
  • Setting the Masquerade Domain
  • Setting a Fully Qualified Domain Name
  • Configuring a Smart Host
  • Enabling a Reverse DNS Lookup


About Message Delivery Options

Use the Delivery tab to set all delivery and routing options. Settings can be grouped into three categories, which are listed below.

Routing Options

  • Smart host: Designates a server through which to route all outgoing messages.
  • Message hop count: Determines the maximum number of servers a message is routed through before being considered undeliverable.
  • Fully qualified domain name (FQDN): Clarifies the address to use in message exchanger (MX) records.

Transmission Options

  • Retry attempts and retry interval: Determines how many times to resend a message, and at what intervals, before the message is considered undeliverable.
  • Delivery using Pickup directory: Allows you to transmit messages composed as a text file.

Security Options

  • Outbound security: Allows you to use authentication and Transport Layer Security (TLS) encryption for outgoing messages.
  • Reverse DNS lookup: Verifies that the message actually originated from the computer and the domain listed in the From field.
  • Masquerade domains: Replaces any local domain name used in any Mail From lines in the protocol with a different domain name. This is the name you want stamped on outgoing messages.


Configuring Retry Attempts and Intervals

If a message cannot be delivered on the first attempt, Microsoft SMTP Service sends it again from the Queue directory after a specified time. You can set the interval between delivery attempts. You can also designate the number of times to attempt to deliver a message. After the limit is reached, the message is returned to the sender with a non-delivery report (NDR) and copies of the message and NDR are sent to the location you designate. The NDR is placed in the Queue directory and goes through the same delivery process as messages. When the NDR reaches the maximum number of retry attempts, the NDR and message are sent to the Badmail directory.

To configure retry attempt and interval settings

  1. In Microsoft Management Console, select the Simple Mail Transfer Protocol (SMTP) virtual server, and then click Properties on the Action menu.
  2. Click the Delivery tab.
  3. In First retry interval (minutes), type a value for the amount of time to attempt delivery before posting the first notification. The default is 15 minutes.
  4. In Second retry interval (minutes), type a value for the amount of time to attempt delivery before posting the second notification. The default is 30 minutes, which is 30 minutes after the First retry interval.
  5. In Third retry interval (minutes), type a value for the amount of time to attempt delivery before posting the third notification. The default is 60 minutes, which is 60 minutes after the Second retry interval.
  6. In Subsequent retry interval (minutes), type a value for the amount of time to attempt delivery before posting a notification. The default is 240 minutes.

Delay Notification

To allow for network delays, you can set a delay period to expire before sending the delivery notification. The minimum value is 1 minute, the default is 12 hours, and the maximum value is 9999 days. Use the drop-down menu beside the value field to use minutes, hours, or days.

Expiration Timeout

Type a value for messages that have not been delivered after all retries and delays have expired. The minimum value is 1 minute, the default is 2 days, and the maximum value is 9999 days. Use the drop-down menu beside the value field to use minutes, hours, or days.


Setting the Message Hop Count

When a message is delivered, it may be routed to a number of servers before reaching its final destination. You can designate how many servers the message is allowed to pass through. This is called the hop count.

After the hop count is set, the Simple Mail Transfer Protocol (SMTP) server counts the hops listed in the Received lines of the message header. When the number of Received fields exceeds the maximum hop count setting, the message is returned to the sender with a non-delivery report (NDR).

To set the message hop count

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Delivery tab, click Advanced to open the Advanced Delivery dialog box.
  3. In Maximum hop count, type a value for the number of hops a message can take between the source and destination servers. The default is 15 hops.


Setting the Masquerade Domain

The masquerade domain replaces any local domain name used in any Mail From lines in the protocol. The replacement occurs on the first hop only.

  1. In Microsoft Management Console, select the Simple Mail Transfer Protocol (SMTP) virtual server, and then click Properties on the Action menu.
  2. On the Delivery tab, click Advanced to open the Advanced Delivery dialog box.
  3. In Masquerade domain, type a domain name that you want to appear in message headers, instead of the actual name of the domain.

    Note All replies to such messages will be routed through the SMTP virtual server that uses the masquerade domain.


Setting a Fully Qualified Domain Name

An e-mail domain must be able to be resolved through Domain Name System (DNS). There are two DNS records that are used to resolve an e-mail domain. In most cases, a mail exchanger (MX) record is set up to associate an e-mail domain with the fully qualified domain name (FQDN) of one or more Simple Mail Transfer Protocol (SMTP) virtual servers that serve that domain. Each SMTP server referenced in the MX record must have an address (A) record. The A record maps a given FQDN to its IP address.

It's possible to just have an A record set up for an e-mail domain. In this scenario, the A record maps the domain to the IP address or addresses of the SMTP virtual server or servers that serve that domain. Adding an MX record, however, is recommended over using an A record by itself, because an MX record allows an SMTP administrator to specify an ordered list of servers to use for clients sending mail to that e-mail domain. Microsoft SMTP Service always checks first for an MX record before falling back to an A record, so setting up MX records on your virtual server can improve performance. And in some cases the A record is used for other purposes, such as HTTP, while the MX record is generally used only for SMTP. The MX record allows one server to handle http://microsoft.com (HTTP clients use the A record) and another server to handle someone@microsoft.com (SMTP clients use the MX record).

On Microsoft SMTP Service, there are two options for specifying an FQDN. You can use the name specified on the Network Identification tab of the System Properties in Control Panel, or you can specify a unique FQDN for the SMTP virtual server you are configuring.

At startup, the name designated on the Network Identification tab of the System Properties is automatically used for the FQDN. If you change the name (either manually or by joining a Windows 2000 domain), the new name is automatically used for the FQDN the next time the computer is restarted. No action is required to update the FQDN for the virtual server.

To override the automatic use of the computer and domain names on the Network Identification tab, change the FQDN in the Advanced Delivery dialog box, accessed through the Delivery tab. Microsoft SMTP Service can then use the designated name instead of the one specified on the Network Identification tab.

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.
  2. On the Delivery tab, click Advanced to open the Advanced Delivery dialog box.
  3. In Fully-qualified domain name, type the FQDN.


Configuring a Smart Host

You can route all outgoing messages for remote domains through a smart host instead of sending them directly to the domain. This enables you to route messages over a connection that may be more direct or less costly than other routes. The smart host is similar to the route domain option for remote domains. The difference is that, after a smart host is designated, all outgoing messages are routed to that server. With a route domain, only messages for the remote domain are routed to a specific server.

If you set up a smart host, you can still designate a different route for a remote domain. The route domain setting overrides the smart host setting.

Note You can identify the smart host by fully qualified domain name (FQDN) or an IP address (but if you change the IP address, you would have to change it on every virtual server as well). If you use an IP address, enclose it in brackets ([ ]) to increase system performance. Microsoft SMTP Service checks first for a server name, and then an IP address. The brackets identify the value as an IP address, so the DNS lookup is bypassed.

To set up a smart host

  1. In Microsoft Management Console, select the Simple Mail Transfer Protocol (SMTP) virtual server, and then click Properties on the Action menu.
  2. On the Delivery tab, click Advanced to open the Advanced Delivery dialog box.
  3. In Smart host, type the name of the smart host server. You can type a string to represent a name or enter an IP address.
  4. If you want Microsoft SMTP Service to attempt to deliver remote messages directly before forwarding them to the smart host server, select the Attempt direct delivery before sending to smart host check box. The default is to send all remote messages to the smart host, not to attempt direct delivery.


Enabling Reverse DNS Lookup

If you select this option, Microsoft SMTP Service will attempt to verify that the client’s IP address matches the host/domain submitted by the client in the EHLO/HELO command. If the reverse DNS lookup is successful, the RECEIVED header will remain intact. If the verification is unsuccessful, "unverified" appears after the IP address in the RECEIVED header of the message.

Note Because this feature verifies addresses for all incoming messages, its use could affect Microsoft SMTP Service performance. Clear the check box to disable the feature.

To enable reverse DNS lookup

  1. In Microsoft Management Console, select the Simple Mail Transfer Protocol (SMTP) virtual server, and then click Properties on the Action menu.
  2. On the Delivery tab, click Advanced to open the Advanced Delivery dialog box.
  3. Select the Perform reverse DNS lookup on incoming messages check box.


Create or Delete a Domain

Domains in Microsoft SMTP Service are different from DNS domains and Windows 2000 Server domains. Microsoft SMTP Service domains are used for organizing messages for delivery.

This section includes general information about domains and basic procedures. It contains:

  • About Domains
  • Creating a Domain
  • Deleting a Domain

Related information is available on the following topics:

  • Local domains; see Configure Local Domains.
  • Remote domains; see Configure Remote Domains


About Domains

The Simple Mail Transfer Protocol (SMTP) virtual server has at least one domain—the default local domain. You can add more domains and configure them to be local or remote. You can delete any domain except the default domain.

Local Domains

A local domain is a DNS domain that is serviced by the local SMTP server. Any message with a local domain name that arrives at an SMTP server must be delivered locally to a Drop directory or returned to the sender with a non-delivery report (NDR). Local domains are sometimes referred to as service domains or supported domains. E-mail addresses with local domain names are often referred to as local addresses.

If the domain is local, you can designate it as default or alias. There is one default domain. It is used to stamp message headers that lack a domain specification. An alias domain is an alias of the default domain. If you add a domain and assign it as the new default, the previous default changes to an alias domain.

Remote Domains

Domains that are not local are known as remote or non-local domains, and e-mail addresses with remote domain names are referred to as non-local addresses. Microsoft SMTP Service looks up remote domains in DNS.

If you want to set unique delivery requirements for a specific remote domain, you can add a remote domain and configure it accordingly. For example, you can add a remote domain and require that Microsoft SMTP Service always use Transport Layer Security (TLS) encryption in sessions with that domain. Or, you can change the routing so that messages sent to one remote domain are routed to another remote domain. Use the Domain Properties dialog box to configure domains.


Creating a Domain

You can create two types of domains in Microsoft SMTP Service: alias and remote. Alias domains allow you to create secondary domains that point to the default domain and use its settings, including the Drop directory. Any message sent to an alias domain is stamped with the default domain name.

Remote domains can be set for domains you commonly send messages to. For each remote domain, you can set a predetermined delivery route and require that Transport Layer Protocol (TLS) encryption be used in all sessions with that domain. You can also use a wildcard character in the name so that all inclusive domains for the domain you're creating use the same settings. Use an asterisk (*) as the first character, followed by a period (.). For example, you can use the asterisk as a wildcard in the following format:

*.microsoft.com

To create an alias domain in Microsoft Management Console

  1. In Microsoft Management Console, expand the Simple Mail Transfer Protocol (SMTP) virtual server.
  2. Select Domains.
  3. On the Action menu, point to New, and then click Domain.
  4. Use the New Domain Wizard to set up a local (alias) domain.

To create a remote domain in Microsoft Management Console

  1. In Microsoft Management Console, expand an SMTP virtual server.
  2. Select Domains.
  3. On the Action menu, point to New, and then click Domain.
  4. Use the New Domain Wizard to set up a remote domain.
  5. To designate a route domain, set authentication for outgoing messages or use TLS encryption, select the domain in the details pane, click Properties on the Action menu, and then specify the options.


Deleting a Domain

You can delete domains that you have added. You cannot delete the default domain, unless you first add an alias domain and then make that domain the default domain.

To delete a domain

  1. In Microsoft Management Console, expand the Simple Mail Transfer Protocol (SMTP) virtual server.
  2. Expand Domains.
  3. In the details pane, select the domain you want to delete.
  4. On the Action menu, click Delete.


Configure Local Domains

This section describes how to set options for existing local domains. It contains:

  • Designating a Default Domain
  • Configuring an Alias Domain
  • Designating a Drop Directory


Designating a Default Domain

The default domain is used to stamp messages from addresses that do not have a domain. A Simple Mail Transfer Protocol (SMTP) virtual server can have one default domain that cannot be deleted.

To name a default domain, you can use the name specified on the DNS tab for the TCP/IP protocol in the Network application in Control Panel. This domain name is also used for all other services. Alternatively, you can specify a unique domain to serve as the default for Microsoft SMTP Service only.

At startup, the name designated on the DNS tab for the TCP/IP protocol in the Network application in Control Panel is automatically used for the default domain. If you change the name on the DNS tab, the new name is used automatically for the default domain the next time the service is started. No action is required to update the default domain for Microsoft SMTP Service.

To override the automatic use of the network domain, specify the default domain on the General tab. Microsoft SMTP Service can then use the designated name instead of the network domain.

To rename the default domain

  1. Expand the SMTP virtual server, and then click Domains.
  2. Right-click a domain name in the details pane, and then click Rename.
  3. Enter a new name for the default domain.


Configure an Alias Domain

You can set up alias domains that use the same settings as the default domain. Messages received by Microsoft SMTP Service for the alias domain are placed in the Drop directory designated for the default domain.

To configure an alias domain

  1. Expand the Simple Mail Transfer Protocol (SMTP) virtual server, and then right-click Domains.
  2. Point to New, and then click Domain. The New Domain Wizard starts.
  3. In the New Domain Wizard, click Local, and then click Next.
  4. Type a name for the alias domain, and then click Finish.


Designating a Drop Directory

For the default domain, you must identify a directory in which to drop all incoming messages. Microsoft SMTP Service places messages for alias domains in the Drop directory used for the default domain. You can designate any directory as the Drop directory, provided it is local to the computer for Microsoft SMTP Service and is not already assigned as the Pickup directory. By default, this is a subdirectory of the SMTP Mailroot directory.

To designate a Drop directory

  1. In the details pane, right-click the default domain, and then click Properties.
  2. In Drop directory, type the directory used to drop all incoming messages. The default location is root:\Inetpub\Mailroot\Drop. Or click Browse and select the directory. Make sure that you select the Drop directory and not the Pickup directory.


Configure Remote Domains

You can set unique delivery requirements for a specific remote domain by adding a domain and configuring it accordingly. For example, you can set a predetermined delivery route, set authentication, and require that Transport Layer Security (TLS) encryption be used on all connections to the domain. If the remote domain is not specifically configured, Microsoft SMTP Service will not perform any of these operations when delivering to this domain. It will, however, complete a normal DNS lookup. This section contains:

  • Setting a Route Domain
  • Enabling TLS Encryption for a Remote Domain
  • Configuring Authentication for a Remote Domain
  • Configuring ATRN for a Remote Domain


Setting a Route Domain

You can specify a delivery path that may be faster and less expensive than a direct link. Type the name or IP address of the server through which you would like to route messages for this remote domain. If you enter an IP address, enclose the address in brackets ([ ]) to improve system performance. This setting overrides the smart host setting on the Delivery tab.

To designate a route domain

  1. Right-click the Simple Mail Transfer Protocol (SMTP) virtual server, point to New, and then click Domain.
  2. Use the New Domain Wizard to create a remote domain. In the details pane, right-click the new remote domain, and then click Properties.
  3. On the General tab, under Route domain, select Forward all mail to smart host, and then type the name or IP address of the server through which you would like to route messages for this remote domain.

    Note You can identify the smart host by fully qualified domain name (FQDN) or an IP address (but if you change the IP address you would have to change it on every virtual server as well). If you use an IP address, enclose it in brackets to increase system performance. Microsoft SMTP Service checks first for a server name, then an IP address. The brackets identify the value as an IP address, so the DNS lookup is bypassed.


Enabling TLS Encryption for a Remote Domain

If you choose not to use Transport Layer Security (TLS) encryption for the Simple Mail Transfer Protocol (SMTP) virtual server, but you select the TLS encryption check box for this remote domain, SMTP will use it when connecting to the remote domain. Domain configurations always override the virtual server configurations.

To enable TLS encryption for a remote domain

  1. Expand the SMTP virtual server, and then click Domains.
  2. In the details pane, click the remote domain you want to change. On the Action menu, click Properties.
  3. On the General tab, click Outbound Security to open the Outbound Security dialog box.
  4. Select Integrated Windows Authentication.
  5. Type the Windows account and password.
  6. Click OK.
  7. Select the TLS encryption check box, and then click OK.
Note If the remote domain does not support TLS encryption, all messages will be returned with a non-delivery report (NDR).


Configuring Authentication for a Remote Domain

You can configure the Simple Mail Transfer Protocol (SMTP) virtual server to provide the authentication credentials required by the remote domain. There are two types of authentication available: basic (clear text) and Integrated Windows Authentication. With the basic option, the account name and password of the server you're connecting to is transmitted in clear text. The Integrated Windows Authentication option requires a Windows account name and password. You can also disable authentication, which is the default option.

The selected option overrides the SMTP virtual server authentication setting on the Access tab. The following table describes several configuration examples.

SMTP virtual server transmissions | Authentication option
Messages are commonly sent to multiple addresses. | Disable authentication for the SMTP virtual server. If attempts to deliver messages to an address fail because of authentication requirements, add a remote domain for the address. Then enable authentication for the domain at the same level required by the server.
Messages are commonly sent to one address, which requires authentication. | Determine what level of authentication is required to connect. Then enable authentication for the SMTP virtual server using the same level. If you want to then send messages to other addresses, set up remote domains and set different authentication options. If you use this option, it is likely that the account name used is the one that identifies the computer set up as the smart host.

To disable authentication for outgoing messages

  1. Expand the SMTP virtual server, and then click Domains.
  2. In the details pane, click the remote domain you want to change. On the Action menu, click Properties.
  3. On the General tab, click Outbound Security to open the Outbound Security dialog box.
  4. Select Anonymous access, and then click OK.

To set Basic authentication for outgoing messages

  1. Expand the SMTP virtual server, and then click Domains.
  2. In the details pane, click the remote domain you want to change. On the Action menu, click Properties.
  3. On the General tab, click Outbound Security to open the Outbound Security dialog box.
  4. Click Basic authentication.
  5. Type the user name and password of the computer you're connecting to.
  6. Click OK.

To set Integrated Windows Authentication for outgoing messages

  1. Expand the SMTP virtual server, and then click Domains.
  2. In the details pane, click the remote domain you want to change. On the Action menu, click Properties.
  3. On the General tab, click Outbound Security to open the Outbound Security dialog box.
  4. Click Integrated Windows Authentication.
  5. Type the Windows account name and password.
  6. Click OK.


Configuring ATRN for a Remote Domain

Microsoft SMTP Service can hold mail for clients that connect periodically to download messages. In this case, the client issues an ATRN command. The remote Simple Mail Transfer Protocol (SMTP) service then starts sending messages to the ATRN domain. You can create a remote domain for an address that periodically reviews messages and enable ATRN for the domain.

To enable ATRN transmissions for a remote domain

  1. Expand the SMTP virtual server, and then click Domains.
  2. In the details pane, click the remote domain you want to change. On the Action menu, click Properties.
  3. Click the Advanced tab, and then select the Queue messages for remote triggered delivery check box.
  4. Click Add or Remove as necessary to select Windows 2000 accounts that will be allowed to use the ATRN command in this domain.


Configure LDAP Server Connections

Lightweight Directory Access Protocol (LDAP) is an Internet protocol that enables you to access directory information from an LDAP server. With permission to use LDAP, you can browse, read, and search directory listings on the LDAP server.

With the LDAP Routing tab, you can configure Microsoft SMTP Service so that it will consult an LDAP server to resolve senders and recipients. For example, you can use Windows 2000 Active Directory as an LDAP server, and use Active Directory Users and Computers to create a group mailing list that is automatically expanded on the Simple Mail Transfer Protocol (SMTP) virtual server.

This section describes how to configure Microsoft SMTP Service as an LDAP client so you can gain access to directory information on an LDAP server. It contains:

  • Preliminary Steps to Configuring LDAP Connections
  • Selecting a Schema Type
  • Determining the Authentication Level
  • Setting LDAP Routing Information


Preliminary Steps to Configuring LDAP Connections

Because some settings on the LDAP Routing tab affect others, it is recommended that you plan before configuring Lightweight Directory Access Protocol (LDAP).

  1. Determine the schema type to use.
  2. Determine the level of authentication that will be needed to bind to the LDAP directory. If the LDAP server you are connecting to does not require authentication, no account information is necessary.
  3. Determine if you need to specify a naming context. This may be necessary if the user accounts reside in a subcontainer within the LDAP directory. Specifying a naming context may allow the LDAP directory to return results more quickly, and, in some cases, is necessary if there are multiple naming contexts on the LDAP server.


Selecting a Schema Type

The following schema types are available from the Schema drop-down menu on the LDAP Routing tab.

Schema type | Description
Active Directory | Select this option to use Windows 2000 Active Directory as the Lightweight Directory Access Protocol (LDAP) server. To manage mailboxes, use Active Directory Users and Computers.
Site Server Membership Directory | Use this option when you have installed Microsoft LDAP Service as part of Microsoft Commercial Internet System 2.0 Mail and you are using it to manage mailboxes.
Exchange LDAP Service | Select this option to use a Microsoft Site Server 3.0 or later LDAP server to manage mailboxes.


Determining the Authentication Level

There are four binding types that determine the level of authentication used for connections. The option selected affects other options.

Binding type | Description
Anonymous | No authentication is required. Select this option when the server does not require account and password information.
Plain text | This option allows the transmission of account information and passwords in clear text. When this option is selected, account and password information is required.
Windows SSPI | The client and server negotiate to determine which level of authentication is acceptable by both, and use the strongest method available. When this option is selected, account and password information is required.
Service accounts | Uses the account information of the user under which Microsoft SMTP Service is running. This is controlled by Component Services, under Administrative Tools.


Setting LDAP Routing Information

  1. Select Properties for the Simple Mail Transfer Protocol (SMTP) virtual server you want in Microsoft Management Console.
  2. Click the LDAP Routing tab.
  3. Select the Enable LDAP routing check box.
  4. Set options as described in the following table.
Option | Description
Server | Type the name of the computer running the Lightweight Directory Access Protocol (LDAP) directory. The field is not applicable when you use the Exchange LDAP Service schema type, as the service will find a nearby server and use it automatically.
Schema | Select a schema type.
Binding | Select the authentication method to use when binding to the LDAP server. Plain text transmits passwords in clear text. To use the strongest authentication method available for the SMTP virtual server, select Windows SSPI. For no authentication, use Anonymous, which is the default. Service accounts will use the account information of whomever is trying to bind to the LDAP server.
Domain | Type the domain of the account you want to use to bind to the LDAP directory. This option applies if you select the Plain text or Windows SSPI binding types.
User name | Type the distinguished name (DN) of the account you want to use to bind to the LDAP directory. For example, cn=user1,ou=users,o=company. This option applies if you select the Plain text or Windows SSPI binding types.
Password | Type the password used for logging on to the directory service. This option applies if you select the Plain text or Windows SSPI binding types.
Base | Type the distinguished name of a container in the directory service you're accessing. This setting specifies where you want Microsoft SMTP Service to start searching in the LDAP directory. The search will begin in the container and will continue to subcontainers if necessary.


Concepts

Mail delivery is a common feature of Internet sites. Internet messages are generally transmitted and delivered using the Simple Mail Transfer Protocol (SMTP). You can use Microsoft SMTP Service to configure your hardware to deliver messages over an intranet or the Internet.

Microsoft SMTP Service supports basic SMTP delivery functions. It also provides features that allow you to customize your configuration to accommodate unique delivery and security requirements.

This section contains general background information about Microsoft SMTP Service.

  • Microsoft SMTP Service Overview
  • Key Features
  • Components
  • Process Overview


Microsoft SMTP Service Overview

This section provides general information about configuring Microsoft SMTP Service. It contains:

  • Tabs
  • Improving System Performance


Tabs

There are six tabs used to configure Microsoft SMTP Service and are described in the following table.

Tab | Description
General | Contains settings that determine how the server connects to other servers to transmit and receive messages. It also can be used to enable logging.
Access | Contains settings to require authentication and the use of Transport Layer Security (TLS), which is a type of Secure Sockets Layer (SSL) encryption for all protocols, for all incoming connections. You can also grant or deny both general and relay access to specific computers or networks.
Messages | Configures message limits and determines how to manage undeliverable messages.
Delivery | Contains settings that determine how the server delivers messages, including number sent per connection, route, and attempts to resend messages.
LDAP Routing | Contains settings for Lightweight Directory Access Protocol (LDAP) that allow access to directories that comply with the X.500 directory structure.
Security | Designates the user accounts that have operator permissions to configure Microsoft SMTP Service.

Accessing the SMTP tabs in Microsoft Management Console

  1. Select the SMTP virtual server you want.
  2. On the Action menu, click Properties.
  3. Click the tab you want to display.


Improving System Performance

Some settings may affect system performance. Refer to the following list to determine how to streamline your system to reduce processing time and optimize delivery connections:

  • Limit the Number of Messages Sent in One Connection
  • Add Brackets to the Smart Host IP Address
  • Disable Reverse DNS Lookup


Key Features

Microsoft SMTP Service provides the following features.

Standard Internet Protocol Support

Microsoft SMTP Service provides full support for Simple Mail Transfer Protocol (SMTP) and is compatible with SMTP mail clients.

Scalability

You can configure multiple domains for one server to support hundreds of client connections in a single-server configuration.

Easy Administration and Microsoft Windows 2000 Server Integration

Microsoft SMTP Service uses Microsoft Management Console for administration. This tool is included with Internet Information Services (IIS). Administrators can use other Windows 2000 Server administration features including Simple Network Management Protocol (SNMP), event logs, and transaction logs to collect usage statistics, track messages and transactions, or examine usage patterns.

Advanced Security

Microsoft SMTP Service supports use of Transport Layer Security (TLS) for encrypting transmissions.

Directed Mail Drop and Pickup

For the default domain, Microsoft SMTP Service supports placing all incoming messages directly into a Drop directory. This allows Microsoft SMTP Service to be used as a mail receiver for other applications.

In addition to connecting to a TCP port to send messages, applications can also use a Pickup directory. After a message formatted as a text file is copied to the Pickup directory, Microsoft SMTP Service delivers it.


Components

This section describes the components of Microsoft SMTP Service, what they do, and how they work together. It contains:

  • Components and Microsoft Management Console Display Settings
  • Relationship Between the Components
  • Mailroot Directory and Default Directories


Components and Microsoft Management Console Display Setting

Components and Microsoft Management Console Display Settings

All the Internet Information Services (IIS) components that are set for your computer are displayed in Microsoft Management Console. Microsoft SMTP Service is represented by a node in the console tree of Microsoft Management Console. When you select a node, detailed information about it is displayed in the details pane. The following table provides descriptions of the computer and Microsoft SMTP Service nodes.

Node | Icon | Description
Computer | Computer | This is the main administrative component of IIS. It displays information about each IIS service, including its operational status, the IP address, and the port.
Default SMTP Virtual Server | SMTP Site | This is the main administrative component of Microsoft SMTP Service. It provides access to the tabs for configuring the site. When you double-click the node, a list of domains and current sessions is displayed.
Domains | Domains | These are organizational components of Microsoft SMTP Service. The node provides access to the Domain Properties dialog box for creating and configuring domains, and displays information about all domains set up on the site.
Current Sessions | Current Sessions | This provides status information about the use of Microsoft SMTP Service. It provides access to a display that lists the user, source location, and connection time for each connected session.


Relationship Between the Components

You use the SMTP virtual server in Microsoft Management Console to run Microsoft SMTP Service and Internet Information Services (IIS). It includes a default domain, which is used to stamp messages from addresses that do not have a domain. The default domain cannot be deleted. You can, however, create an alias domain. All alias domains use the default domain to stamp messages.

For more information on domains, see Domain Overview.


Mailroot Directory and Default Directories

Setup installs five default subdirectories in the Mailroot directory so that Microsoft SMTP Service can process messages. Four of the directories are described in the following table. The SortTemp directory, also created during Setup, stores temporary files. The default location of the Mailroot directory is root:\Inetpub\Mailroot, but you can designate a different location during Setup. The Mailroot subdirectories and their contents are described in the following table.

Folder | Description
Badmail | Stores undeliverable messages that cannot be returned to the sender.
Drop | Receives all incoming messages for all of the domains hosted on the computer. You can assign any directory to be the Drop directory, except one that has already been designated as the Pickup directory.
Pickup | Processes outgoing messages that are created as text files and copied to the directory. As soon as a properly formatted Request for Comments (RFC) 822 message is copied to the Pickup directory, Microsoft SMTP Service collects it and initiates delivery.
Queue | Holds messages for delivery. If a message cannot be delivered because the connection is busy or down, the message is stored in the queue and sent again at designated intervals.


Process Overview

Microsoft SMTP Service uses Simple Mail Transfer Protocol (SMTP) to transport and deliver messages according to specifications in Request for Comments (RFC) 821 and RFC 822. Messages are transferred between remote mail servers and the Drop directory designated for the default domain. Microsoft SMTP Service is designed to provide quick turnaround on connections to maximize messages-per-second processing.

This section describes the process of message transmission and delivery using Microsoft SMTP Service. It contains:

  • Processing Messages
  • Local Message Delivery
  • Remote Message Delivery


Processing Messages

When a message is copied to the Pickup directory or comes in through the designated TCP port (the default is 25), it is placed in the Queue directory. If the recipients are local, the message is delivered. If they are not local, the message is processed for remote delivery. The process flow is shown in the following illustration.

Local and Remote Process Flow


Local Message Delivery

If a message is for a local recipient, it is moved from the Queue directory to the Drop directory designated for the default domain. After the message is deposited in the Drop directory, the Microsoft SMTP Service delivery cycle is complete. The Drop directory can be designated in the Default Domain dialog box. The process flow is shown in the following illustration.

SMTP Process Flow


Remote Message Delivery

The following table describes the processes used by Microsoft SMTP Service to deliver remote messages. The tabs you use to configure the options are also listed.

Process | Description
Sort messages and queue for delivery. | Messages remain in the Queue directory. Recipients for each message are sorted by domain so Microsoft SMTP Service can send them as a group. This allows Microsoft SMTP Service to optimize connections by delivering multiple messages in one session.
Determine if the receiving server is ready to receive messages. | Microsoft SMTP Service attempts to connect to the receiving mail server. If the server is not ready, the message remains in the queue and delivery is attempted again at designated intervals up to a maximum number of attempts. These intervals are the retry settings, and they can be set on the Delivery tab.
Send the message. After recipients are verified, the message is sent. After the receiving server acknowledges the transmission, Microsoft SMTP Service delivery is complete. Delivery options are described below:

If you have enabled Transport Layer Security (TLS) for remote delivery, Microsoft SMTP Service encrypts all outgoing messages. You can also enable or disable this function for a specific remote domain. TLS encryption can be set in the Outbound Security dialog box, accessed by clicking Outbound Security on the Delivery tab.

All messages for remote domains can be sent to a smart host , which can then send them to the recipients. The smart host can be designated on the Advanced Delivery dialog box, accessed by clicking Advanced on the Delivery tab.

For detailed information on how to use the tabs to configure Microsoft SMTP Service, see Microsoft SMTP Service Overview.


Maintenance

This section describes how to monitor processes so you can analyze your site configuration and make adjustments to ensure efficient mail processing. It also describes how to pause and stop the service for maintenance. It contains the following:

  • Overview of Monitoring Tools
  • Monitoring System Processes
  • Monitoring SMTP Performance and Configuration
  • Monitoring Message Transactions


Overview of Monitoring Tools

Several tools are available for tracking events and monitoring performance. You can use these tools for troubleshooting and determining if system design changes are warranted.

Windows 2000 Server Event Log

This verifies that Microsoft SMTP Service is performing correctly by tracking informational, warning, and error events, all of which require administrator attention. Three logs are available: System, Security, and Application.

Logging predetermined events begins automatically whenever Windows 2000 Server is started. For each type of log, you can designate the maximum size, how long to save entries, and whether to automatically overwrite existing events when the log is full or manually clear entries.

System Monitor

This measures the responsiveness of Microsoft SMTP Service and indicates whether it is performing as expected. You can log actual workload statistics for any system components you want to review. Then you can analyze the data to determine if configuration adjustments are required to ensure that messages are processed efficiently. To do this, you must enable monitoring and designate what to track.

Protocol Log

This tracks individual Simple Mail Transfer Protocol (SMTP) transactions. You must first enable logging and then determine the frequency and format.


Monitoring System Processes

There are two Windows 2000 Server event logs: System and Security. Within each log, Microsoft SMTP Service records informational, warning, and error events.

Monitor these logs closely, and periodically archive them to avoid running out of space. To avoid losing information, clear the logs occasionally so that Microsoft SMTP Service can continue to write new events.


Monitoring SMTP Performance and Configuration

This section describes how to use System Monitor to review system design and performance. It contains:

  • System Monitor Overview
  • Monitoring Performance
  • Monitoring System Capacity


System Monitor Overview

After you have configured your system, you can review the design by tracking system performance. You can use System Monitor to log actual workload statistics for any system objects you want to review. Then you can analyze the logging data to determine if configuration adjustments are required to ensure that messages are processed efficiently.

You can customize the logging process to track different types of information. You choose the system objects you want to monitor, and then set counters to track their performance. To fine-tune the tracking and increase administrator response time to events, you can set System Monitor to generate an alert whenever a counter exceeds or drops below a measurement you specify. After the data is generated, you can export it to spreadsheets or databases for further review and analysis.

Monitoring options include the following:

  • You can monitor a single computer, or several computers, simultaneously.
  • You can monitor performance in real time in the Chart window, or store data in logs for later use.

For more information about using System Monitor, see the Windows 2000 documentation and Help.


Monitoring Performance

You can monitor message processing and connections for the Simple Mail Transfer Protocol (SMTP) server. Some of the counters are listed below.

Counter | Normal readings | Description
Local Queue Length | 0 | The number of messages in the local queue. If >0, the server is receiving more messages than it can process. If the number steadily increases, determine what is causing the delay in processing.
Remote Queue Length | 0 | The number of messages in the remote queue. If >0, the server is receiving more messages than it can process. If the number steadily increases, determine what is causing the delay in processing.
Inbound Connections Current | >0 | The number of connections currently inbound. A value of 0 for an extended time can indicate network problems.


Monitoring System Capacity

You can compare actual usage to available resources to determine if a resource shortage is imminent. To monitor Microsoft SMTP Service capacity, review both the physical resources and Microsoft SMTP Service capacity. A physical resource reaches capacity when it is busy 100 percent of the time. A service reaches capacity when requests for service start experiencing delays.

Note To monitor physical capacity, diskperf must be turned on. Run diskperf -y on the server you want to monitor, and then restart the computer.

The objects to monitor and counters to use are described in the following table.

Object | Counter | Normal readings | Description
Logical Disk | %Disk Time | <70% | Percentage of elapsed time that the selected disk drive is busy servicing read or write requests. If readings continuously rise above 70 percent, consider adding another SMTP server.
System | % Total Processor Time | <70% | Average percentage of time that all the processors on the system are busy executing non-idle threads. On a multiprocessor system in which all processors are always busy, this is 100 percent. If all processors are 50 percent busy, this is 50 percent. If one-fourth of the processors are 100 percent busy, this is 25 percent. It is the fraction of time spent doing useful work. Each processor is assigned an idle thread in the idle process that consumes those unproductive processor cycles not used by any other threads.
Memory | Available Bytes | >10% of total memory | Displays the size of the virtual memory currently on the Zeroed, Free, and Standby lists. Zeroed and Free memory is ready for use, with Zeroed memory cleared to zeros. Standby memory is memory removed from a process Working Set but still available. Notice that this is an instantaneous count, not an average over the time interval.


Monitoring Message Transactions

This section describes how to use transaction logs to track message transmissions. It contains:

  • Protocol Log Overview
  • Log Formats
  • Log Format Comparison
  • Planning
  • Enabling Protocol Logging


Protocol Log Overview

Protocol logs track the commands a Simple Mail Transfer Protocol (SMTP) virtual server receives from SMTP clients.

Four formats are available for tracking. For the most part, they track the same information. The differences among them are depth of detail, type of display, and analytical uses. When choosing a format, decide what you want to track, how you want to review the data, and how you want to track transactions from other Internet Information Services (IIS) services. For more information, see Planning.

The default format is World Wide Web Consortium (W3C) Extended Log File Format, but you can choose a different one. For three of the formats, transactions are written to a text file. You can determine the logging period and maximum size of the file. When the size limit is reached, a new file is created. Back up and remove older files so the system doesn't run out of disk space when writing to the current transaction log file. There is also a format that enables you to collect data in an ODBC-compliant database.

Note The log formats and default file names are the same as those used by other IIS services. Plan what you want to track for all the services, how many files to use, and how to set file size before choosing a format for Microsoft SMTP Service. For more information, see Planning.


Log Formats

Four formats are available for transaction logs. For a comparison of the formats, detailed descriptions, and log examples, select one of the following links.

  • Log Format Comparison
  • Microsoft IIS Log File Format
  • NCSA Common Log File Format
  • W3C Extended Log File Format
  • ODBC Logging


Log Format Comparison

The following examples show how message transaction data is recorded and displayed in each of the four formats. Log entries for Simple Mail Transfer Protocol (SMTP) transmissions typically include multiple records. Only one record is shown for each format so you can see the differences between the formats.

Mariab of Nwtraders.com sends e-mail to a colleague at Microsoft on August 18, 1997 at approximately 1:17 pm.

Microsoft IIS Log File Format

10.456.789.1, Nwtraders.com, 8/18/97, 13:17:37, SMTPSVC1, MAIL01, 10.200.200.1, 90, 42, 0, 250, 0, MAIL FROM, -, FROM:<mariab@Nwtraders.com>,

NCSA Common Log File Format

10.456.789.1 - Nwtraders.com [18/Aug/1997:13:17:37 - 0800] "MAIL FROM -? FROM: mariab HTTP/1.0 250 0

W3C Extended Log File Format

The following example includes default settings only. You can add others.

13:17:37 10.456.789.1 MAIL FROM - 250

ODBC Logging

The database includes the following records:

  • Client IP address
  • Client domain name
  • Connection date and time
  • IIS service
  • Server computer name
  • Server IP address
  • Processing time in milliseconds
  • Bytes received by server
  • Bytes sent by server
  • SMTP protocol reply code
  • Win32 status or error code
  • SMTP protocol command
  • Recipient
  • Parameters


Microsoft IIS Log File Format

  • Information is written to a comma-delimited ASCII text file.
  • Data is fixed; you cannot customize the log.
  • There are multiple records for a single transmission.

Click a link to see a complete list.

10.123.12.3,   Nwtraders.com,  8/18/97,  13:17:37,  SMTPSVC1, MAIL01,  10.200.200.1,  90, 42,  0,  250,  0,  MAIL FROM,  -,FROM:<someone@Nwtraders.com>,
10.123.12.3, Nwtraders.com, 8/18/97, 13:17:37, SMTPSVC1, MAIL01, 10.200.200.1, 0, 32, 0, 250, 0, RCPT TO, -, TO:<someone@microsoft.com>,
10.123.12.3, Nwtraders.com, 8/18/97, 13:17:37, SMTPSVC1, MAIL01, 10.200.200.1, 270, 480, 101, 250, 0, DATA, -, 0019E3517201287MAIL01,
10.123.12.3, Nwtraders.com, 8/18/97, 13:17:37, SMTPSVC1, MAIL01, 10.200.200.1, 81, 4, 52, 0, 541, QUIT, -, MAIL01,


Microsoft IIS Log File Entries

10.123.12.3, Nwtraders.com, 8/18/97, 13:17:37, SMTPSVC1, MAIL01, 10.200.200.1, 90, 42, 0, 250, 0, MAIL FROM, -, FROM:<someone@Nwtraders.com>,

Field | Example
Client IP address | 10.123.12.3
Client domain name | Nwtraders.com
Connect date | 8/18/97
Connect time | 13:17:37
IIS service and site number | SMTPSVC1
Server computer name | MAIL01
Server IP address | 10.200.200.1
Processing time in milliseconds | 90
Bytes received | 42
Bytes sent | 0
SMTP protocol reply code | 250
Win32 status or error code | 0
SMTP protocol command | MAIL FROM
Optional field | -
Variable field, dependent on protocol command | FROM:<someone@Nwtraders.com>


W3C Extended Log File Format

  • The World Wide Web Consortium (W3C) extended log file format is the default logging format for Microsoft SMTP Service, as well as other Internet Information Services (IIS) services.
  • Data is variable; you can choose what you want to track.
  • This format is a good option for limiting log size.
  • Information is written to an ASCII text file.
  • This format includes some field options that apply to the Web and file transfer protocol (FTP) services only.
  • There are multiple entries for a single transmission.

Click a link to see a complete list.

1997-08-18  13:17:37  10.321.255.1  Nwtraders.com  MAIL01,   10.200.200.1  MAIL FROM  -  -  250  -  357  0  90  -  -  -  -
1997-08-18 13:17:37 10.255.255.1 Nwtraders.com SMTPSVC1 MAIL01 10.200.200.1 RCPT TO - +TO:+<someone@microsoft.com> 250 0 0 33 0 - - -
1997-08-18 13:17:37 10.255.255.1 Nwtraders.com SMTPSVC1 MAIL01 10.200.200.1 DATA - 001b60731171d87 250 0 101 1209 250 0 - - -
1997-08-18 13:17:37 10.255.255.1 Nwtraders.com SMTPSVC1 MAIL01 19.200.200.1 QUIT - Nwtraders.com 0 3215 52 4 291 0 - - -


WC3 Extended Log File Entries

W3C Extended Log File Entries

World Wide Web Consortium (W3C) extended log file entries are the log entries for Microsoft SMTP Service. Some differ from Web and file transfer protocol (FTP) entries. Fields requiring text values that do not apply to Microsoft SMTP Service are represented by a hyphen (-) or a zero (0) in the log file. Fields requiring numeric values are represented by a zero (0) in the log file. In the following table, fields listed in bold text indicate default log file entries.

Field | Log field | Description
Date | date | Connection date
Time | time | Connection time
Client IP Address | c-ip | IP address of the client that accessed the server
Client domain name | cs-username | Client that accessed the server
Service Name | s-sitename | Internet Information Services (IIS) service
Server Name | s-computername | Server on which the log entry was generated
Server IP | s-ip | IP address of the server on which the log entry was generated
Method | cs-method | Simple Mail Transfer Protocol (SMTP) protocol command sent by the client
URI Stem | cs-uri-stem | Not applicable to Microsoft SMTP Service
URI Query | cs-uri-query | Varies for Microsoft SMTP Service; depends on the SMTP protocol command
HTTP Status | sc-status | SMTP protocol reply code
Win32 Status | sc-win32-status | Windows 2000 Server status or error code; 0 indicates success
Bytes Sent | sc-bytes | Bytes sent by the server
Bytes Received | cs-bytes | Bytes received by the server
Time Taken | time-taken | Length of time the action took in milliseconds
Server Port | s-port | Not applicable to Microsoft SMTP Service
User Agent | cs(User-Agent) | Not applicable to Microsoft SMTP Service
Cookie | cs(Cookie) | Not applicable to Microsoft SMTP Service
Referrer | cs(Referrer) | Not applicable to Microsoft SMTP Service


NCSA Common Log File Format

  • Information is written to an ASCII text file that uses the National Center for Supercomputing Applications (NCSA) format.
  • Data is fixed; you cannot customize the log.
  • There are multiple records for a single transmission.

Click a link to see a complete listing.

10.321.255.1 -  Nwtraders.com  [18/Aug/1997:13:17:37 - 0800] "MAIL FROM -? FROM: someone HTTP/1.0"  250 0
10.321.255.1 - Nwtraders.com[18/Aug/1997:13:17:37 - 0800] "RCPT TO -? TO: someone@microsoft.com HTTP/1.0" 250 0
10.321.255.1 - Nwtraders.com[18/Aug/1997:13:17:37 - 0800] "DATA -?000B72730441764MAIL01 HTTP/1.0" 250 97
10.321.255.1 - Nwtraders.com[18/Aug/1997:13:17:37 - 0800] "QUIT -?someone HTTP/1.0" 0 0


NCSA Common Log Format Entries

10.321.255.1 - Nwtraders.com [18/Aug/1997:13:17:37 - 0800] "MAIL FROM -? FROM: someone HTTP/1.0" 250 0

Field | Example
Client IP address | 10.321.255.1
Client domain name | Nwtraders.com
Connection date and time | [18/Aug/1997:13:17:37 - 0800]
SMTP protocol command and related information | "MAIL FROM -? FROM: someone HTTP/1.0"
SMTP protocol reply code | 250
Bytes sent | 0


ODBC Logging

  • You must set up an open database connectivity (ODBC)-compliant database before using this format.
  • Information is written to a database.
  • There are multiple records for a single transmission.

The following table describes the fields and data types for an ODBC transaction log file.

Field name | Data type | Description
ClientHost | varchar(255) | Client IP address
Username | varchar(255) | Client domain name
LogTime | datetime | Connection date and time
Service | varchar(255) | Internet Information Services (IIS) service
Machine | varchar(255) | Computer name
ServerIP | varchar(50) | Server IP address
ProcessingTime | integer | Processing time in milliseconds
BytesRecvd | integer | Bytes received by server
BytesSent | integer | Bytes sent by server
ServiceStatus | integer | Simple Mail Transfer Protocol (SMTP) protocol reply code
Win32Status | integer | Windows 2000 Server status or error code (a 0 value indicates success)
Operation | varchar(255) | SMTP protocol command
Target | varchar(255) | Recipient
Parameters | varchar(255) |


Planning Protocol Logs

Review the following information to determine how to use logging for Microsoft SMTP Service with other Internet Information Services (IIS) services.

Using the default settings

If you use the default settings for all IIS services, transaction logs are generated daily for all services. However, the format differs. The default format for the Web and FTP services is the World Wide Web Consortium (W3C) Extended Log format. Transactions for these services are combined in a file using the default options only for this format. The default format for Microsoft SMTP Service is Microsoft IIS Log File format. Transactions are recorded in a separate file.

Determining which format to use

The default formats for the IIS services differ. If you want to combine records for all services in one file, choose the same format for all services. When choosing a format, you should also determine how you want to review the data. Three of the four formats write records to ASCII text files, some in space-delimited format and some in comma-delimited format. One of the options writes records to an ODBC-compliant database.

Determining how to set up the log file

There are three considerations for setting up transaction log files.

Item | Description
Recording frequency | Determine if you want the files to log daily, weekly, or monthly.
Log file contents | Determine what to include in a log file. If you use the default filenames for all IIS services and use the same format, the transaction records can be merged into one log file. If you use the same format for all services and want a separate file for Microsoft SMTP Service, designate a separate file for the transaction log.
Log file size | Determine if you want the file size to be unlimited or set to a specific size.


Enabling Protocol Logging

Use the General tab to enable transaction logging and to select the format. When setting up the log file, keep in mind that the log formats and default file names are the same as those used by other Internet Information Services (IIS) services. If you choose the default names, all transactions for all services are recorded in the same file. You can set up a separate file for each service if you want to maintain separate records.

If you set up the file in a location other than the default, make sure it is stored on a local drive and not on a network.

To enable logging that uses one of the ASCII text formats

  1. On the General page, click Enable Logging.
  2. Under Active log format, select a transaction log format from the drop-down menu.
  3. Click Properties, and then set the log file size and location.
  4. If you have chosen the World Wide Web Consortium (W3C) Extended Logging format, click the Extended Properties tab, and then click the items you want to track.

To enable logging that uses the ODBC format

  1. Set up an ODBC-compliant database.
  2. On the General page, click Enable Logging.
  3. In the Active log format drop-down menu, click ODBC Logging.
  4. Click Properties, and then set the log file size and location.


To Set Up an ODBC-Compliant Database

  1. Create an open database connectivity (ODBC)-compliant database by using a database program such as Microsoft Access or Microsoft SQL Server.
  2. Create a table in the database that contains the fields listed in the following table.

    Field name | Data type
    ClientHost | varchar(255)
    Username | varchar(255)
    LogTime | datetime
    Service | varchar(255)
    Machine | varchar(255)
    ServerIP | varchar(50)
    ProcessingTime | integer
    BytesRecvd | integer
    BytesSent | integer
    ServiceStatus | integer
    Win32Status | integer
    Operation | varchar(255)
    Target | varchar(255)
    Parameters | varchar(255)


Troubleshooting

This section provides information and solutions for common operating problems. It contains troubleshooting guidance on the following topics:

  • General Troubleshooting Tips
  • Delivery
  • System
  • Microsoft SMTP Service


General Troubleshooting Tips

You can monitor transmissions and make configuration adjustments to prevent problems. If errors still occur, there are several places to begin troubleshooting.

Regular Reviews

You can set up your system to regularly review transmissions and resolve bottlenecks before they cause problems.

Set up a mailbox to receive NDRs and undeliverable mail

You cannot create mailboxes in Microsoft SMTP Service. However, you can enter a name and path for an existing mailbox on another server to receive copies of non-delivery reports (NDRs) and undeliverable mail. For example, you can create a mailbox in a client and name it Postmaster. After this option is set, you can review NDRs and undeliverable messages continuously, and correct transmission problems early. Undeliverable messages have a .bad extension.

Use performance counters to gauge server load and identify bottlenecks

System Monitor is an excellent tool for tracking process flow information. Review counter data regularly so you can adjust configuration settings before they become problems. You can monitor items such as the number of messages in a queue, the number of connections, the average number of retries and recipients, and the number of bytes sent. System Monitor is a Windows 2000 Server administrative tool. If values steadily rise for a specific counter, investigate the cause so you can make adjustments.

For more information about using System Monitor, see Monitoring SMTP Performance and Configuration.

Resolving Problems

After an error has occurred, use the following methods to begin troubleshooting the problem.

Review events in Event Viewer

The System, Application, and Security event logs record events for Microsoft SMTP Service and other computer processes. You can review events in the logs to determine why an error occurred.

Review .rtr files in the Queue directory to determine why messages aren't being delivered

Messages may not be delivered because a remote server is down and the queue is filling up, or all messages may be undeliverable for a variety of reasons. If this occurs, you can open the remote transcript (.rtr) files in the Queue directory to determine why messages were not delivered initially and why they remain queued to be sent again.


Delivery

Delivery problems are commonly caused by lack of disk space or incorrect path entries. This section contains the following troubleshooting items:

  • Messages aren't being delivered to the Drop directory.
  • Messages aren't being delivered to a specific remote domain.
  • Remote messages aren't being routed through the smart host.
  • A masquerade domain is set but the From header is unchanged.


Messages Aren't Being Delivered to the Drop Directory

Problem | The directory or disk is full.
Resolution | Empty the Drop directory and clear additional space on the disk, if necessary.

Problem | The path is invalid.
Resolution | Check the Drop directory path in the Domain Properties dialog box for the default domain. The directory must be located on a local drive.


Messages Aren't Being Delivered to a Specific Remote Domain

Problem | The route domain path is incorrect, which produces a "Host unreachable" error.
Resolution | Check the path in the Domain Properties dialog box for the remote domain.
Problem | The receiving server is down or the message cannot be delivered for a variety of reasons.
Resolution | Check the .rtr files in the Queue directory to determine the cause. Check the retry counters in System Monitor. Check the receiving server.

Problem | The name is incorrect or the address is invalid.
Resolution | Check the name and path.

Problem | Transport Layer Security (TLS) is required for connections. The key certificate is invalid or the encryption levels don't match.
Resolution | See if the use of TLS has been overridden for the remote domain in the Domain Properties dialog box. Check the TLS encryption level on the Security dialog box. Make sure it matches the level required by the receiving server. Use Key Manager to set up key pairs.


Remote Messages Aren't Being Routed Through the Smart Host

Problem | A route domain is designated for the remote domain and overrides the smart host setting.
Resolution | Change the route domain setting. The route domain cannot be the same as the default domain or any alias domain.

Problem | The default domain or an alias domain is designated as the smart host. You cannot use a local domain for the smart host.
Resolution | Change the smart host setting in the Advanced Delivery dialog box, accessed by clicking Advanced on the Delivery tab.


Masquerade Domain Is Set but the From Header Is Unchanged

Problem | The From header does not show the masquerade domain.
Resolution | The From header is only changed for the first hop.


System

Unresolved delivery errors can result in system errors. This section contains:

  • Out of Memory


Out of Memory

Problem Received messages cannot be sent outbound for delivery, which means that they remain in the queue. Each received message is assigned as a mail object in memory. When the message is deposited in the Drop directory, it is removed from memory. If messages cannot be delivered and you reach the default value of 100,000 objects, the system generates an "Out of Memory" error.
Resolution Check the following performance counters:

Local queue length

Remote queue length

Local retry queue length

Remote retry queue length

If the first two have values of 0, it indicates that messages are being delivered immediately upon receipt. If the value is higher, it indicates that there is a delay.

If the retry queues have high values, it indicates that messages cannot be delivered. Open the .rtr files to determine what is causing the problem.

For example, if a remote server is down, the remote retry queue length may have a high value and .rtr files in the Queue directory might include the error message "Host not found."


Microsoft SMTP Service

This section describes errors common to Microsoft SMTP Service operation, and contains:

  • Microsoft SMTP Service starts but the SMTP virtual server does not.
  • SMTP Snap-in is not displaying in MMC.
  • Queue directory contains .bad files.
  • Client is unable to connect.


Microsoft SMTP Service Starts but the SMTP Virtual Server Does Not

Problem | The site was stopped in Microsoft Management Console (MMC), and Microsoft SMTP Service was stopped and started from the command line.
Resolution | Restart the Simple Mail Transfer Protocol (SMTP) virtual server in MMC.


SMTP Snap-in Is Not Displaying in MMC

Problem | Microsoft Management Console (MMC) was opened from the command line.
Resolution | Add the Simple Mail Transfer Protocol (SMTP) snap-in manually.


Queue Directory Contains .bad Files

Problem | The Badmail directory is full, and .bad files remain in the Queue directory.
Resolution | Clear messages from the Badmail directory.


Client Is Unable to Connect

Problem | A client is denied access.
Resolution | Check the computer access permissions on the Security tab.


To Add the SMTP Snap-in Manually

  1. On the Console menu, click Add/Remove Snap-in.
  2. In the Snap-ins added to box, select Internet Information Services.
  3. Click Add.
  4. From the list, select Internet Information Services.
  5. Click the Extensions tab.
  6. Select SMTP Protocol.


To Restart the SMTP Virtual Server in MMC

  1. Select the Simple Mail Transfer Protocol (SMTP) virtual server.
  2. On the Action menu, click Start.


Legal Information

Microsoft Documentation

Information in this document, including URL and other Internet Web site references, is subject to change without notice. Unless otherwise noted, the example companies, organizations, products, people and events depicted herein are fictitious and no association with any real company, organization, product, person or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

© 2001 Microsoft Corporation. All rights reserved.

Microsoft, Active Directory, MS-DOS, Win32, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.