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

  1. In IIS Manager, right-click the SMTP virtual server, and then click Properties.

  2. On the General tab, select the Enable logging check box.

  3. 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.

  4. Click Properties, and then set the log file size and location.

To enable logging that uses the ODBC format

  1. Set up an ODBC-compliant database.

  2. In IIS Manager, right-click the SMTP virtual server, and then click Properties.

  3. On the General tab, select the Enable logging check box.

  4. In the Active log format list, click ODBC Logging.

  5. Click Properties, and then set the log file size and location.