JSI Tip 6757. How do I set up a Simple Mail Transfer Protocol (SMTP) virtual server on a Windows Server 2003-based computer?

Jerold Schulman

May 25, 2003

8 Min Read
ITPro Today logo in a gray background | ITPro Today

NOTE: The text in the following Microsoft Knowledge Base article is provided so that the site search can find this page. Please click the Knowledge Base link to insure that you are reading the most current information.

Microsoft Knowledge Base article Q816121 contains:

IN THIS TASK

  • SUMMARY

  • Install Microsoft Internet Information Services (IIS) and Microsoft SMTP Service

    • Configure the SMTP Virtual Server

    • Assign an IP Address

    • Configure the Default Domain

    • Enable Transaction Logging

    • Set Relay Restrictions

    • Set Up a Smart Host

    • Troubleshoot

  • REFERENCES

SUMMARY

This step-by-step article describes how to set up a Simple Mail Transfer Protocol (SMTP) virtual server on a Windows Server 2003-based computer.

Microsoft SMTP Service uses the Internet-standard SMTP to transport and deliver mail messages. Microsoft SMTP Service does not support the use of individual mailboxes. The service places incoming messages in a Drop folder or forwards them to other SMTP servers (if the message is addressed to a remote domain). This feature allows Microsoft SMTP Service to be used as a mail receiver for other programs.

back to the top

Install Microsoft Internet Information Services (IIS) and Microsoft SMTP Service

Because Microsoft SMTP Service is a component of Microsoft Internet Information Services (IIS), you must install IIS to use Microsoft SMTP Service. To install IIS and Microsoft SMTP service, follow these steps:

  1. Click Start, point to ControlPanel, and then click Add or RemovePrograms.

  2. Click Add/Remove WindowsComponents.

  3. In the Windows Components Wizard, click InternetInformation Services (IIS), and then clickDetails.

  4. Click to select the following check boxes:

    • Common Files

    • Internet Services Manager (HTML)

    • SMTP Service

    • World Wide Web Server

  5. Click to select any other components that you want.

  6. Click OK two times, clickNext, and then click Finish to close theWindows Components Wizard.

back to the top

Configure the SMTP Virtual Server

When you install Microsoft SMTP Service, a default SMTP virtual server is created to handle basic mail delivery functions. The SMTP virtual server is automatically configured with default settings that enable it to accept local client computer connections and to process messages. You can either accept the default settings or change the SMTP virtual server configuration. You can configure the SMTP virtual server to meet your messaging requirements. This article describes basic configuration and security settings that you may want to consider using.

back to the top

Assign an IP Address

To assign an IP address to your SMTP virtual server, follow these steps:

  1. Click Start, point to AllPrograms, point to Administrative Tools, and thenclick Internet Information Services (IIS) Manager.

  2. Right-click Default SMTP Virtual Server,and then click Properties.

  3. Click the General tab.

    • If you want the SMTP virtual server to respond to connection requests for all IP addresses that are configured on the computer, click to select (All Unassigned) in the IP address box. (This is the default setting.)

    • If you want to assign a specific IP address to the SMTP virtual server, click the IP address that you want to use in the IP address box.

    • If you want to assign additional IP addresses to the virtual server, click Advanced, click Add, specify the IP address and the Transmission Control Protocol (TCP) port number, and then click OK three times.Note The default TCP port is 25.

  4. Click OK.

back to the top

Configure the Default Domain

SMTP virtual servers must have one local default domain. The default domain is used to stamp messages from addresses that do not contain a domain. By default, the name that you specify on the Network Identification tab of the System tool in Control Panel is used as the default domain name.

All incoming mail messages that are designated for the default domain are placed in the Drop folder. By default, the Drop folder is located in the InetpubMailroot folder.

To change the location of the Drop folder, follow these steps:

  1. Click Start, point to AllPrograms, point to Administrative Tools, and thenclick Internet Information Services (IIS) Manager.

  2. Double-click Default SMTP Virtual Server,and then click Domains.

  3. In the right pane, right-click the default domain, and thenclick Properties.

  4. Click Browse, locate and select a folder that youwant to use for your Drop folder, and then click OK two times.

    Note You must put the Drop folder in a folder on the local computerwhere Microsoft SMTP Service is installed.

