Documentation Home > Exchange Anti-Spam Toolkit

Exchange Anti-Spam Toolkit Installing Exchange Anti-Spam Transport Agents

Anti-spam filtering in Exchange is performed by anti-spam agents, which are a type of Exchange Transport Agent. There are several anti-spam agents included with Exchange, and there are two additional agents included with QSS Exchange Anti-Spam Toolkit. There are also other types of built-in and third-party Transport Agents. All types of Transport Agents can be managed using the graphical user interface in QSS Exchange Anti-Spam Toolkit. The only built-in way of managing Transport Agents in Exchange is by using the PowerShell commands.

Built-in Anti-Spam Agents are not installed by default

The built-in anti-spam agents in Exchange are not installed by default and must be installed by running a PowerShell script. Correct installation of all anti-spam agents is essential to the operation of QSS Exchange Anti-Spam Toolkit.

Installing Built-in Anti-Spam Agents

If not already installed, the built-in Exchange Anti-Spam agents will need to be installed using the Exchange Management Shell. For more information about the built-in anti-spam agents, see Enable antispam functionality on Mailbox servers

To check if the built-in anti-spam agents are already installed, use the Dashboard page in QSS Exchange Anti-Spam Toolkit.

Installing all Built-in Anti-Spam Agents is Recommended

Even if you choose not to use some of the anti-spam agents, installing all built-in anti-spam agents is recommended. Individual agents can be enabled or disabled using QSS Exchange Anti-Spam Toolkit, or via Exchange PowerShell cmdlets.

You can install the built-in anti-spam agents by using either the Install-AntispamAgents.ps1 script included with Exchange (by default, in the %ExchangeInstallPath%\Scripts folder), or with the Install-AntispamAgents.ps1 script in the QSS Exchange Anti-Spam Toolkit installation directory (by default, %ProgramFiles%\Quantum Software Solutions\Exchange Anti-Spam Toolkit).

The script included with QSS Exchange Anti-Spam toolkit differs from the Exchange script in two ways:

  • The script included with QSS Exchange Anti-Spam Toolkit installs the Connection Filtering Agent even on Hub Transport servers, whereas the Exchange script only installs it on Edge Transport servers.
  • The script included with QSS Exchange Custom Sender installs the agents in a different priority order.

It is also possible to install anti-spam transport agents by manually adding them using QSS Exchange Anti-Spam Toolkit or by manually entering PowerShell commands, although this is not recommended.

Service Restart Required

The Microsoft Exchange Transport Service must be restarted after installing, enabling or disabling any Transport Agents. If any modified Transport Agents are installed on the Front-End Transport Service (see below), the Microsoft Exchange Frontend Transport Service must also be restarted.

Both of these services can be restarted from the Transport Agents page in QSS Exchange Anti-Spam Toolkit.

Transport Agent Priority

The priority order of both built-in and additional transport agents may need to be adjusted after installation. See Verifying Exchange Anti-Spam Transport Agents for additional information regarding priorities of Transport Agents.

Installing the Connection Filtering Agent

If the built-in agents have already been installed using the Exchange script in an environment without Edge Transport servers, the Connection Filtering agent will not be installed. It is highly recommended that the Connection Filtering Agent be manually installed on the Hub Transport server if Edge Transport servers are not used.

The Connection Filtering Agent is one of the most effective anti-spam filtering techniques and is required for operation of the IP Block List and IP Allow List functionality.

The Connection Filtering Agent can be installed by running the following commands in Exchange Management Shell:

Install-TransportAgent -TransportService Hub -Name "Connection Filtering Agent" -AssemblyPath ($env:ExchangeInstallPath + "TransportRoles\agents\Hygiene\Microsoft.Exchange.Transport.Agent.Hygiene.dll") -TransportAgentFactory "Microsoft.Exchange.Transport.Agent.ConnectionFiltering.ConnectionFilteringAgentFactory"

Enable-TransportAgent "Connection Filtering Agent" -TransportService Hub

Set-TransportAgent "Connection Filtering Agent" -Priority 1

Restart-Service MsExchangeTransport

Installing Additional (Third-Party) Transport Agents

The additional transport agents provided with QSS Exchange Anti-Spam Toolkit are automatically installed. However correct installation should be verified on the Dashboard.

If the QSS Sender Score Agent or QSS URL Blocklist Agent are not installed, use Exchange Management Shell to run the InstallTransportAgents.ps1 script in the QSS Exchange Anti-Spam Toolkit installation directory (by default, %ProgramFiles%\Quantum Software Solutions\Exchange Anti-Spam Toolkit).

Installation Details of Built-in Anti-Spam Agents

The technical/installation details of the built-in Exchange anti-spam agents are shown below. The Assembly Path for all built in Exchange anti-spam agents is Microsoft.Exchange.Transport.Agent.Hygiene.dll, which by default, is located in the %ProgramFiles%\Microsoft\Exchange Server\V15\TransportRoles\agents\Hygiene folder.

Transport Agent Name Transport Agent Factory
Connection Filtering Agent Microsoft.Exchange.Transport.Agent.ConnectionFiltering.ConnectionFilteringAgentFactory
Sender Filter Agent Microsoft.Exchange.Transport.Agent.ProtocolFilter.SenderFilterAgentFactory
Sender Id Agent Microsoft.Exchange.Transport.Agent.SenderId.SenderIdAgentFactory
Protocol Analysis Agent Microsoft.Exchange.Transport.Agent.ProtocolAnalysis.ProtocolAnalysisAgentFactory
Recipient Filter Agent Microsoft.Exchange.Transport.Agent.ProtocolFilter.RecipientFilterAgentFactory
Content Filter Agent Microsoft.Exchange.Transport.Agent.ContentFilter.ContentFilterAgentFactory

Installation Details of Additional Anti-Spam Agents

The technical/installation details of the QSS Sender Score Agent are shown below.

Transport Agent Name QSS Sender Score Agent
Transport Agent Factory QSS.ExchangeAntiSpamToolkit.SenderScoreAgent.SenderScoreAgentFactory
Assembly Path %ProgramFiles%\Quantum Software Solutions\Exchange Anti-Spam Toolkit\SenderScoreAgent\QSS.ExchangeAntiSpamToolkit.SenderScoreAgent.dll

The technical/installation details of the QSS URL Blocklist Agent are shown below.

Transport Agent Name QSS URL Blocklist Agent
Transport Agent Factory QSS.ExchangeAntiSpamToolkit.UrlBlocklistAgent.UrlBlocklistAgentFactory
Assembly Path %ProgramFiles%\Quantum Software Solutions\Exchange Anti-Spam Toolkit\UrlBlocklistAgent\QSS.ExchangeAntiSpamToolkit.UrlBlocklistAgent.dll