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.
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:
- Sign in to your Office 365 portalthen go to Microsoft 365 admin center by clicking the Administrator apartment
- In which administrative centers section, click Exchange.
- Then in Exchange Admin Centerclick mail flow and then Rules. Use of plus icon, add a new rule.
- In the new rules window under the Apply this rule if section, select The recipient is located > Outside the organization.
- 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.
- In which Do the following section, select Block the message > dismiss the message and add an explanation.
- 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).
- 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.
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: