Topic Last Modified: 2007-05-08

Protocol logs track the commands that the Simple Mail Transfer Protocol (SMTP) virtual server receives from SMTP clients over the network. You can choose which logging format the SMTP service uses for recording information.

When setting up a log file, remember that the log formats and default file names are the same as those used by other services in Internet Information Services (IIS). 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 different location from the default, be sure it is stored on a local drive, not on a network. Also, because logging is shared with IIS, some of the names are not SMTP specific.

Important:
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 Events and Errors Message Center.

For detailed information about transaction logging and formats, see Monitoring Message Transactions.

Procedure

To enable logging that uses an ASCII text format

  1. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.

  2. On the General tab, select Enable logging.

  3. In the Active log format drop-down menu, select a log format.

  4. Click Properties, and then on the General tab, specify the New log schedule.

    If you select Hourly, Daily, Weekly, or Monthly, a new log file is created at those intervals.

    If you select Unlimited file size, only a single log file is created.

    If you select When file size reaches, you can specify the maximum size of the log file and a new log file is created when the current log file reaches that size.

  5. On the General tab, under Log file directory, specify the location where the log files will be stored.

  6. If you have selected the World Wide Web Consortium (W3C) Extended Logging format, click the Advanced tab, and then select the extended logging options you want to track.

To enable logging that uses the ODBC format

  1. Set up an ODBC-compliant database. For instructions about how to set up an ODBC-compliant database, see Set Up an ODBC-Compliant Database.

  2. In Microsoft Management Console, select the SMTP virtual server, and then click Properties on the Action menu.

  3. On the General tab, select Enable logging.

  4. In Active log format, select ODBC Logging.

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