RestrictExtRecips for Exchange 2013/2016/2019

Purpose

In Exchange 2013/2016/2019 you can use the EAC or Shell to restrict the number of recipients per message for a mailbox.
There is no way to limit the number of external recipients a certain group of people can send to.

RestrictExtRecips application solves this problem.

You can create the following rule: if [email protected] is a member of a group RestrictExternal, he cannot set more than 5 external recipients in his message. If he places 6 or more external addresses his message will not be delivered and he will get a non-delivery report message: “Too many external recipients”.

The application is a custom transport agent.

Current version: 1.0.0.2

Installation

On your Exchange 2013/2016/2019 Mailbox server computer:

  1. Select (or create) a user account that is a member of the local Administrators and Domain Users security group.
  2. Log on as that user.
  3. Create C:\Program Files\IvaSoft\RestrictExtRecips\ directory and download there RestrictExtRecips2013-Demo.zip archive file.
  4. Right-click RestrictExtRecips2013SP1-Demo.zip and select ‘Properties’. If there is ‘Unblock’ button, hit it.
  5. Extract all files from the zip archive to C:\Program Files\IvaSoft\RestrictExtRecips directory.
  6. Run RestrictExtRecips2013Setup.exe. Make sure that ‘Pickup directory:’ field is populated.
  7. Click “Browse” button near the “NDR Template:” field. Select “C:\Program Files\IvaSoft\RestrictExtRecips\RejectedEN.eml”.
  8. Click Install button. Make sure that RestrictExtRecips2013 is appeared in the list of Transport agents. Click Enable button. Make sure that “Running” mark is in the status line.
  9. Click Exit button to close the program.

Testing

  1. Run RouteBySenderSetup.exe. Click “Add” button. “RestrictExtRecips setup – Add new rule” window will appear. Select a group and set maximal number of external recipients. Click OK to close the “RestrictExtRecips setup – Add New rule” window. Make sure that the rule is in the list.
  2. Create a test message from any member of the group used on step #1 where amount of external recipients is greater than set in the rule. Send the message. Make sure that the message is not delivered. Also make sure that you have received a non-delivery report message, like this:

Non-delivered message template

The template is a text file with extension .eml. It should be placed to the same folder as RestrictExtRecips2013Setup.exe and RestrictExtRecips.dll files. You can modify NDR template using any text redactor, for example NotePad. Predefined template variables are %s,%a,%n and %h.

Uninstallation

Run RestrictExtRecips2013Setup.exe. Click Uninstall button. Make sure that RestrictExtRecips2013 is not in the list of Transport agents. Click Exit button to close the program.

About this demo version.

RestrictExtRecips demo version places “[RestrictExtRecips2013 DEMO]” to the Subject line of each non-delivery report message it generates.

F.A.Q.

Q. I am having trouble getting the program to work. When I enable the transport agent, I get 1052 and 16023 errors in Event Viewer and the Transport service will not stay running.
A. Make sure that you have placed the software files to C:\Program Files\IvaSoft\RestrictExtRecips folder. Also note that Exchange server uses the Network Service account for the Transport Service credentials and it seems this account didn’t get security permissions to RestrictExtRecips folder. Try to add Network Service account read permissions to that folder.

Leave a Comment

Your email address will not be published.