How to block a message from being sent or received based on the file name extension of the attachment in Office 365

Article translations Article translations
Article ID: 2795329 - View products that this article applies to.
Not sure what release of Office 365 you're using? Go to the following Microsoft website:
Am I using Office 365 after the service upgrade?
Expand all | Collapse all

On This Page

INTRODUCTION

This article describes how to block a message from being sent or received in Microsoft Office 365 based on the file name extension of the attachment.

PROCEDURE

You can block a message from being sent or received if the file that's attached to the message has an extension that's currently not blocked by Office 365. To do this, create a transport rule by using one of the following methods, as appropriate for your situation.

Note The rule doesn't apply to scenarios in which users change the file name extension before they send the message.

In Office 365

Collapse this imageExpand this image
assets folding start collapsed
To create a transport rule to block messages based on the file name extension of the attachment in Office 365, follow these steps:
  1. Sign in to the Office 365 portal (https://portal.microsoftonline.com).
  2. Click Admin, and then click Exchange.
  3. In the left navigation pane, click Mail Flow, and then click Rules.
  4. Click New (
    Collapse this imageExpand this image
    A screen shot of the New icon
    ), and then click Create a new rule.
  5. In the New Rule window, click More options.
  6. In the Name box, specify a name for the new rule.
  7. Click the *Apply this rule if drop-down list, point to Any attachment, and then click File extension includes these words.
  8. In the Specify words or phrases window, type the file name extension of any attachment that you want to block, and then click the plus symbol (
    Collapse this imageExpand this image
    A screen shot of the plus symbol
    ) to add the file name extension to the list. When the list is completed, click OK.
  9. Click the *Do the following drop-down list, point to Block the message, and then click Reject the message and include an explanation or click Delete the message without notifying anyone.

    If it's required, add a statement to inform users who will receive the non-delivery report (NDR) of the reason that mail delivery failed, and then click OK.
  10. Specify any additional options such as rule auditing and rule activation or deactivation time, and then click Save.
Collapse this imageExpand this image
assets folding end collapsed

In Office 365 pre-upgrade

Collapse this imageExpand this image
assets folding start collapsed
To create a transport rule to block messages based on the file name extension of the attachment in Office 365 pre-upgrade, follow these steps:
  1. Sign in to the Office 365 pre-upgrade portal (https://portal.microsoftonline.com).
  2. Click Admin, and then, under Exchange Online, click Manage to open the Exchange Control Panel (ECP).
  3. In the left navigation pane, click Mail Control, and then click Rules.
  4. Under Rules, click New.
  5. In the New Rule window, click More Options.
  6. Click the Apply this rule *If drop-down list, point to The sender, click Is external/internal, click Outside the organization, and then click OK.
  7. Click Add Condition, and then, in the drop-down list, click Any attachment.
  8. Click File name matches these text patterns, and then click Enter text patterns.
  9. Type the file name extension of any attachment that you want to block, and then click the plus symbol (
    Collapse this imageExpand this image
    A screen shot of the plus symbol
    ) to add the file name extension to the list. When the list is completed, click OK.
  10. In the Do the following drop-down list, point to Block the message, and then click Reject the message and include an explanation or click Delete the message without notifying anyone.

    If it's required, add a statement to inform users who will receive the non-delivery report (NDR) of the reason that mail delivery failed.
  11. In the Name of rule box, specify a name for the new rule.
  12. Click Save.
Notes
  • For more information about transport rules for attachments, go to the following Microsoft website: Conditions and Exceptions for Transport Rules
  • For more information about how to set up filters in the Forefront Online Protection for Exchange (FOPE) Administration Center, go to the following Microsoft TechNet website: Configuring Filters in FOPE
Collapse this imageExpand this image
assets folding end collapsed

MORE INFORMATION

The following table lists file name extensions and MIME types that are allowed by default in Office 365.
Collapse this tableExpand this table
File name extensionsMIME types
.rpmsg, .xls, .xlsx, .xlsm, .xlsb, .pptx, .pptm, .ppsx, .ppsm, .doc, .docx, .docm, .xls, .wmv, .wma, .wav, .vsd, .txt, .tif, .rtf, .pub, .ppt, .png, .pdf, .one, .mp3, .jpeg, .gif, .doc, .bmp, .aviimage/jpeg, image/png, image/gif, image/bmp

Still need help? Go to the Office 365 Community website.

Properties

Article ID: 2795329 - Last Review: December 25, 2013 - Revision: 11.0
Applies to
  • Microsoft Office 365 for enterprises (pre-upgrade)
  • Microsoft Office 365 for small businesses  (pre-upgrade)
  • Microsoft Office 365 for education  (pre-upgrade)
  • Microsoft Exchange Online
Keywords: 
o365 o365a o365p o365e o365022013 after upgrade o365062011 pre-upgrade o365m kbgraphic KB2795329

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com