Enable Connection Filtering Agent on Exchange 2013

Block List Providers like zen.spamhaus.org are an important part to any mail server because they block 99% of the spam. One problem with Exchange 2013 is that this feature doesn’t work by default. The agent that creates the connection between your mail server and the Block List Provider is the “Connection Filtering Agent”, so you need to enable this agent.

  1. Change Directory to scripts folder.
    cd $exscripts 
  2. Install the agent.
    Install-TransportAgent -Name "Connection Filtering Agent" -TransportService FrontEnd -TransportAgentFactory "Microsoft.Exchange.Transport.Agent.ConnectionFiltering.ConnectionFilteringAgentFactory" -AssemblyPath "C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\agents\Hygiene\Microsoft.Exchange.Transport.Agent.Hygiene.dll"
  3. Add an IPBlocklistprovider
    Add-IPBlockListProvider -Name zen.spamhaus.org -LookupDomain zen.spamhaus.org -AnyMatch $true -Enabled $true
    Add-IPBlockListProvider -Name "SpamCop IPBlockListProvider" -LookupDomain "bl.spamcop.net" -IPAddressesMatch "127.0.0.2","127.0.0.5" -Priority 1
  4. Enable the agent
    Enable-TransportAgent -TransportService FrontEnd -Identity "Connection Filtering Agent"
  5. Restart FrontEnd transport service

    Restart-Service MSExchangeFrontEndTransport
  6. Check to see if the Agent is enabled
    Get-TransportAgent -TransportService FrontEnd -Identity "Connection Filtering Agent"
  7. Logging for the frontend agent is here “C:\Program Files\Microsoft\ExchangeServer\V15\TransportRoles\Logs\FrontEnd\AgentLog”
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s