Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1
Topic Last Modified: 2007-06-28

Use the Set-AttachmentFilterListConfig cmdlet to modify the configuration of the Attachment Filter agent on the computer running Microsoft Exchange Server 2007 that has the Edge Transport server role installed.

Syntax

set-attachmentfilterlistconfig [-Action <Reject | Strip | SilentDelete>] [-AdminMessage <String>] [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-ExceptionConnectors <MultiValuedProperty>] [-Instance <AttachmentFilteringConfig>] [-RejectResponse <String>] [-WhatIf [<SwitchParameter>]]

Parameters

Parameter Required Type Description

Action

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.FilterActions

This parameter specifies how the Attachment Filter agent handles an attachment that matches an entry on the attachment filter list. The default value is Block. Valid values include the following:

  • Reject   This value prevents both the e-mail message and attachment from being delivered to the recipient and issues a non-delivery report (NDR) to the sender.

  • Strip   This value removes the offending attachment from the e-mail message and allows the message and other attachments that do not match an entry on the attachment filter list through. A notification that the attachment was removed is added to the e-mail message.

  • SilentDelete   This value prevents both the e-mail message and the attachment from being delivered to the recipient. No notification that the e-mail message and attachment were blocked is sent to the sender.

AdminMessage

Optional

System.String

 This parameter specifies the content of a text file that replaces attachments that were removed by the Attachment Filter agent. The AdminMessage parameter only appears when the Attachment Filter agent is configured to remove an attachment that has been identified as bad.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm parameter.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

To specify the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to the 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.

ExceptionConnectors

Optional

Microsoft.Exchange.Data.MultiValuedProperty

This parameter specifies a list of connectors that should be excluded from attachment filtering. Attachment filters are not applied to e-mail messages that are received through these connectors. You must use the connector GUID to specify the ExceptionConnectors value.

Instance

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.AttachmentFilteringConfig

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.

RejectResponse

Optional

System.String

This parameter is required only if you set the Action parameter to Reject. The RejectResponse parameter takes a string. Enter the message body that you want delivered in the NDR to senders whose messages contain an attachment that is blocked. Do not exceed 240 characters in the argument. When you pass an argument, you must enclose the RejectResponse parameter in double quotation marks if the phrase contains spaces as follows, for example: "Message rejected". The default setting is Message rejected due to unacceptable attachments.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf parameter.

Detailed Description

The Attachment Filter agent can block attachments from entering the Exchange 2007 organization based on the content type and the file name of the attachment. You can use the Set-AttachmentFilterListConfig cmdlet to modify the configuration information for the Attachment Filter agent and manage how attachments are processed. The same configuration options are applied to all entries on an attachment filter list that is configured on the local computer that has the Edge Transport server role installed. You must separately configure each computer that has the Edge Transport server role installed.

To run the Set-AttachmentFilterListConfig 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 2007, see Permission Considerations.

Input Types

Return Types

Errors

Error Description

Exceptions

Exceptions Description

Example

By default, the Attachment Filter agent is configured to block attachments that match an entry on the attachment filter list and their messages. The following code example modifies the action that the Attachment Filter agent takes on an attachment that matches an entry on the attachment filter list so that both the e-mail message and attachment are not delivered to the recipient, and an NDR is sent to the sender. The code example also specifies a connector that will not run the Attachment Filter agent.

Copy Code
Set-AttachmentFilterListConfig -Action Reject -ExceptionConnectors fc4d8ce2-2c0d-4116-b036-143b19a81384