2017-03-29

Enabling AntiSpam agents on Exchange 2016 Mailbox server, including Connection Filtering Agent

If you have no Edge server and want to use Exchange anti spam features, you probably already know how to install antispam agents on mailbox server:

& $env:ExchangeInstallPath\Scripts\Install-AntiSpamAgents.ps1

However this does not enable connection filtering agent, which is by far the most useful of all the agents since it allows to use online blacklists. To enable this service in exchange shell run (one line):

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"

You will also need to configure it with your favorite RBLs, for example:

Add-IPBlockListProvider -Name zen.spamhaus.org -LookupDomain zen.spamhaus.org -AnyMatch $true -Enabled $true
Add-IPBlockListProvider -name bl.spamcop.net -LookupDomain bl.spamcop.net -AnyMatch $true -Enabled $true
Add-IPBlockListProvider -name b.barracudacentral.org -LookupDomain b.barracudacentral.com -AnyMatch $true -Enabled $true
Enable-TransportAgent -TransportService FrontEnd -Identity "Connection Filtering Agent"
Restart-Service MSExchangeTransport

Links:

5 comments:

  1. Thanks alot for sharing such a great information, Keep Writting for us please ..

    Best Regards,
    Get Best Ideas

    ReplyDelete
  2. Anonymous18.4.18

    All the commands were successful, but "Connection Filtering" still does not show up in ECP. Any suggestions?

    ReplyDelete
  3. Thanks for sharing this.EdbMails EDB to PST Converter Tool is an effective & reliable tool provides impeccable recovery. This tool recover & repair all damaged .edb files and then transfer them into usable format that is PST. It supports all versions of Windows and restore PST files in your location. It restores all files in original formats such as HTML, Text, RTF, etc. It is preview of all damaged or corrupted EDB files before restoration. Free availability of trial version with the help of you can easily understand the complete procedure of recovery.


    For more information visit: Convert EDB to PST

    ReplyDelete
  4. As per link below, this method doesn't work in Exchange 2016 (Connection filtering agent appears as enabled, but does nothing).
    https://social.technet.microsoft.com/Forums/office/en-US/1225f347-5921-4ab5-bd41-e75e18716d36/ip-block-list-not-working-exchange-2016?forum=Exch2016MFSM#c2ec769e-0073-41ea-bbc0-5fdb45b206fe

    ReplyDelete
    Replies
    1. nice find. saved me a lot of time

      Delete