Windows IT Pro
Windows IT Library
  - Advertise        
Windows IT Pro Logo

  Home  |   Books  |   Chapters  |   Topics  |   Authors  |   Book Reviews  |   Whitepapers  |   About Us  |   Contact Us  |   ITTV  |   IT Jobs

search for  on    power search   help
 






SMTP and IIS
View the book table of contents
Author: Kurt Hudson
Published: November 1998
Copyright: 1999
Publisher: 29th Street Press
 


SMTP SERVICE CONFIGURATION

Use either the Internet Service Manager snap-in or the HTML Internet Service Manager pages to configure the SMTP Service. (You must be a member of the local Administrators group on the IIS server to manage the SMTP Service.) Figure 9.1 shows the Default SMTP Site in the Internet Service Manager snap-in.

There are no server-level or Master dialog boxes for the SMTP Service. Furthermore, there can be only one SMTP site per server, and this site cannot be deleted without uninstalling the SMTP Service. You cannot create additional virtual SMTP sites, but you can create multiple e-mail domains under this site. We examine the five tabs in the dialog box for the Default SMTP Site below.

The SMTP SITE TAB
You can find the options below on the SMTP Site tab of the Default SMTP Site Properties dialog box (see Figure 9.2).

IP Address
With the IP Address option, you can assign a subset of the server’s IP addresses to the Default SMTP Site and, if desired, use a different port number for each. You accomplish this by clicking the Advanced button.

TCP Port
You can change the default port numbers for the SMTP Service under the Incoming and Outgoing Connections sections. Keep in mind that if you change the default incoming connection port 25, you have to specifically configure all other SMTP servers to use this port when connecting. This configuration is inappropriate for a public SMTP server on the Internet because it essentially hides your SMTP server from all other SMTP servers on the Internet. You might consider changing the default port number for security purposes on a small- to medium-sized private network.

Limited To
You can limit the number of simultaneous connections for both incoming and outgoing connections. These connections are not physical, but are the number of concurrent sessions or conversations the SMTP Service can maintain with remote SMTP clients and servers. Reduce the number if the SMTP Service becomes overwhelmed and you encounter time-out errors. Be aware, however, that if the number is too small, performance will suffer.

Connection Time-Out (Seconds)
Connection time-out specifies how long the SMTP Service waits before closing an idle connection with a remote client or server.

Limit Connections Per Domain
As an administrator, you can limit the number of concurrent outgoing connections to other SMTP servers on a per-domain basis. For example, if the total number of outgoing connections is limited to 1,000, you can limit all connections to transfer mail to microsoft.com (or any other single domain) to 100, preventing any one recipient domain from monopolizing the pool of concurrent connections.

Enable Logging
You can log SMTP activity to a text file or ODBC database with the same options as when logging the Web or FTP services. You can also use SMTP logging to troubleshoot the mail system because you can track a message in the log as it is being processed (or generating Non-Delivery Reports).

The Operators Tab
You use the Operators tab to specify which NT user accounts have permission to modify the Default SMTP Site, but not any other aspect of IIS. The Operators Tab lets you delegate limited authority to assistants or clients.

The Messages Tab
You can find the following options on the Messages tab of the Default SMTP Site Properties dialog box (see Figure 9.3).

Maximum Message Size
The maximum message size is the SMTP Service’s advertised message size-limit for incoming messages. This advertised limit is not enforced, however. When an SMTP client or server attaches to IIS, the message size-limit is advertised to the remote computer (via the SIZE command). If the remote system still sends a message larger than this advertised size-limit, IIS nonetheless accepts and processes the message normally, generating no error message or Non-Delivery Report for either party. It is the responsibility of the remote SMTP system to be courteous and abide by the preferred limit IIS advertises.

Maximum Session Size
The maximum session size is the SMTP Service’s real message size-limit for incoming messages. This limit is enforced. If a remote SMTP server or client sends a message that exceeds this value, IIS terminates the connection and cuts the message off mid-transfer.

Note: Be careful when setting the maximum session size. A remote system will likely resubmit the entire message with the next connection, causing a loop that continues until the remote system reaches its retry limit.

Maximum Number of Outbound Messages Per Connection
The maximum number of outbound messages per connection value is useful for optimizing performance. When the SMTP Service connects to a remote system to deliver mail to it, messages are queued for delivery. If the number of queued messages exceeds this messages-per-connection value, a new concurrent connection is established with the target SMTP server.

Note: IIS does not simply send as many messages as possible over a solitary connection to a remote SMTP server, close the connection, reopen a new connection, and repeat as necessary to deliver all messages. Instead, IIS opens multiple concurrent connections in parallel.

