User Tools

Site Tools


internet:mail:exchange:exchange_filter

Exchange Filtering

Exchange 2013

Block Sender and Domains

To replace existing values:

Set-SenderFilterConfig -BlockedSenders <sender1,sender2...> -BlockedDomains <domain1,domain2...> -BlockedDomainsAndSubdomains <domain1,domain2...>

To add or remove entries without modifying any existing values:

Set-SenderFilterConfig -BlockedSenders @{Add="<sender1>","<sender2>"...; Remove="<sender1>","<sender2>"...} -BlockedDomains @{Add="<domain1>"

To verify:

Get-SenderFilterConfig | Format-List BlockedSenders,BlockedDomains,BlockedDomainsAndSubdomains

Configuration

Example

:!: Note that we add the external spam filter service CIDR address blocks as 'internal'.

In the Exchange Management Shell:

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

Get-TransportConfig | Format-List InternalSMTPServers
Set-TransportConfig -InternalSMTPServers @{Add="10.10.0.2","192.168.1.21","185.201.16.0/22","199.89.0.0/21"}

Get-SenderFilterConfig | fl BlockedSenders, BlockedDomains
Set-SenderFilterConfig -Enabled $true
Set-SenderFilterConfig -BlankSenderBlockingEnabled $true

Get-RecipientFilterConfig | fl BlockedRecipients
Set-RecipientFilterConfig -Enabled $true

Get-RecipientFilterConfig
Set-RecipientFilterConfig -RecipientValidationEnabled $true

Get-ReceiveConnector

Get-ReceiveConnector "EXCH-01\Default Frontend EXCH-01" | fl tar*
Set-ReceiveConnector "EXCH-01\Default Frontend EXCH-01" -TarpitInterval 00:00:06

Get-SenderReputationConfig | Format-List Enabled,*MailEnabled
Set-SenderReputationConfig -Enabled $true

Get-SenderReputationConfig
Set-SenderReputationConfig -SrlBlockThreshold 6 -SenderBlockingPeriod 36

Get-SenderReputationConfig | Format-List ProxyServer*

Restart-Service MSExchangeTransport
internet/mail/exchange/exchange_filter.txt · Last modified: 2018/06/29 08:36 (external edit)