Software

Configure IT Quick: Configure and maintain the SMTP service in IIS 5.0

Teach IIS some new e-mail tricks


Many administrators don't realize that Microsoft Internet Information Services (IIS) 5.0 ships with an SMTP service. Keep in mind that this is not Microsoft Exchange or even the equivalent of any basic mail server application on the market. It is simply a tool to allow you to send and receive e-mail that is related to your IIS box. For example, this service may be used for sending confirmation e-mails to visitors in response to their feedback. It may also be used to send confirmation on orders placed via a shopping cart or perhaps to send an e-mail to an admin over the Internet or intranet. Let's take a look at some of the basic SMTP features in IIS and see how to properly configure this SMTP service from the IIS console.

Installing the SMTP service
With the release of Windows 2000, the SMTP service has become less complicated and easier to configure. To configure the SMTP service, you must have IIS installed. To install IIS, click Start | Settings | Control Panel | Add/Remove Programs. Next, choose Add/Remove Windows Components, select IIS, and choose Details. Select the SMTP check box and click OK. Click Next and insert the Windows CD when prompted or browse to the I386 directory if you installed it on the hard drive. Now that you have IIS installed, you can access it by opening Start | Programs | Administrative Tools | Internet Services Manager. Once you have the console open, you should see the Default SMTP Virtual Server icon.

Working with SMTP
When installing the SMTP Service within IIS, the installation routine also creates a mailroot directory inside the default InetPub directory on the server (Figure A).

Figure A
The mailroot directory for the SMTP service


Each of the folders in the mailroot directory will hold SMTP mail during different stages of transit. Basically, Windows 2000 will first place sent mail messages in the Pickup directory. Next, the SMTP service will move them to the Queue directory where they'll wait until delivery. When mail arrives, it is placed in the Queue directory where it waits for the SMTP services to move it to the Drop directory. The SortTemp folder is used to store temporary files, and the Badmail folder is used to store messages that can’t be delivered.

As a best practice, it is recommended that you frequently monitor your Badmail and Queue folders to make sure that you do not have a problem with your SMTP service.

Working with domains
The SMTP virtual server created during installation will handle mail delivery for your default domain. If you are hosting only one domain, you won't need to install any additional SMTP virtual servers, but you will if you're hosting multiple domains.

To install an SMTP virtual server, right-click on the Default SMTP virtual server and select New Virtual Server. Next, enter your virtual server description and select the IP address for the server. Then, choose your home directory (this is the path where your mailroot is created) and type the fully qualified domain names for this SMTP virtual server. Once you are finished, you should see a new SMTP icon with the name you gave as a description for your new SMTP virtual server.

The IIS configuration of SMTP creates a domain with the appropriate DNS address of the server in which it has been configured. Expand your Default SMTP Virtual Server, click on Domains, right-click on one of the domains listed in the panel on the right side, and select Properties. This will open up a window in which you can specify the Drop Directory for this domain (Figure B).

Figure B
Set the drop directory for mail.


In this example, all mail that is sent to the @sql2000.ultimate.com will be accepted for local delivery and placed in the C:\Inetpub\mailroot\drop directory.

You can also create remote domains on your SMTP server. To do this, right-click on Domains and choose New | Domain. In the first window of the New SMTP Domain Wizard, select Remote as the domain type. Next, enter the new domain name (yukon.com, in my example) that this remote domain represents and click Finish. We can now view properties of the domain by double-clicking on the newly created domain (Figure C).

Figure C
Properties of a newly created domain


Configuring SMTP properties
You can also configure the SMTP service in the Default SMTP Virtual Server properties sheet. To access this area, right-click on the Default SMTP Virtual Server icon and select Properties (Figure D).

Figure D
Properties of the default SMTP service


The General tab allows you to specify your IP address of the SMTP Virtual Server and specify your incoming and outgoing connection information. You can also enable logging of this service to monitor it effectively. Once you enable logging, specify your log format and configure your logging properties.

The Access tab allows you to configure your Access Control, Secure Communication, Connection Control, and Relay Restrictions, as shown in Figure E.

Figure E
Access settings


The Messages tab allows you to determine your transmission requirements and limits. The Delivery tab lets you configure your delivery and routing options (Figure F).

Figure F
Set up delivery settings.


The LDAP Routing window can be used to request all of your mail users from an LDAP server. To activate LDAP Routing, select the Enable LDAP Routing check box. Then, you can configure the following fields:
  • Server
  • Schema
  • Binding
  • Domain
  • User name
  • Password
  • Base

The Security tab allows you to add Windows accounts and groups to the list of SMTP virtual server operators.

Summary
You can manage your SMTP in a variety of ways, and each administrator might use it differently within his or her organization. Once you understand the fundamentals of configuring SMTP with IIS 5.0 and know how to configure your SMTP Virtual Server service, you will be well on your way to using your Windows 2000 IIS system for transporting mail messages.

 

Editor's Picks