If you want In House mail only!

How to Restrict Email Delivery in Office365 so employees can only send and receive messages within your organization.

First you need to create a Group containing the members of your organization who may only send and receive mail within the organization.
Note: Messages will be  restricted for a group so they can only send and receive messages within the organization.  The Group needs created first!

After creating the Group:

  1. Sign in Office 365 using an Administrator account.
  2. On the left hand side, select Admin -> Exchange
  3. On the left hand side, select Mail Flow

Restrict inbound messages

  1. Click on the + sign and select Create a New Rule
  2. Enter a name like “Do not allow inbound”
  3. Under Apply this rule if, select “If the sender is located” select “Outside this organization”
  4. Under Do the following, select “Reject the message with Explanation” and enter a message such as “External messages not allowed”
  5. Click on More Options at the bottom of the screen
  6. Scroll up to Apply this rule if, click Add Condition
  7. Select “The recipient is a member of” and select the group you want to restrict
  8. Click Save

Restrict Outbound messages

  1. Click on the + sign and select Create a New Rule
  2. Enter a name like “Do not allow outbound”
  3. Under Apply this rule if, select “If the sender is located” select “inside this organization”
  4. Under Do the following, select “Reject the message with Explanation” and enter a message such as “External messages not allowed”
  5. Click on More Options at the bottom of the screen
  6. Scroll up to Apply this rule if, click Add Condition
  7. select “The sender is a member of” and select the group you want to restrict
  8. Click Save

Test by:

  1. Sending a message from an internal mailbox to another internal mailbox (this should work)
  2. Sending a message from an internal mailbox to an external mailbox (this should NOT work)
  3. Sending a message from an External mailbox to an internal mailbox (this should NOT work)