# Create an Encryption Gateway Rule in Exchange On premise for a trigger word

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

01. Go to the Exchange Admin Center (EAC).
02. Log in to 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 sender + Outbound DLP` as the name of the rule.
08. At the bottom, click **More options...**.
09. Under **\*Apply this rule if...**, select **The sender...** and then **is external/internal**.
10. Select **Inside the organization**.
11. Click OK.
12. Click add condition.
13. Under **And**, select **The sender...** and then **domain is**.
14. Enter each sending internal domain, and click the _add_ icon.
15. Click OK.
16. Click add condition.
17. Under **And**, select **The subject or body...**, and then **subject includes any of these words**.
18. Enter `(?i)\[secure\]`.

Tip

The regex `(?i)` makes the match case-insensitive.

19. Click the _add_ button.
20. Enter `(?i)\[secure\s?email\]`.
21. Click the _add_ button.
22. Enter `(?i)secure\s?email`.
23. Click the _add_ button.
24. Click OK.
25. Under **\*Do the following...**, select **Modify the message properties...**, and then **set a message header**.
26. Click the first **\*Enter text...** link.
27. Enter `zivver-relay`.
28. Click OK.
29. Click the second **\*Enter text...** link.
30. Enter `smart-sender`.
31. Click OK.
32. Click add action.
33. Under **And**, select **Redirect the message to...**, and then **these recipients**.
34. Search for and select the contact that was created previously.
35. Click add ->.
36. Click OK.
37. Under **Except if...**, click add exception.
38. Select **A message header...**, and then **matches these text patterns**.
39. Click **\*Enter text...**.
40. Enter `skip-zivver-relay`.
41. Click OK.
42. Click **\*Enter text patterns...**.
43. Enter `true`.
44. Click the _add_ button.
45. Click OK.
46. Under **Choose a mode for this rule**, select **Enforce**.
47. Enable the option **Stop processing more rules**.
48. 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 those messages will be paused._
49. Enter the following text in the **Comments** section:

```plain
Allow users to deliberately send secure messages via Zivver using a specified email property. For example, a keyword (e.g. ‘[secure]’ in the subject line) or standard email attribute (e.g. a Microsoft Purview sensitivity label applied to the email by the user).
```

50. Click Save.

The mail flow rule is now set. Please ensure that the priority of all existing rules is correct. If the sent message needs to be processed by other rules first, make sure 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 desired, please deactivate the rule.

Updated on 2026-06-18
