Mailgun is an email delivery service for sending, receiving, and tracking emails. You can use a webhook in the Mailgun platform to forward inbound and outbound email events to the Sumo Logic HTTP endpoint. Using these logs, you can monitor the entire email communication lifecycle, events such as accepted, rejected, delivered, and failed messages, as well as recipient interactions like opened, clicked, unsubscribed, and complained events in Sumo Logic. For more details, refer to the Mailgun Documentation.
The Sumo Logic integration for Mailgun ingests email events into Sumo Logic through an outgoing webhook available in Mailgun. For more information on supported events that are ingested through the Mailgun webhook, see the Mailgun Documentation.
This section has instructions for collecting logs for the Sumo Logic Mailgun webhook collection.
Follow the below steps to configure the Hosted Collector to receive Mailgun events:
- In the Sumo Logic portal, create a new Hosted Collector or use an existing one. Then add an HTTP Logs and Metrics Source.
- Configure Source Category in the HTTP source - for example,
webhook/mailgun- for the Mailgun integration.
- Copy and save the endpoint URL of the source.
Configure the webhook integration in Mailgun to send events to the Sumo Logic HTTP source. Once configured, it will be triggered each time any email events occur within your Mailgun account.
Follow the below steps to configure the Mailgun webhook.
- Sign in to the Mailgun account.
- Under Sending section move to the Webhooks option.
- Click Add Webhook. The webhook form appears.
- Enter webhook form data as follows:
- Event Types. Select the event types for which you want to send notifications to Sumo Logic.
- URL. Enter the Sumo Logic HTTP endpoint URL (source address) created above.
- Click Create Webhook.
- Verify Mailgun events are getting ingested in Sumo Logic by executing the following query on Sumo Logic's Log Search panel.