How to Configure Anti-Spam Features on a Mailbox

Applies to: Exchange Server 2007 SP1, Exchange Server 2007 Topic Last Modified: 2007-01-02 This topic explains how to use the Exchange Management Shell to configure anti-spam features on a mailbox. All messages that come into the Exchange organization from the Internet are filtered by the anti-spam agents that are enabled on the Edge Transport server. As the messages are filtered, metadata is added to the messages. Legitimate messages that have not been filtered are delivered to the recipient's mailbox. Before You Begin To perform the following procedures, the account you use must be delegated the following: Exchange Organization Administrator role For more information about permissions, delegating roles, and the rights that are required to administer Microsoft Exchange Server 2007, see Permission Considerations. Also, before you perform these procedures, confirm the following: You have reviewed Anti-Spam and Antivirus Functionality to understand the general strategy for configuring all anti-spam agents so that they work together efficiently for your organization. You have read Managing Anti-Spam and Antivirus Features. Procedure This section explains how to use the Exchange Management Shell to configure the anti-spam features on a mailbox. You use the following parameters to configure anti-spam features with the Set-Mailbox cmdlet: AntispamBypassEnabled SCLDeleteEnabled SCLDeleteThreshold SCLJunkEnabled SCLJunkThreshold SCLQuarantineEnabled SCLQuarantineThreshold SCLRejectEnabled SCLRejectThreshold For detailed syntax and parameter information, see Set-Mailbox. Note: With the exception of the junk e-mail settings, the spam confidence level (SCL) settings on the mailbox are the same as the settings that you apply on the Content Filter agent. The content filtering settings are applied to the organization. The mailbox settings are applied to the individual mailbox user. The mailbox settings override the organization-wide content filtering settings. Note: The SCLDeleteEnabled, SCLJunkEnabled, SCLQuarantineEnabled, and SCLRejectEnabled parameters have three possible values: $true, $false, and $null. If a parameter has the value of $true or $false, that parameter overrides the settings on the Content Filter agent. If the setting is $null, the settings on the Content Filter agent are applied. To use the Exchange Management Shell to configure anti-spam features on a single mailbox To configure all the anti-spam settings on a mailbox, run the following command: Copy Codeset-Mailbox -Identity -AntispamBypassEnabled <$true | $false> -RequireSenderAuthenticationEnabled <$true | $false> -SCLDeleteEnabled <$true | $false | $null> -SCLDeleteThreshold -SCLJunkEnabled <$true | $false | $null > -SCLJunkThreshold -SCLQuarantineEnabled <$true | $false | $null > -SCLQuarantineThreshold -SCLRejectEnabled <$true | $false | $null > -SCLRejectThreshold For example, to configure John Peoples' mailbox to bypass all the anti-spam filters and to have messages that meet or exceed an SCL Junk E-mail folder threshold of 5 delivered to his Junk E-mail folder in Microsoft Office Outlook, run the following command: Copy CodeSet-Mailbox -Identity John -AntispamBypassEnabled $true -SCLJunkEnabled $true -SCLJunkThreshold 5 To use the Exchange Management Shell to configure anti-spam features on multiple mailboxes by using a piped command Run the following command: Copy CodeGet-Mailbox | Set-MailboxFor example, to enable the SCL quarantine threshold with a value of 7 on all mailboxes in the Users container in the Contoso.com domain, run the following command: Copy CodeGet-Mailbox -OrganizationalUnit Contoso.com\Users | Set-Mailbox -SCLQuarantineEnabled $true -SCLQuarantineThreshold 7 To use the Exchange Management Shell to configure anti-spam features on multiple mailboxes by using the Set-OrganizationConfig cmdlet Run the following command: Copy CodeSet-OrganizationConfig -SCLJunkThreshold For example, to set the organization's junk e-mail threshold to 5, run the following command: Copy CodeSet-OrganizationConfig -SCLJunkThreshold 5