IIS includes support for the Simple
Mail Transfer Protocol, the predominant protocol
used to transport email throughout the Internet.
In this chapter, you will learn how to install and
configure the Microsoft SMTP Service, configure
the SMTP Service to host message traffic, and
optimize performance of the SMTP Service. The
chapter ends with a quiz and suggested activities.
The Simple Mail Transfer Protocol (SMTP), the
predominant protocol used to transport e-mail
throughout the Internet, has revolutionized the
way many companies do business. IIS includes
support for both protocols for use in private
intranets or on the Internet.
completion of this module, you will be able to
- Install and configure the Microsoft SMTP
- Configure the SMTP Service to host message
- Optimize performance of the SMTP Service
OVERVIEW OF SMTP
When you send e-mail, the recipient does
not have to be online when the message is sent.
Your e-mail application uploads the message to a
server running SMTP, which stores the message
until the recipient’s SMTP server is available,
then forwards the message. The recipient’s SMTP
server runs another service that places the
message into the recipient’s mailbox, where it
waits for the recipient to use yet a different
protocol, such as Post Office Protocol version 3
(POP3) or Internet Message Access Protocol (IMAP),
to download the message.
|Note: Neither SMTP nor IIS can
sort incoming e-mail into mailboxes and let
users “check their e-mail.” Installing the SMTP
Service does not install POP3 or IMAP, which
permit users to have separate private message
storage areas. SMTP support is only for sending
e-mail between mail
The SMTP Service included
with IIS is 100 percent compliant with the Request
For Comments (RFCs 821 and 822) that define how
e-mail should be sent over the Internet. The SMTP
Service gives Web application developers an easy
way to include e-mail functionality in their
SMTP SERVICE INSTALLATION
The SMTP Service installs as an optional
subcomponent of IIS. Its hardware and software
requirements are identical to the requirements for
A set of special folders is created
for SMTP to use. The default location for this
folder set is C:\Inetpub\Mailroot, but you can
choose a different location during setup (however,
the Mailroot folder must be located in the same
partition as the SMTP Service files). Table
9.1 describes the different subfolders of
\Inetpub\Mailroot. We’ll discuss their exact
functions later in this module.
MONITORING THE SMTP SERVICE
stop, start, pause, and resume the SMTP Service
with either the Services applet in Control Panel
or the Rebar in Internet Service Manager. From the
command line, you can achieve the same results by
typing one of the following:
net stop smtpsvc
net start smtpsvc
net continue smtpsvcOnce
paused, the SMTP Service continues to deliver and
receive messages over connections established
before the service was paused, but no new
connections can be made. If stopped, the SMTP
Service immediately terminates all connections.
All events that the SMTP Service generates
are recorded in the System Log of the Event
Viewer. In addition, counters are added to
Performance Monitor for the SMTP Service.
OVERVIEW OF THE MESSAGE DELIVERY
Before you deliver a
message with SMTP, it must be placed under the
control of the SMTP Service. There are three
methods of giving a message to the SMTP Service
One method is to use an
e-mail client, such as Microsoft Outlook Express.
In the client application, specify the IIS server
as the outgoing SMTP server for sending messages,
then compose and send Internet e-mail in the
regular way. (The application cannot download
messages from the user’s mailbox this way,
A second way to hand control of a
message to the SMTP Service is to place a properly
formatted text file in the Mailroot\Pickup folder.
What qualifies as properly formatted is defined in
RFCs 821 and 822, but includes, for example, the
sender’s and receiver’s e-mail addresses in the
header. All files copied to the Mailroot\Pickup
folder are processed and delivered as regular
mail. You can move a single file or many thousands
of files into the Mailroot\Pickup folder for
delivery, either manually or with a custom program
or batch file.
Let’s give this method a
The third method for giving a message to
the SMTP Service for delivery requires another
SMTP server (Microsoft or otherwise). The remote
SMTP server connects to IIS, attaches to the SMTP
Service on port 25 (the default), and passes along
any messages destined for e-mail domains hosted on
the IIS server. Or, if the SMTP Service is
configured to relay messages to domains hosted on
other SMTP servers, the remote SMTP server passes
along messages for routing to these other servers.
- Open Notepad and type
Subject: Results are in.
- Add two extra blank lines at the end.
- Expand your Default SMTP Site in Internet
Service Manager, and select the Domains object.
- In the Results Pane, note the name of your
default local domain name; replace “mycorp” in
Notepad with the name of your default local
- Save this file, using any file name, to the
- Check the Mailroot\Drop folder for a new
file with an .eml extension (it will not have
the same name as the file you saved). Open this
message in Notepad.
- If your message did not arrive, check the
Mailroot\Queue folder, where messages not
destined for a local domain are sent.
In each case, the SMTP Service acquires
the message and places it in the Mailroot\Queue
folder. IIS attempts to send any new messages
deposited in this folder right away. If immediate
delivery is not possible — perhaps due to
congestion at the receiving SMTP server — IIS
resends queued messages (you can configure the
number of retries and intervals). You cannot place
messages directly into Mailroot\Queue (as you can
with the Pickup folder) because the messages will
not be properly formatted and numbered.
When the destination of the message is an
e-mail domain hosted on the IIS server itself, the
message file is placed in the Mailroot\Drop
folder. This is the end of SMTP processing; the
SMTP Service’s job is done.
the SMTP Service receives a message with a remote
domain destination, IIS connects directly to an
SMTP server for that domain and relays the
message. IIS finds the IP address of the remote
SMTP server by querying DNS. DNS servers maintain
special records (MX records) that map e-mail
domains to the IP addresses of the SMTP servers
responsible for those domains. For example, if a
recipient’s e-mail address is leslie@mail
.mycorp.com, the e-mail domain is mail.mycorp.com.
The SMTP Service connects to remote systems on
port 25, unless configured otherwise.
Page: 1, 2,
comments on this Chapter | View
Comments on this Chapter (3 Comments)