Sometimes you may need to prevent auto-reply messages from being sent to people outside of your organization. No matter what the reason is for such a setting, you can quickly block out-of-office messages (OOF) directly on the Exchange Server. This way you can ensure that all users in your organization have the out-of-office messages blocked for external recipients.
This article explains how to set up a mail flow rules to stop auto-replies from being sent outside Exchange 2019, 2016 and 2013, 2010 and 2007 organizations.
Block sending auto-replies on Exchange 2019/2016/2013
To block Exchange 2019, 2016 or 2013 from sending automatic out-of-office messages, follow the steps below:
- Log in to the Exchange Admin Center (EAC) at https://localhost/ecp/.
- In the EAC, go to mail flow>rules. Click on the Plus icon and select Create a new rule.
- In the resulting window, add the first condition:
a. Apply this rule if…> The recipient… > is external/internal.
b. Then, in the next dialog box, select Outside the organization and click OK.
- Now, add the second condition:
a. The message properties…> include the message type.
b. In the resulting dialog box, set the message type to Automatic reply and click OK.
- In the Do the following… section, select: Block the message…> delete the message without notifying anyone.
- Click Save to implement changes.
Now, all automatic replies sent outside your organization should be blocked and deleted automatically.
Block sending auto-replies on Exchange 2010 and 2007
If you are running either Exchange 2007 or 2010, you will not find a block-message-related action. However, automatic replies should be already disabled (by default) on your Exchange. To make sure that external out-of-office messages are not allowed, follow the steps below:
- Open Exchange Management Console.
- Expand Organization Configuration, and click on Hub Transport.
- In the central part of the window, select the Remote Domain tab. Then, right click on Default and select Properties.
- In the resulting dialog box, under the General tab, select the Allow none option to block all auto-replies both to external and internal recipients. Or select the Allow internal out-of-office messages, and out-of-office messages set by Outlook 2003 or earlier or sent by Exchange Server or earlier server option to allow only auto-replies configured as internal.
- In the Format of original message sent as attachment to journal report tab (or the Message Format tab in Exchange 2010), leave Allow automatic replies and Allow automatic forwards options unchecked to block all automatic replies and automatic forwards (not only OOF).
- Click OK to save changes.
Use PowerShell to block external out-of-office messages only for selected users
If you want to prevent only selected users/mailboxes from sending auto-replies externally, use the following PowerShell cmdlet:
Set-Mailbox "John Doe" -ExternalOofOptions InternalOnly
The command sets up John Doe’s mailbox to do not send out-of-office messages to external users.
To revert these settings, execute the below cmdlet to allow the selected mailbox to send external OOFs again:
Set-Mailbox "John Doe" -ExternalOofOptions External
Block Exchange auto-replies with a 3rd party application like CodeTwo Exchange Rules Pro
If you are a user of CodeTwo Exchange Rules Pro, a powerful server-based application for email signatures and email flow management purposes, you can use it to block external out-of-office messages with just a few clicks.
Follow the steps below to set up the rule that blocks outgoing auto-replies:
- Open the Administration Panel of the program.
- Add a new rule – click the Add button and then select the New rule (clean) option.
- In the General tab, name the rule and, in the Enable/disable rule section, check the Enable rule box to activate it (this will not immediately push the rule to the production – you need to hit the Submit changes button first to run the newly enabled rule).
- In the Conditions tab, set up the following conditions: Recipient > is > external
And Message type > is > out of office
- Do not make changes in the Exception tab.
- In the Actions tab, click on the Add button and select the Block message option.
- In the Options tab, you can make some final changes according to your needs.
- Save the settings by clicking Submit changes.
That’s it! Now the program will block every auto-reply message before it hits external recipients. As CodeTwo Exchange Rules Pro is a server-based application, the rule is applied to all messages that meet the conditions, no matter what email client or device (including mobiles) a message is sent from.