Maximum Number of Recipients Per Message
You can address and send a single message to thousands of recipients. The maximum number of recipients per message value does not prevent an SMTP client from submitting a message with more recipients than set in this box. Instead, the SMTP Service sends the message with as many recipients as possible, then sends another copy of the message with the remaining recipients, repeating this process until all recipients get a copy of the message.

Send a Copy of Non-Delivery Report To
When this box contains the e-mail address of an administrator, the administrator receives a copy of any Non-Delivery Report sent to senders whose messages have failed.

Badmail Directory
The Mailroot\Badmail folder contains all messages that cannot be delivered or returned to the original senders. You can move the Badmail folder to a different partition only if the partition on which the SMTP Service resides is NTFS. The new location for the Badmail folder must be on a local drive on the same machine as the SMTP Service. You cannot use a Universal Naming Convention (UNC) pathname (e.g., \\server\share). You can use undeliverable mail in the Badmail folder to troubleshoot connection problems; be sure to check it regularly.

The Delivery Tab
You can find the following options on the Delivery tab of the Default SMTP Site Properties dialog box (see Figure 9.4).

Maximum Retries and Retry Interval
Messages destined for domains hosted on the IIS SMTP server itself are placed in the Local Queue. Messages destined for remote domains, which require forwarding to other SMTP servers, are placed in the Remote Queue. For each queue, you, as an administrator, can specify the maximum number of times the SMTP Service attempts to resend a message. If a message cannot be delivered after a number of times equal to Maximum Retries, it is considered undeliverable. The undeliverable message, along with a Non-Delivery Report message, is sent back to the original sender. The Retry Interval determines the time between attempted deliveries.

Maximum Hop Count
Sometimes a message must pass through many SMTP servers before arriving at its final destination. Each SMTP server it passes through adds a Received line to the header of the message; the number of Received lines in the header acts as counter for the number of “hops” the message has taken from one SMTP server to another. This hop count is important for preventing messages from wandering or looping endlessly through the Internet. The Maximum Hop Count value tells the SMTP Service when to consider a wandering message undeliverable. If the SMTP Service receives a message that has a number of Received lines in its header greater than the Maximum Hop Count value, the SMTP Service returns the message to original sender with a Non-Delivery Report.

Masquerade Domain
When a message is sent from one SMTP server to another, certain identifying information is passed, such as the address of the original sender (From) and the domain of the sending server (Mail From). The Masquerade Domain box can contain an e-mail domain name that is substituted on-the-fly for the domains in the From and Mail From lines just before transmission to the receiving SMTP server. If a recipient replies to one of these messages, the reply goes to the substituted domain instead of the sender’s real domain. This feature is useful if you are hosting a virtual domain and you want it to appear that the domain itself is responsible for its own e-mail.

Note: Only e-mail originating from the sending SMTP server itself can have its domain information substituted. Relayed messages from remote domains are not changed.

Smart Host
By default, the SMTP Service attempts to connect directly to remote SMTP servers when forwarding e-mail to them. However, you can name a specific SMTP server that should always be used when forwarding messages to remote domains. This SMTP server acts like a default SMTP gateway for routing messages and is called the Smart Host. In the Smart Host box, type in the NETBIOS name, fully qualified domain name, or IP address of the computer that should receive all mail destined for remote domains.

Note: Enclose the IP address of the Smart Host in brackets ([ ]) to improve performance.

Attempt Direct Delivery Before Sending to Smart Host
You can use the Smart Host for fault tolerance. To use the Smart Host if a direct connection to the target SMTP server fails, check the “Attempt Direct Delivery Before Sending to Smart Host” box. With this option checked, the SMTP Service forwards the message to the Smart Host for delivery if direct delivery is impossible.

Perform Reverse DNS Lookup on Incoming Messages
If you opt to perform reverse DNS lookups on incoming messages, the SMTP Service queries DNS with the sender’s IP address. The DNS server returns the domain name for the IP address, and the SMTP Service includes this information as a Received line in the header of the message. If the message’s original domain name does not match the domain name that DNS returns, the SMTP Service does nothing and delivers the message normally.

Tip: While performing reverse DNS lookups is useful for tracking domain-masqueraded messages, using this option can significantly slow performance.

Outbound Security
We discuss the Outbound Security button under “SMTP Security” later in this module.

Note: We discuss the Directory Security tab under “SMTP Security” later in this module.



Page: 1, 2, 3, 4, 5

next page



Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing