Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Topic Last Modified: 2012-07-23

You can configure the EdgeTransport.exe.config file to manage the anti-spam agent log files. By default, Microsoft Exchange Server 2010 logs all anti-spam agent activity in the %programfiles%\Microsoft\Exchange Server\V14\TransportRoles\Logs\AgentLog directory. To filter the anti-spam agent logs, use the Get-AgentLog cmdlet. For more information, see Get-AgentLog.

The default configuration of the agent log files are as follows:

Looking for other management tasks related to managing anti-spam and antivirus features? Check out Managing Anti-Spam and Antivirus Features.

Modifying the EdgeTransport.exe.config File

All modifications of configuration options for managing agent log output must be made in the EdgeTransport.exe.config file that's located in the %programfiles%\Microsoft\Exchange Server\V14\Bin directory. The EdgeTransport.exe.config file is an XML application configuration file that's associated with the Microsoft Exchange Transport service. Changes that are saved to the EdgeTransport.exe.config file are applied after the Microsoft Exchange Transport service is restarted.

You can add new configuration options or modify existing configuration options in the <appSettings> section.

Agent Log Output Keys

Agent log output is managed by various keys in the EdgeTransport.exe.config file. By default, only the AgentLogEnabled key is present in the EdgeTransport.exe.config file. You must add all other keys. The following table explains each key in more detail.

Key Value type Description

AgentLogEnabled

System.Boolean

Valid values for this key are true or false. The default value is true.

AgentLogMaxDirectorySize

System.Int32

The value of this key specifies the maximum size, in bytes, of the AgentLog directory. When this value is exceeded, the oldest log file in the directory is deleted and a new log file is created.

If this key isn't specified, the default value is 250 MB, or 262144000 bytes, which is determined as follows: 250×1,024×1,024.

AgentLogMaxFileSize

System.Int32

The value of this key specifies the maximum size, in bytes, of each log file in the directory. When a log file reaches the size specified, a new log file is created.

If this key isn't specified, the default is 10 MB, or 10485760 bytes, which is determined as follows: 10×1024×1024.

AgentLogMaxAge

System.TimeSpan

The value of this key specifies the maximum age limit of a specified log file. When a log file exceeds the age limit, it's deleted.

This key is of system type TimeSpan. The value of this key can be represented as a string in the format d.hh:mm:ss.ff where d is days, hh is hours, mm is minutes, ss is seconds, and ff is fractions of a second.

If this key isn't specified, the default value is 30 days, or 30.00:00:00.00.

Add and configure the agent log output keys in the EdgeTransport.exe.config file

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Edge Transport server" entry in the Transport Permissions topic.

This example adds and configures agent log output keys for the AgentLogEnabled key in the EdgeTransport.exe.config file.

  1. On the Hub Transport server or Edge Transport server on which you want to manage the agent log output, open the EdgeTransport.exe.config in an ASCII text editor such as Notepad. The EdgeTransport.exe.config file is located in the %programfiles%\Microsoft\Exchange Server\V14\Bin directory.

  2. Locate the AgentLogEnabled key. By default, the keys are listed in alphabetical order under <appsettings>.

  3. Paste the following keys under the AgentLogEnabled key.

    Copy Code
    <add key="AgentLogMaxDirectorySize" value="system.int32" />
    <add key="AgentLogMaxFileSize" value="system.int32" />
    <add key="AgentLogMaxAge" value="system.timespan" />
    
  4. Verify that the AgentLogEnabled key is set to true, and add values for the other keys.

  5. When you have finished updating the EdgeTransport.exe.config file, save the file and close it.

  6. You must restart the Microsoft Exchange Transport service before the configuration changes will take effect.