ITCare24/7

 

 

Save

How to manage sender filtering on Exchange 2013

At first I thought I needed to install it, as I did with the anti-spam, but I wanted to look up wheter it was active or not before I began:

Get-SenderFilterConfig | select name,enabled | fl
01
Turns out it was enabled as default

Enable / disable sender filtering:

If you need to enable sender filtering, run the following command:
Set-SenderFilterConfig -Enabled $true
To disable sender filtering, run the following command:
Set-SenderFilterConfig -Enabled $false

Verify the state of sender filtering:
Get-SenderFilterConfig | Format-List Enabled
or
Get-SenderFilterConfig | select name,enabled | fl

02
Get-SenderFilterConfig | format-list blocked*
03

Lets block a sender domain

More about the subject here: Exchange 2013: Using the BlockedDomainsAndSubdomains option.

Here we block all mails from one of the the domains sending spam mails to me. After setting the filtering, we check our block list:
Set-SenderFilterConfig -BlockedDomainsAndSubdomains vvfad.ru
Get-SenderFilterConfig | format-list blocked*

04
Success

Here’s an example from the MS site. Adding this, as it shows how to add various entries without wiping the existing entries. It’s the @{Add=””} which is worth noting. It Works for all multi-tiered AD objects.

This example configures the Sender Filter agent with the following information:

  • Add This email address is being protected from spambots. You need JavaScript enabled to view it. and This email address is being protected from spambots. You need JavaScript enabled to view it. to the list of existing senders who are blocked.
  • Remove tailspintoys.com from the list of existing sender domains that are blocked.
  • Add blueyonderairlines.com to the list of existing sender domains and subdomains that are blocked.

Set-SenderFilterConfig -BlockedSenders @{Add="This email address is being protected from spambots. You need JavaScript enabled to view it.","This email address is being protected from spambots. You need JavaScript enabled to view it."} -BlockedDomains @{Remove="tailspintoys.com"} -BlockedDomainsAndSubdomains @{Add="blueyonderairlines.com"}

Lets add kamchatka-msc.ru to our blocked domains list:
Set-SenderFilterconfig -BlockedDomainsAndSubdomains @{Add="kamchatka-msc.ru"}
Get-SenderFilterConfig | format-list blocked*
05

Lets block an iprange as well:
This example adds the IP address 37.215.0.0/16 to the list of blocked IP addresses.
Add-IPBlockListEntry -IPAddress 37.215.0.0
06
Lets verify our entry. After verifying I’m going to remove the entry, as I want to test my senders filter first.
Get-IPBlockistEntry
Remove-IPBlockListEntry 1

07

Blocking message with blank senders
This example configures the Sender Filter agent to block messages that don’t specify a sender in the MAIL FROM: SMTP – Sencond line disables it Again.
Set-SenderFilterConfig -BlankSenderBlockingenabled $true
Set-SenderFilterConfig -BlankSenderBlockingEnabled $false

Activate recipientfiltering

We also want to activate check on recipients before we blindly accepts mails.

Set-RecipientFilterConfig -RecipientValidationEnabled:$true

Sources:

Source: http://www.itnotes.eu/?p=1355
Microsoft Manage Sender Filtering http://technet.microsoft.com/en-us/library/bb124087(v=exchg.150).aspx

Add-IPBlockListEntry: http://technet.microsoft.com/en-us/library/aa995923(v=exchg.150).aspx

LATEST NEWS

FOLLOW US