There are times when a company requests us to block certain users from receiving or sending emails to external addresses, for various reasons. One of the ways to accomplish this, especially for our managed services, is by using transport rules.
How to create a rule to block a user/group from sending emails outside of the company:
- Launch Exchange Management Console.
- Go to Organization Configuration -> Hub Transport. Click the Transport Rules tab.
- Click the New Transport Rule on the Actions pane to create a new rule.
- Provide a descriptive name, and optionally, provide a comment about this rule. Rule creation will not proceed without a rule name. Click “Next”.
- On the Conditions page, on Step 1, click “from people”. You can also create and add a group here, so that you can just add and remove people from the group as the need arises.If using a group, choose “from a member of distribution list” and “from users that are inside or outside the organization”.Options for individuals:
Options for groups:
- Still on the Conditions page, on Step 2, click “people” or “distribution list”. A “Specify senders” (for individuals) or “Specify recipient distribution group” (for groups) window will open.
- On this window, click “Add”, and choose the email address or distribution list to whom this rule shall be applied to. Click “OK” to close this window. Click “Next”.
- On the Actions page, on Step 1, select either one or both of the following options:
- If using the 1st option, on Step 2, click the “rejection message”. Enter a bounce message for the user. Then click “OK”.
- Still on Step 2, click the “enhanced status code”, and enter “5.7.1”. Then click “OK”.
- Click “Next” to proceed to the Exceptions page. Click “Next” again.
- On the Create Rule page, click the “New” button to create this rule.
How to create a rule to block a user/group from receiving mails coming from outside the company:
- Launch Exchange Management Console.
- Go to Organization Configuration -> Hub Transport. Click the Transport Rules tab.
- Click the New Transport Rule on the Actions pane to create a new rule.
- Provide a descriptive name, and optionally, provide a comment about this rule. Rule creation will not proceed without a rule name. Click “Next”.
- On the Conditions page, on Step 1, click the following conditions:
- Still on the Conditions page, on Step 2, click “people” or “distribution list”. A “Specify senders” (for individuals) or “Specify recipient distribution group” (for groups) window will open.
- On this window, click “Add”, and choose the email address or distribution group to whom this rule shall be applied to. Click “OK” to close this window. Click “Next”.
- On the Actions page, on Step 1, select either one or both of the following options:
- If using the 1st option, on Step 2, click the “rejection message”. Enter a bounce message for the user. Then click “OK”.
- Still on Step 2, click the “enhanced status code”, and enter “5.7.1”. Then click “OK”.
- Click “Next” to proceed to the Exceptions page. Click “Next” again.
- On the Create Rule page, click the “New” button to create this rule.