Share via


Set-ContentFilterConfig (RTM)

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.

 

Applies to: Exchange Server 2007

Use the Set-ContentFilterConfig cmdlet to modify the content filter configuration on a computer that has the Edge Transport server role or the Hub Transport server role installed.

Syntax

Set-ContentFilterConfig [-BypassedRecipients <MultiValuedProperty>] [-BypassedSenderDomains <MultiValuedProperty>] [-BypassedSenders <MultiValuedProperty>] [-DomainController <Fqdn>] [-Enabled <$true | $false>] [-ExternalMailEnabled <$true | $false>] [-Instance <ContentFilterConfig>] [-InternalMailEnabled <$true | $false>] [-OutlookEmailPostmarkValidationEnabled <$true | $false>] [-QuarantineMailbox <Nullable>] [-RejectionResponse <AsciiString>] [-SCLDeleteEnabled <$true | $false>] [-SCLDeleteThreshold <Int32>] [-SCLQuarantineEnabled <$true | $false>] [-SCLQuarantineThreshold <Int32>] [-SCLRejectEnabled <$true | $false>] [-SCLRejectThreshold <Int32>]

Detailed Description

This command modifies the content filter configuration.

To run the Set-ContentFilterConfig cmdlet, the account you use must be delegated the following:

  • Exchange Server Administrator role and local Administrators group for the target server

To run the Set-ContentFilterConfig cmdlet 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.

For more information about permissions, delegating roles, and the rights that are required to administer Exchange Server 2007, see Permission Considerations.

Parameters

Parameter Required Type Description

BypassedRecipients

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter takes the SMTP address values of recipients in your organization. The Content Filter agent does not process any content filtering for messages that are bound to the addresses that are listed on this parameter. To enter multiple SMTP addresses, separate the addresses by using a comma as follows, for example: recipient1@contoso.com, recipient2@contoso.com

The maximum number of recipients you can input is 100.

BypassedSenderDomains

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter takes domain name values of sending domains. The Content Filter agent does not process any content filtering for messages that are received from the domains that are listed on this parameter. To enter multiple domains, separate the addresses by using a comma as follows, for example: contoso.com, example.com. A wildcard (*) can be used to specify all sub-domains as follows, for example: *.contoso.com. The maximum number of domains you can input is 100.

BypassedSenders

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter takes the SMTP address values of senders. The Content Filter agent does not process any content filtering for messages that are received from the addresses that are listed on this parameter. To enter multiple SMTP addresses, separate the addresses by using a comma as follows, for example: sender1@contoso.com, sender2@example.com

The maximum number of SMTP addresses you can input is 100.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory directory service, include the DomainController parameter on the command. The DomainController parameter is not supported on computers that have the Edge Transport server role installed. The Edge Transport server role writes only to the local ADAM instance.

Enabled

Optional

System.Boolean

Valid input for the Enabled parameter is $true or $false. The default setting is $true. When the Enabled parameter is set to $true, the Content Filter agent is enabled on the computer on which you are running the Set-ContentFilterConfig command.

ExternalMailEnabled

Optional

System.Boolean

Valid input for the ExternalMailEnabled parameter is $true or $false. The default setting is $true. When the ExternalMailEnabled parameter is set to $true, all messages from unauthenticated connections are passed through the Content Filter agent for processing.

Instance

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.ContentFilterConfig

The Instance parameter enables you to pass an entire object to the command to be processed. It is mainly used in scripts where an entire object must be passed to the command.

InternalMailEnabled

Optional

System.Boolean

Valid input for the InternalMailEnabled parameter is $true or $false. The default setting is $false. When the InternalMailEnabled parameter is set to $true, all messages from authenticated connections and from authoritative domains in your enterprise are passed through the Content Filter agent for processing.

OutlookEmailPostmarkValidationEnabled

Optional

System.Boolean

Valid input for the OutlookEmailPostmarkValidationEnabled parameter is $true or $false. When the OutlookEmailPostmarkValidationEnabled parameter is set to $true, the Content Filter agent sends a computational puzzle to the sender's e-mail system for processing. The results of the puzzle validation are factored into the overall spam confidence level (SCL). This functionality is exposed to the Microsoft Outlook user as Office Outlook 2007 E-mail Postmark validation. The default setting is $false.

QuarantineMailbox

Optional

System.Nullable

Valid input for the QuarantineMailbox parameter is an SMTP address. A spam quarantine mailbox is required when you set the SCLQuarantineEnabled parameter to True. All messages that exceed the value set in the SCLQuarantineThreshold parameter are sent to the SMTP address that you set in this parameter.

RejectionResponse

Optional

Microsoft.Exchange.Data.AsciiString

This parameter is required if you set the SCLRejectEnabled parameter to True. The RejectionResponse parameter takes a string. Enter the message body that you want delivered in the non-delivery report (NDR) to senders whose messages meet or exceed the SCLRejectThreshold value. Do not exceed 240 characters in the argument. When you pass an argument, you must enclose the RejectionResponse parameter in double quotation marks if the phrase contains spaces as follows, for example: "Message rejected". The default setting is Message rejected due to content restrictions.

SCLDeleteEnabled

Optional

System.Boolean

Valid input for the SCLDeleteEnabled parameter is $true or $false. The default setting is $false. When SCLDeleteEnabled parameter is set to $true, all messages that exceed the value set in the SCLDeleteThreshold parameter are deleted.

SCLDeleteThreshold

Optional

System.Int32

This parameter takes an integer value between 1 and 9. This value represents the SCL rating that a particular message must exceed for the Content Filter agent to delete the message and not send a NDR. To enable this functionality, you must set the SCLDeleteEnabled parameter to True. The default setting is 9.

SCLQuarantineEnabled

Optional

System.Boolean

Valid input for the SCLQuarantineEnabled parameter is $true or $false. The default setting is $false. When SCLQuarantineEnabled parameter is set to $true, all messages that exceed the value set in the SCLQuarantineThreshold parameter are sent to the spam quarantine mailbox that is specified in the QuarantineMailbox parameter.

SCLQuarantineThreshold

Optional

System.Int32

This parameter takes an integer value between 1 and 9. This value represents the SCL rating that a particular message must exceed for the Content Filter agent to quarantine the message. To enable quarantine functionality, you must set the SCLQuarantineEnabled parameter to True, and provide a valid SMTP address in the QuarantineMailbox parameter. The default setting is 9.

SCLRejectEnabled

Optional

System.Boolean

Valid input for the SCLRejectEnabled parameter is $true or $false. The default setting is $false. When SCLRejectEnabled parameter is set to $true, all messages that exceed the value set in the SCLRejectThreshold parameter are rejected, and an NDR is sent to the sender.

SCLRejectThreshold

Optional

System.Int32

This parameter takes an integer value between 1 and 9. This value represents the SCL rating that a particular message must exceed for the Content Filter agent to reject the message and send an NDR to the sender. To enable the delete functionality, you must set the SCLDeleteEnabled parameter to True. Also, you can revise the default NDR message by editing the RejectionResponse parameter. The default setting is 9.

Input Types

Return Types

Errors

Error Description

 

Example

The first code example shows a Set-ContentFilterConfig command that has the following modifications to the Content Filter configuration:

  • It enables and configures the SCL threshold functionalities that quarantine, reject, and delete messages.

  • It makes spamQ@contoso.com the spam quarantine mailbox.

  • It sets the Content Filter action to reject all messages that exceed the SCL threshold.

  • It sets the rejection response.

  • It sets the AuthenticatedMessageBypassEnabled parameter to $true.

  • It enables the puzzle validation feature.

  • It defines two users for whom the Content Filter should not process messages.

The second code example shows a Set-ContentFilterConfig command that specifies a sender domain (woodgrovebank.com) whose inbound e-mail will by pass content filtering.

Set-ContentFilterConfig -SclQuarantineEnabled:$true -SclRejectEnabled:$true -SclDeleteEnabled:$true -SclQuarantineThreshold 5 -SclRejectThreshold 6 -SclDeleteThreshold 8  -QuarantineMailbox spamQ@contoso.com -RejectionResponse "Message rejected due to content restrictions" -AuthenticatedMessageBypassEnabled:$true -PuzzleValidationEnabled:$true -BypassedRecipients user1@contoso.com, user2@contoso.com 
Set-ContentFilterConfig -BypassedSenderDomains woodgrovebank.com