How to create a rule that blocks messages with executable attachments?

  1. Login to control panel of Microsoft Office 365 using following URL: portal.office.com
  2. Go to Admin Panel.
  3. In the Admin Center go to Exchange >> Mail Flow >> Rules.
  4. Click Add (+)and then select ‘Create a new rule’.

5.  In the New rule page that opens, configure the following settings:

  • Name: Enter a unique, descriptive name for the rule.
  • Click More Options.
  • Apply this rule if: Select Any attachment
  • >> has executable content.
  • Do the following: Select Block the message and then choose the action you want:
    • reject the message and include an explanation: In the Specify reject reason dialog that appears, enter the text you want to appear in the non-delivery report (also known as an NDR or bounce message)
    • reject the message with the enhanced status code of: In the Enter enhanced status code dialog that appears, enter the enhanced status code that you want to appear in the NDR. The default rejection text is: Delivery not authorized, message refused.
    • reject the message without notifying anyone

6. When you’re finished, click Save. Your attachment blocking rule is now in force.

Build Your Website with Hostiko

From professional business to enterprise, we’ve got you covered!

Copyright ©2026 QualiSpace. All rights reserved.

A Platform

QualiSpace
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.