Re-visiting IIS SMTP Service and its folder structure
I had a SMTP server failure early this morning, which reminded me to review how this basic SMTP service that come with IIS 6.0 on Windows Server 2003 works. There is a blog post up on Remote Server Support that explains quite well and clear how SMTP service in Windows 2003 works and what its folder structure looks like. I am going to just be a copy-cat and quoting them below as a reference to myself and anyone who might be interested, in case the original post disappeared one day.
IIS SMTP Service Folder Structure
The Mailroot folder will be created automatically after you install and enable the IIS SMTP Service, with the subfolders listed below:
- Pickup: The SMTP service processes messages from the Pickup folder as outbound messages or as messages for delivery.
- Drop: Incoming messages intended for the local domains are placed in this folder.
- Queue: Messages that cannot be delivered immediately are moved by SMTP service to this folder from the Pickup folder.
- Badmail: It stores messages that could not be forwarded to the recipient, even after attempts have been made for a predefined number of times. This is the folder sometimes you need to keep your eyes on because these bad mails may eventually fill up your hard drive space.
- Mailbox, Route, SortTemp: They are no longer used in IIS 6.
How IIS SMTP service processes mail?
- The SMTP service, smtpsvc.dll, runs in-process in the Inetinfo.exe IIS process.
- Smtpsvc.dll monitors TCP port 25 for any incoming messages.
- It monitors the Pickup folder for all outgoing messages.
- SMTP places messages for users that are members of the local domain it manages in the Drop folder for delivery.
- If a message has to be sent to a user that is a member of a different or remote domain, an ASP application has to create and place the outgoing message in the Pickup folder. This is done through the ASP application using CDOSYS.
- The SMTP service then performs a DNS lookup on the name server so that it can find the SMTP host that manages the remote domain. The port used for this process is port 53. The SMTP service checks for the MX record for the remote domain.
- After the fully qualified domain name (FQDN) of the remote SMTP host is determined, the SMTP service attempts to create a connection with the remote SMTP host to transfer the message for the recipient to it. Port 25 is utilized for the message transfer.
- If a connection cannot be established with the remote SMTP host, the SMTP service places the message in the Queue folder.
- If a connection can be established with the remote SMTP host but the connection is rejected by the remote SMTP host, the SMTP service forwards the sender of the message a non-delivery report (NDR), and returns the message as well. The message is placed in the Badmail folder if it cannot be returned to the sender.
- If a connection can be established with the remote SMTP host and the remote SMTP host accepts the connection, the SMTP service transfers the message to the remote SMTP host.
- After the message is received by the remote SMTP host it is sent to the POP3 or IMAP mail server which contains the mailbox of the intended recipient.
- The message is downloaded when the client connects to the POP3 or IMAP mail server.
Note that these info are only useful to SMTP Service that come with IIS 6.0. I haven’t had chance working on the latest version yet. So I will update that later.
Again, thanks to Remote Server Support for sharing this useful info.
Can anyone recommend the well-priced Network Monitoring program for a small IT service company like mine? Does anyone use Kaseya.com or GFI.com? How do they compare to these guys I found recently: N-able N-central malware detection
? What is your best take in cost vs performance among those three? I need a good advice please… Thanks in advance!