back to the top

Enable Transaction Logging

Log files keep a record of all the messages that are received and sent on your computer. To turn on logging, follow these steps:

  1. Click Start, point to AllPrograms, point to Administrative Tools, and thenclick Internet Information Services (IIS) Manager.

  2. Right-click Default SMTP Virtual Server,and then click Properties.

  3. Click the General tab, and then click toselect the Enable logging check box.

  4. In the Active log format box, click thelog format that you want to record information in. The default log format isW3C Extended Log File Format.

  5. Click Properties.

  6. Specify the settings that you want to use. You can specifysettings to include the logging time period and the location and name of the logfile.

  7. Click OK two times.

back to the top

Set Relay Restrictions

By default, all computers are denied relay access. Microsoft SMTP Service does not allow computers to relay unwanted mail through the virtual server. All computers are denied relay access except those that meet the authentication requirements that are specified in the Authentication box on the Access tab. If your virtual server is on the Internet, Microsoft recommends that you do not grant relay access. If you do, unsolicited mail may be propagated. To grant or deny permissions to relay messages through the SMTP virtual server, follow these steps:

  1. Click Start, point to AllPrograms, point to Administrative Tools, and thenclick Internet Information Services (IIS) Manager.

  2. Right-click Default SMTP Virtual Server,and then click Properties.

  3. Click the Access tab.

  4. Under Relay restrictions, click Relay, and then do one ofthe following:

    • Click Only the list below.

    • Click All except the list below.

  5. Click Add.

  6. Click the settings that you want to use, add the computers,the group of computers, or the domain that you want to specify as exceptions tothe access setting that you selected in step 4, and then clickOK three times.

back to the top

Set Up a Smart Host

If you want to designate another SMTP server to handle all outgoing messages, you can set up a smart host to perform this task. After you set up the smart host, all outgoing messages that are designated for remote domains are routed through it. To configure a smart host, follow these steps:

  1. Click Start, point to AllPrograms, point to Administrative Tools, and thenclick Internet Information Services (IIS) Manager.

  2. Right-click Default SMTP Virtual Server,and then click Properties.

  3. Click the Delivery tab, and then clickAdvanced.

  4. In the Smart host box, type either thefully qualified domain name (FQDN) or the IP address of the smart hostserver.

    If you type an IP address, enclose the address in brackets(for example, [192.168.188.228]). This may improve performancebecause Microsoft SMTP Service does not perform name resolution.

  5. If you want Microsoft SMTP Service to try to deliverthe remote messages directly before it forwards them to the smart host, clickto select the Try to direct delivery before sending to smart hostcheck box. (By default, this check box is not selected.)

  6. Click OK two times.

back to the top

Troubleshoot

Issue: Messages are not sent to the Drop folder. This issue may occur because of either of the following conditions:

  • The path of the Drop folder is incorrect. Totroubleshoot this issue, follow these steps:

    1. Click Start, point to All Programs, point to Administrative Tools, and then click Internet Information Services (IIS) Manager.

    2. Double-click Default SMTP Virtual Server, and then click Domains.

    3. In the right pane, right-click the default domain, and then click Properties.

    4. In the Drop directory box, verify that the path of the Drop folder is valid.

  • Either the Drop folder or the hard disk where the Dropfolder is located is full. To troubleshoot this issue, free hard diskspace in either the Drop folder or on the hard disk where the Drop folder islocated. For additional information about how to troubleshoot Microsoft SMTP Service, click the following article number to view the article in the Microsoft Knowledge Base:

    323358 HOW TO: Troubleshoot a Web Server in Windows Server 2003

    For additional information about how to test Microsoft SMTP Service, click the following article numbers to view the articles in the Microsoft Knowledge Base:

    323350 HOW TO: Test SMTP Services Manually in Windows Server 2003

back to the top

REFERENCES

For additional information about how to set SMTP security options, click the following article numbers to view the articles in the Microsoft Knowledge Base:

324285 HOW TO: Set SMTP Security Options in Windows Server 2003

back to the top



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like