# Create an Encryption Gateway Rule in Exchange On premise for a specific sender

Do these steps to create a rule in Microsoft Exchange On-premise:

01. Go to the Exchange Administrative Center (EAC).
02. Log into the EAC as an administrator.
03. Go to **Mail flow** in the menu on the left.
04. Go to **Rules**.
05. Click the _add_ button.
06. Click **Create a new rule...**.
07. Enter `Zivver: Secure message by <application> + Outbound EG` as the name of the rule.

_Replace `<application>` with the name of the application._
08. At the bottom, click **More options...**.
09. Under **\*Apply this rule if...**, select **The sender...**, then **is this person**.
10. Select the desired sender.
11. Click add ->.
12. Click OK.
13. Under **\*Do the following...**, select **Redirect the message to...**, then **these recipients**.
14. Look up the contact that was created previously and select it.
15. Click add ->.
16. Click OK.
17. Under **Except if...**, click add exception.
18. Select **A message header...**, then **matches these text patterns**.
19. Click **\*Enter text...**.
20. Enter `X-Zivver-Transport`.
21. Click OK.
22. Click **\*Enter text patterns...**.
23. Enter `..*.` (that is 2 dots, 1 asterisk/wildcard, 1 dot).
24. Click the _add_ button.
25. Click OK.
26. For **Choose a mode for this rule**, select **Enforced**.
27. Enable the option **Stop processing more rules**.
28. Enable the option **Defer the message if rule processing doesn’t complete**.

_If you enable this option, a message will not leave Exchange until it has been checked by this rule. If, for any reason, Exchange temporarily does not check messages for this rule, processing of these messages will be paused._
29. Click Save.

The Mail Flow Rule is now set. Make sure the priority of all existing rules is correct. If the sent message needs to be processed by other rules first, ensure that the rule created for the Encryption Gateway has a lower priority.

Any outbound message that matches the filter will be submitted to the Zivver SMTP server. If this is not desirable, deactivate the rule.

Updated on 2026-06-18
