How to enable Anti Spam features on Exchange Server 2013
In Exchange Server 2013 there are 2 roles now that are Mailbox and Client Access Server
The CAS in Exchange 2013 acts as a proxy only and does not do any data rendering or categorization. The message categorization happens on mailbox server now. So we need to enable Anti Spam agents on mailbox servers now.
Now Antispam feature is not enable to exchange Server by default. We need to run a script in Exchange Management Shell to enable the Anti spam.
Run this command using Exchange Management Shell
& $env:ExchangeInstallPath\Scripts\Install-AntiSpamAgents.ps1
This command will give you output as shown below
WARNING: Please exit Windows PowerShell to complete the installation.
WARNING: The following service restart is required for the change(s) to take effect : MSExchangeTransport
WARNING: The following service restart is required for the change(s) to take effect : MSExchangeTransport
Identity Enabled Priority
——– ——- ——–
Content Filter Agent True 8
WARNING: Please exit Windows PowerShell to complete the installation.
WARNING: The following service restart is required for the change(s) to take effect : MSExchangeTransport
WARNING: The following service restart is required for the change(s) to take effect : MSExchangeTransport
Sender Id Agent True 9
WARNING: Please exit Windows PowerShell to complete the installation.
WARNING: The following service restart is required for the change(s) to take effect : MSExchangeTransport
WARNING: The following service restart is required for the change(s) to take effect : MSExchangeTransport
Sender Filter Agent True 10
WARNING: Please exit Windows PowerShell to complete the installation.
WARNING: The following service restart is required for the change(s) to take effect : MSExchangeTransport
WARNING: The following service restart is required for the change(s) to take effect : MSExchangeTransport
Recipient Filter Agent True 11
WARNING: Please exit Windows PowerShell to complete the installation.
WARNING: The following service restart is required for the change(s) to take effect : MSExchangeTransport
WARNING: The following service restart is required for the change(s) to take effect : MSExchangeTransport
Protocol Analysis Agent True 12
We need to restart the Mailbox transport Service on mailbox Server after running this command
The Content Filter agent, Sender ID agent, Sender Filter agent, and Protocol Analysis (sender reputation) agent should now be installed and running on the Mailbox server.
To verify this, run the following commands in the Exchange Management Shell on the Mailbox server.
Get-TransportAgent
To enable content filtering, run the following command:
Set-ContentFilterConfig -Enabled $true
To verify this has worked run following command in EMS
Get-ContentFilterConfig
Now we need to enable content filtering for internal messages.
Run this command to enable it.
Set-ContentFilterConfig -InternalMailEnabled $true
To verify if this has worked we need to run this command
Get-ContentFilterConfig | Format-List InternalMailEnabled
We can disable content filtering for single users and multiple users
Set-ContentFilterConfig –Bypassedsenders manu@rimtech.in
To verify this we need to run this command
Get-ContentFilterConfig | Format-List Bypassed*
So we have successfully enabled Anti Spam agents and content filtering on Exchange Server 2013 mailbox server.
Hope you find this blog post helpful. Please provide your feedback in comments section.