Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007
Topic Last Modified: 2006-07-24

This topic explains how to block sender e-mail addresses or sender domains by using the Sender Filter agent.

In addition to blocking e-mail addresses or domains, you can configure the Sender Filter agent to block inbound messages that do not specify a sender and domain in the MAIL: FROM SMTP header. This feature is used to prevent denial of service attacks (DoS) on your Microsoft Exchange Server 2007 server. Most legitimate Simple Mail Transfer Protocol (SMTP) messages come from SMTP servers that provide a sender and a domain in the MAIL FROM SMTP command.

Before You Begin

To perform the following procedures on a computer that has the Edge Transport server role installed, you must log on by using an account that is a member of the local administrators group on that computer.

Also, before you perform these procedures, confirm the following:

Procedure

To use the Exchange Management Console to add blocked senders and domains to the Sender Filter agent

  1. In the Exchange Management Console, click Edge Transport.

  2. In the work pane, click the Anti-spam tab, and then select Sender Filtering.

  3. In the action pane, click Properties.

  4. Click the Blocked Senders tab, and then click Add.

    1. To block a specific sender, select the Individual e-mail address option, and then type the e-mail address in the text box, as follows, for example, kim@contoso.com.

    2. To block a domain, select the Domain option, and type the domain in the text box, as follows, for example, contoso.com. If you want to block all subdomains of the domain that is specified in the text box, for example, mail.contoso.com, select the Include all subdomains check box.

  5. Select the Block Messages from blank senders check box to block inbound messages from senders that do not specify a sender and a domain in the MAIL: FROM SMTP header.

  6. Click Apply to save your changes without closing the dialog box, or click OK to save your changes and close the dialog box.

To use the Exchange Management Shell to add blocked senders and domains to the Sender Filter agent

  • To block a specific e-mail address, run the following command:

    Copy Code
    Set-SenderFilterConfig -BlockedSenders <MultiValuedProperty>
    

    For example, to block kim@contoso.com, run the following command:

    Copy Code
    Set-SenderFilterConfig -BlockedSenders kim@contoso.com
    
  • To block a domain, run the following command:

    Copy Code
    Set-SenderFilterConfig -BlockedDomains <MultiValuedProperty>
    

    For example, to block the domain contoso.com, run the following command:

    Copy Code
    Set-SenderFilterConfig -BlockedDomains contoso.com
    
  • To block a domain and its subdomains, run the following command:

    Copy Code
    Set-SenderFilterConfig -BlockedDomainsAndSubdomains <MultiValuedProperty>
    

    For example, to block the domain contoso.com and all its subdomains, such as mail.constoso.com, run the following command:

    Copy Code
    Set-SenderFilterConfig -BlockedDomainsAndSubdomains contoso.com
    
  • To block inbound messages from senders that do not specify a sender and a domain in the MAIL: FROM SMTP header, run the following command:

    Copy Code
    Set-SenderFilterConfig -BlankSenderBlockingEnabled $true
    

For detailed syntax and parameter information, see Set-SenderFilterConfig.

For More Information

For more information about how to use and configure the Sender Filtering agent, see the following topics: