Export (0) Print
Expand All

Add-AttachmentFilterEntry

 

Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1

Topic Last Modified: 2009-04-28

Use the Add-AttachmentFilterEntry cmdlet to add an entry to the attachment filter list on a computer that has the Edge Transport server role installed.


add-attachmentfilterentry -Name <String> -Type <ContentType | FileName> [-Confirm [<SwitchParameter>]] [-DomainController <Fqdn>] [-WhatIf [<SwitchParameter>]]

The Attachment Filter agent can block attachments from entering the Microsoft Exchange Server 2007 organization based on the content type and the file name of the attachment. The configuration of the Attachment Filtering agent determines how attachments are processed.

For more information about how to configure the Attachment Filtering agent, see Set-AttachmentFilterListConfig.

The Add-AttachmentFilterEntry cmdlet can filter e-mail attachments based on MIME content types and file name. The following list describes each attachment type:

  • MIME content types   MIME content types indicate what the attachment is, for example, whether it's a JPEG image, an executable file, a Microsoft Office Excel 2003 file, or another file type. E-mail attachments are encoded in e-mail messages as ASCII text. E-mail servers and clients use the information about MIME content type to decode the ASCII text information in an e-mail message and convert it into a usable binary file that is familiar to the user. Content types are expressed as type/subtype. For example, the JPEG image content type is expressed as image/jpeg.
    For more information about MIME content types, see Request for Comments (RFC) 1341.
    noteNote:
    The third-party Web site information in this topic is provided to help you find the technical information you need. The URLs are subject to change without notice.
  • File names   There are two ways to specify attachment file names in the attachment filter lists. You can specify an exact file name, such as BadFilename.exe. Alternatively, you can specify any file that has a specific type of extension by replacing the file name to the left of the period with a wildcard character. An example of using a wildcard character in a file name is *.exe.

To run the Add-AttachmentFilterEntry 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.

 

Parameter Required Type Description

Name

Required

System.String

This parameter specifies the MIME content type or file name of the attachment. If Type is FileName, the Name parameter can take any exact file name, such as BadFile.Exe, or file name extension, such as *.exe. If Type is ContentType, the Name parameter can take any valid MIME content type.

Type

Required

Microsoft.Exchange.Data.Directory.SystemConfiguration.AttachmentType

This parameter specifies what type of attachment the attachment filter entry blocks. Valid values are ContentType and Filename.

  • ContentType   This value matches the attachment filter entry against the MIME content type that is specified in the AttachmentName parameter.
  • FileName   This value matches the attachment filter entry against the simple file name that is specified in the AttachmentName parameter.

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 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.

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.

 

Error Description

You may want to add entries to the attachment filter list to help protect users from malicious or inappropriate e-mail attachments. The following code examples show how to add an entry to the attachment filter list.

The first code example adds an attachment filter entry based on a file name. This attachment filter will be applied to all attachments that have a .txt extension.

The second code example adds an attachment filter entry based on the MIME content type image/jpeg, which is a JPEG image binary file. This attachment filter will be applied to all attachments of the MIME content type image/jpeg.

add-attachmentfilterentry -name *.txt -type FileName
add-attachmentfilterentry -name image/jpeg -type ContentType
To ensure that you are reading the most up-to-date information and to find additional Exchange Server 2007 documentation, visit the Exchange Server TechCenter.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft