# Configure Routing Rules - SMTP Relay Settings

Once you create the content compliance rules, you must set up the routing rules to configure SMTP relay settings. This ensures that you receive emails only from Nightfall's trusted IP addresses.&#x20;

## Prerequisites

In the Nightfall UI, navigate to **Integrations** from the left navigation bar and click the **Manage** button for the Gmail integration.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FhL3KNggW1cbgegixd7yr%2Fimage.png?alt=media&#x26;token=29e6b1a0-9374-4da5-90a3-83c5be9ca7b6" alt=""><figcaption></figcaption></figure>

All the headers and expressions required to create the compliance rules are available in the **Installation** section under Gmail settings as displayed in the image below. Keep this screen open to copy/paste the headers as you create the routing rules in Google Workspace. We will refer to this page as the **Gmail settings** page throughout the document.&#x20;

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2F1oAEQthqAhj9DQQOdUXB%2Fimage.png?alt=media&#x26;token=d5b1b4a9-508b-4f12-9e85-189da0f2b47e" alt=""><figcaption></figcaption></figure>

## Configure Routing Rules

To configure routing rules:

1. Login to your Google Workspace with an admin account.
2. Navigate to the admin console.&#x20;
3. From the left menu, expand **Apps** > **Google Workspace > Gmail.**
4. Scroll down and select **Routing**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FTENrXLIhVTYBgNwe7Mi3%2Fimage.png?alt=media&#x26;token=6bf6b85f-36c3-4326-8e8a-5de209b189d9" alt=""><figcaption></figcaption></figure>

5. Scroll down to the **SMTP relay service** section and click **ADD ANOTHER RULE** (the button can be displayed as **CONFIGURE** if you have not created any SMTP rules).

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FPiqJq3conmTwvaal5Irh%2Fimage.png?alt=media&#x26;token=2560d523-67d9-4d8e-b858-103675cca689" alt=""><figcaption></figcaption></figure>

6. Enter a name for the SMTP rule (the name"Routing" is used in this case).&#x20;
7. Select the **Only accept mail from the specified IP addresses** check box.
8. Click **ADD.**

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FNc2Cb9r096GOl4hFNBz9%2Fimage.png?alt=media&#x26;token=56d85a73-b226-4939-b6cd-e76c7d37bcc4" alt="" width="563"><figcaption></figcaption></figure>

9. In the **Add Setting** dialog box, enter a description in the **Description** field ("Nightfall IP" is used in this case).&#x20;
10. Navigate to the **Gmail settings** page on the Nightfall UI and copy the value from the **IP Address 1** field, located under the **Routing - SMTP Relay Service** section.
11. Return to the Google Admin Workspace window and paste the copied value in the **Enter IP address/range** field.
12. Click **SAVE**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2Fy2ogCyAMgTenM36bLiC8%2Fimage.png?alt=media&#x26;token=510071da-ddbe-4991-ac37-555e9d230a40" alt=""><figcaption></figcaption></figure>

The IP address is added as shown in the following image.&#x20;

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FMxbwZTjymBPTiGWn3C8v%2Fimage.png?alt=media&#x26;token=c04a3773-9299-4a63-a873-033ff53fce2b" alt=""><figcaption></figcaption></figure>

13. Repeat steps 8-12 to add the other two Nightfall IP addresses (In step 10, copy the values under **IP address 2** and I**P address 3** fields).
14. Select the **Require TLS encryption** check box.
15. Click **SAVE**.

<figure><img src="https://2214688951-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg3wgFIu8T7XAT1u-f_%2Fuploads%2FqO6AbWzXngII4mYmNHqq%2Fimage.png?alt=media&#x26;token=1e3ff502-61b1-41e6-b7f1-e6437c9cf13c" alt="" width="563"><figcaption></figcaption></figure>
