Enabling Protocol Logging
Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1
Use the General tab to enable transaction logging and to select the format. When setting up the log file, keep in mind that the log formats and default file names are the same as those used by other IIS services. If you choose the default names, all transactions for all services are recorded in the same file. You can set up a separate file for each service if you want to maintain separate records.
If you set up the file in a location other than the default, make sure it is stored on a local drive and not on a network.
Auditing server activity with log files is a good way to detect if unauthorized external users are attempting to access your virtual server, or if internal users are trying to access resources they do not have permission to access. For more information about auditing and using Event Viewer, see Windows Server 2003 family Help.
Important
You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /User:Administrative_AccountName "mmc systemroot\system32\inetsrv\iis.msc".
Procedures
To enable logging that uses one of the ASCII text formats
In IIS Manager, right-click the SMTP virtual server, and then click Properties.
On the General tab, select the Enable logging check box.
In the Active log format list, click a transaction log format. If you chose the W3C Extended Log File Format, click the Advanced tab, and then click the items you want to track.
Click Properties, and then set the log file size and location.
To enable logging that uses the ODBC format
Set up an ODBC-compliant database.
In IIS Manager, right-click the SMTP virtual server, and then click Properties.
On the General tab, select the Enable logging check box.
In the Active log format list, click ODBC Logging.
Click Properties, and then set the log file size and location.
Related Information
For information about monitoring message transactions, see Monitoring Message Transactions.
For information about setting up an ODBC-compliant database, see Setting Up an ODBC-Compliant Database.