Tech for Techs

Servers => Microsoft Exchange => Topic started by: James on November 21, 2013, 11:08:58 AM

Title: Shell - Configure sender filtering
Post by: James on November 21, 2013, 11:08:58 AM
Block messages from a specific e-mail address:

Set-SenderFilterConfig -BlockedSenders example@contoso.com,example2@contoso.com




Block messages from a specific domain:

Set-SenderFilterConfig -BlockedDomains contoso.com




Block messages from a specific domain and all subdomains:

Set-SenderFilterConfig -BlockedDomainsAndSubdomains contoso.com




Add a sender or domain to a previously created blocked list:

The examples above replace the current list of blocked senders. If you have previously configured your list and would like to add a sender or domain you can use the following commands to avoid having to retype your entire list.

$Configuration = Get-SenderFilterConfig
$Configuration.BlockedSenders += "example@contoso.com"
$Configuration.BlockedDomains += "contoso.com"
Set-SenderFilterConfig -BlockedSenders $Configuration.BlockedSenders -BlockedDomains $Configuration.BlockedDomains





Block messages that don't specify a sender:

Set-SenderFilterConfig -BlankSenderBlockingEnabled $true