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

Do these steps to create a rule in Microsoft Exchange Online:

01. Go to the [Exchange Admin Center](https://admin.exchange.microsoft.com/).
02. Click _mail_ **Mail flow** in the menu on the left.
03. Click **Rules**.
04. Click _add_ **Add a rule**.
05. Click **Create a new rule**.
06. Enter `Zivver: Secure message by sender + Outbound DLP` as the name of the rule.
07. Under **Apply this rule if \***, select **The sender**.
08. Under **Select one**, select **is external/internal**.
09. Select **Inside the organization**.
10. Click Save.
11. Click the _add_ button under the **Apply this rule if \*** section.
12. Under **And**, select **The sender**.
13. Under **Select one**, select **domain is**.
14. Enter every sending domain and click Add.
15. After all domains are added, click Save.
16. Click the _add_ button under the **Apply this rule if \*** section.
17. Under **And**, select **The subject or body**.
18. Under **Select one**, select **subject matches these text patterns**.
19. Enter `(?i)\[secure\]`.

Tip

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

20. Click Add.
21. Enter `(?i)\[secure\s?email\]`.
22. Click Add.
23. Enter `(?i)secure\s?email`.
24. Click Add.
25. Click Save.
26. Under **Do the following \***, select **Modify the message properties**.
27. Under **Select one**, select **set a message header**.
28. Click the first **Enter text** field.
29. Enter `zivver-relay`.
30. Click Save.
31. Click the second **Enter text** field.
32. Enter `smart-sender`.
33. Click Save.
34. Click the _add_ button under the **Do the following \*** section.
35. Under **Add**, select **Redirect the message to**.
36. Under **Select one**, select **the following connector**.
37. Select `Zivver Send Connector`.
38. Click Save.
39. Under **Except if**, select **The message headers…**.
40. Under **Select one**, select **matches these text patterns**.
41. Click **Enter text**.
42. Enter `skip-zivver-relay`.
43. Click Save.
44. Click **Enter words**.
45. Enter `true`.
46. Click Add.
47. Click Save.
48. Click Next.
49. Enable the option **Stop processing more rules**.
50. Enable the option **Defer the message if rule processing doesn’t complete**.
51. Set **Match sender address in message** to **Envelope**.
52. 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).
```

53. Click Next.
54. Click Finish.
55. Click Done.

The rule is now created but not enabled yet. Make sure the priority of all existing rules is correct. If the message must be processed by other rules first, make sure the Encryption Gateway rule has a lower priority.

Since the rule is not enabled yet, no outbound message that matches the filter will be submitted to the Zivver SMTP server. Only enable the rule once you’re certain all rule priorities are configured correctly.

Updated on 2026-06-18
