There are situations when you have requirements to restrict a single user or multiple to internal communication only. You can use below methods to achieve the goal. This is applicable to Office365 solutions as well as OnPrem Exchange Solutions.
Use transport rule to block outbound e-mail communication.
In the Exchange Admin Center navigate to Mail Flow -> Rules and Create a new Rule
Start a new Transport Rule
Specify the “Rule Name”
Apply this rule if “The sender is located..” and Select “Sender from the list”
Click “More Options”, select AND condition and choose “The sender is located… “Outside the Organization”.
Next, set the action to reject the message. There are three rejection options. You can use matching to your specific requirements.
- Reject the message and exclude an explanation.
- Reject the message with enhance error code.
- Delete the message without notifying anyone.
It is also a good idea to select “Stop processing other rules” since you are blocking the e-mail and do not want to process any further rule.
Block Inbound using Transport Rule
As creating a transport rule is a quick way to block the required users to send outside. You can create similar rule to block inbound as well and select the options as below.
Message Delivery Restrictions
You can also block external e-mails using message delivery restrictions on the mailbox itself. This can be a better a quick approach when you do not require to put custom messages or expiation.
Open the properties of the mailbox and select Mailbox Features, then scroll down to the Message Delivery Restrictions and click View Details.
Enabling the option to “Require that all senders are authenticated” will have the effect of rejecting emails from external senders.