# Mailgun

## Overview

Many organizations elect to trigger an email notification or email-based workflow when the Identity Intelligence security platform has a new finding or actionable alert. Please see the [#example-use-case-mailgun](#example-use-case-mailgun "mention")section below for more details. &#x20;

Up to this point, this email would come from a cisco.com domain. For a more flexible seamless process, Identity Intelligence has introduced the ability to configure several of the top mail providers.&#x20;

In the integrations tab, there is a new section for “Email”, which includes options to set up integrations for your own Mailgun service.&#x20;

## Prerequisites

This article assumes that your organization has a Mailgun implementation and you have necessary admin rights to configure it. &#x20;

## Mailgun Configuration

1. Go to the Integrations tab and select **Add Integration**
2. Scroll to the **Email** section and select the SendGrid Integration
3. Fill in the following fields and click **Save** when completed:&#x20;

* **Name** - this is a display name in the Identity Intelligence UI for the integration
* **Description** - optional
* **From Address** - an email address that exists on the verified domain&#x20;
* Base URL - API base URL, corresponding to your geographic region, e.g. [https://api.mailgun.net](https://api.mailgun.net/), <https://api.eu.mailgun.net/> - please see this article <https://documentation.mailgun.com/en/latest/api-intro.html#base-url>
* **Domain** - this should be a verified Mailgun domain, as explained in <https://help.mailgun.com/hc/en-us/articles/360026833053-Domain-Verification-Walkthrough>
* **Default email service** (toggle) - enable this option to make this email integration the default provider from which email notifications will be sent
* **API Key** - An API key (secret), as explained in <https://help.mailgun.com/hc/en-us/articles/203380100-Where-Can-I-Find-My-API-Key-and-SMTP-Credentials->

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2F29PlELr1gPS9dN50lw50%2Fimage.png?alt=media&#x26;token=aaf2918c-7d77-46b0-8fd6-121dd7546b9c" alt=""><figcaption></figcaption></figure>

## Test Connectivity - Mailgun

After the integration is created, you can test connectivity to the service using the 3-dot menu option on the integration row and select **Test Connectivity** -&#x20;

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2F7Suto55xv45EtODK0K9g%2Fimage.png?alt=media&#x26;token=4d5de780-674a-4f5a-b715-10b15674e690" alt=""><figcaption></figcaption></figure>

## Example Use Case - Mailgun

Organizations may find that their users are connecting to corporate systems and applications while using personal 3rd party VPN services like NordVPN or ExpressVPN, or less reputable ones than that.  This is a bad security practice and many companies prohibit this within their acceptable use policy. &#x20;

Identity Intelligence surfaces personal VPN usage in the [personal-vpn-usage](https://docs.oort.io/understanding-check-failures/oort-insights/identity-posture-management-insights/personal-vpn-usage "mention") check. Using the check settings menu, you can configure Identity Intelligence to send email messages to users (or their managers, if defined in the primary IDP), informing them of this policy violation. &#x20;

With the Mailgun integration configured above and set to Default Email Service, **this email will now originate via Mailgun from the sending From address list**. &#x20;

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2FJYrwlupytH13qrpKDPY6%2Fimage.png?alt=media&#x26;token=ba1dc742-a4ea-4e86-908f-2919e5bfd15f" alt=""><figcaption></figcaption></figure>

You can also customize the message sent to the end user per Check via the [Check Settings](https://docs.oort.io/understanding-check-failures/customizing-checks#notification-settings). &#x20;

<figure><img src="https://582105988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqPSBzsjxd7KYg9DNVZ4l%2Fuploads%2Ftc2VMwTdgApoJE4OFJPl%2Fimage.png?alt=media&#x26;token=c97a8b07-e248-4720-b0a1-24dda8f8e6b3" alt=""><figcaption></figcaption></figure>
