How to block outbound emails with mail flow rules in Office 365

There may be situations where it is necessary to block the flow of mail outside of an organization for specific users or groups of users. Let’s find out how you can use Exchange Online mail flow rules to prevent Office 365 users from sending mail to external recipients.

Prevent users from sending email outside of your Office 365 organization.

Block emails sent outside of your Office 365 organization

To restrict all (or specific) users to only sending internal emails and to block their emails when they are sent to external recipients, follow these steps:

  1. Sign in to your Office 365 portalthen go to Microsoft 365 admin center by clicking the Administrator apartment
    Admin app in Office 365
  2. In which administrative centers section, click Exchange.
    Administrative Centers - Exchange
  3. Then in Exchange Admin Centerclick mail flow and then Rules. Use of plus icon, add a new rule.
    Create a new rule in the Exchange admin center
  4. In the new rules window under the Apply this rule if section, select The recipient is located > Outside the organization.
    The recipient is outside the organization
  5. If you don’t want the rule to apply to all users, you can add another condition that narrows its scope. To do this, click on More options at the bottom of the window, and then click add condition button (the button will appear once you have enabled more options). For example, you can add a select user group so that only its members are not allowed to send email outside of the organization.
    The sender is a member of an AD group
  6. In which Do the following section, select Block the message > dismiss the message and add an explanation.
    Block the message and add an explanation
  7. Provide a brief explanation as to why the email is being blocked. Users receive this statement along with an NDR message after attempting to send an email outside of the organization. You can also choose not to notify anyone and just delete the message (by using the Delete the message without notifying anyone Possibility).
    Reject the message with the explanation
  8. Save the changes to the rule and test that it works as expected. Note that it can take up to 30 minutes for rule changes to take effect.
    NDR news

That’s it. Now, when the users included in this rule try to send emails outside of the Office 365 organization, those messages will be rejected and the senders will get a notification that their email was blocked.

What about local environments?

If you are still using on-premises infrastructure and are looking for a similar solution that works with Exchange Server, try CodeTwo Exchange Rules Pro. This program works in on-premises and hybrid environments and offers a wide range of email rule configuration settings that are not natively available in Exchange.

See also:


Related Posts

Leave a Reply

Your email address will not be published.