# Create SDR rule in any mailserver

## Introduction

This manual describes the general information for setting up a mail flow rule for Secure Direct Replies in any mail server. Please use the pages below for the specific instructions on:

1. [Exchange Online](https://docs.zivver.com/en/admin/smtp/create-sdr-rule-exchange-online.html)
2. [Exchange On Premise](https://docs.zivver.com/en/admin/smtp/create-sdr-rule-exchange-on-premise.html)
3. [Google Workspace](https://docs.zivver.com/en/admin/smtp/create-sdr-rule-google-workspace.html)

If your organization is using another mail server, please set up the routing as described below.

## Mail routing logic

The logic (mail-server agnostic) should effectively be as follows:

- **If**: the `References` header of an email contains `zivver-sdr-<your-Zivver-UUID>`

_There is no need to add the angle brackets (< >) that wrap the value in practice._
- **Then**:
  - Add the `zivver-relay` header with the value:
    - `sdr` → when using the Zivver Encryption Gateway.
    - `smart-sdr` → when using the Zivver DLP Gateway.
  - Route the message to `smtp.zivver.com`.
- **Except if**: the message headers contain the `X-Zivver-Transport` header.

_This ensures that the IDD message itself — which also contains the SDR value in the `References` header — is not looped back to Zivver._

Updated on 2026-06-18
