Export (0) Print
Expand All

Manage Sender Filtering

 

Applies to: Exchange Server 2013

Topic Last Modified: 2012-10-03

Sender filtering is provided by the Sender Filter agent. The Sender Filter agent relies on the MAIL FROM: SMTP header to determine what action, if any, to take on an inbound email message.

When sender filtering functionality is enabled on an Exchange server, sender filtering functionality filters all messages that come through all Receive connectors on that computer.

  • Estimated time to complete each procedure: 5 minutes
  • You need to be assigned permissions before you can perform this procedure or procedures. To see what permissions you need, see the "Anti-spam features" entry in the Anti-Spam and Anti-Malware Permissions topic.
  • You can only use the Shell to perform this procedure.
  • By default, anti-spam features aren't enabled in the Transport service on a Mailbox server. Typically, you only enable the anti-spam features on a Mailbox server if your Exchange organization doesn't do any prior anti-spam filtering before accepting incoming messages. For more information, see Enable Anti-Spam Functionality on a Mailbox Server.
  • For information about keyboard shortcuts that may apply to the procedures in this topic, see Keyboard Shortcuts in the Exchange Admin Center.
tipTip:
Having problems? Ask for help in the Exchange forums. Visit the forums at: Exchange Server, Exchange Online, or Exchange Online Protection

To disable sender filtering, run the following command:

Set-SenderFilterConfig -Enabled $false

To enable sender filtering, run the following command:

Set-SenderFilterConfig -Enabled $true
noteNote:
When you disable sender filtering, the underlying Sender Filter agent is still enabled. To disable the Sender Filter agent, run the command: Disable-TransportAgent "Sender Filter Agent".

To verify that you have successfully enabled or disabled sender filtering, do the following:

  1. Run the following command:
    Get-SenderFilterConfig | Format-List Enabled
    
  2. Verify the value displayed is the value you configured.

To replace the existing values, run the following command:

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

This example configures the Sender Filter agent to block messages from kim@contoso.com and john@contoso.com, messages from the fabrikam.com domain, and messages from northwindtraders.com and all its subdomains.

Set-SenderFilterConfig -BlockedSenders kim@contoso.com,john@contoso.com -BlockedDomains fabrikam.com -BlockedDomainsAndSubdomains northwindtraders.com

To add or remove entries without modifying any existing values, run the following command:

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

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

  • Add chris@contoso.com and michelle@contoso.com 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="chris@contoso.com","michelle@contoso.com"} -BlockedDomains @{Remove="tailspintoys.com"} -BlockedDomainsAndSubdomains @{Add="blueyonderairlines.com"}

To verify that you have successfully configured blocked senders, do the following:

  1. Run the following command:
    Get-SenderFilterConfig | Format-List BlockedSenders,BlockedDomains,BlockedDomainsAndSubdomains
    
  2. Verify the values displayed are the values you configured.

To enable or disable blocking message with blank senders, run the following command:

Set-SenderFilterConfig -BlankSenderBlockingenabled <$true | $false>

This example configures the Sender Filter agent to block messages that don't specify a sender in the MAIL FROM: SMTP command:

Set-SenderFilterConfig -BlankSenderBlockingEnabled $true

To verify that you have successfully enabled or disabled blocking messages with blank senders, do the following:

  1. Run the following command:
    Get-SenderFilterConfig | Format-List BlankSenderBlockingEnabled
    
  2. Verify the value displayed is the value you configured.
 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft