List Armor

Mailgun Integration

Automatically sync unsubscribes, bounces, and spam complaints from Mailgun to your suppression lists.

Overview

The Mailgun integration uses webhooks to automatically add email addresses to your suppression lists when recipients unsubscribe, report spam, or experience permanent bounces.

Real-Time Sync

Events processed within seconds

Signed Webhooks

HMAC signature verification

Auto-Suppress

Configurable event handling

Prerequisites

  • A Mailgun account with webhook access
  • A List Armor campaign with at least one suppression list
  • Your Mailgun domain verified and active

Setup in List Armor

  1. Navigate to your campaign and click ESP Integrations
  2. Click Add Integration and select Mailgun
  3. Choose the Target Suppression List where opt-outs will be added
  4. Configure which events to auto-suppress:
    • Hard bounces (recommended)
    • Spam complaints (recommended)
    • Unsubscribes (recommended)
  5. Add your Mailgun Webhook Signing Key for signature verification
  6. Save the integration and copy the Webhook URL
Important: Find your webhook signing key in Mailgun under Settings → Webhooks → Webhook Signing Key.

Configure Mailgun

  1. Log in to your Mailgun dashboard
  2. Select your sending domain
  3. Navigate to Sending → Webhooks
  4. For each event type, click Add Webhook and paste your List Armor webhook URL:
    • Permanent Failure — Hard bounces
    • Complained — Spam complaints
    • Unsubscribed — Unsubscribes
  5. Save each webhook configuration
Note: Mailgun requires you to set up each event type as a separate webhook, all pointing to the same List Armor URL.

Supported Events

Mailgun Event List Armor Action Default
permanent_fail Add to suppression list Enabled
temporary_fail Logged only (not suppressed) N/A
complained Add to suppression list Enabled
unsubscribed Add to suppression list Enabled

Testing

After configuring the webhooks, verify they're working:

  1. In Mailgun, use the Test Webhook button for each event type
  2. Check your List Armor integration for the Last webhook received timestamp
  3. Send a real test email and trigger an unsubscribe
  4. Verify the email appears in your target suppression list

Troubleshooting

  • Verify webhooks are configured for each event type
  • Check that the webhook URLs are correct
  • Review Mailgun's webhook logs for delivery failures
  • Ensure your domain is verified and active

  • Verify you're using the Webhook Signing Key (not your API key)
  • Re-copy the signing key from Mailgun Settings
  • Check for extra whitespace when pasting

  • Mailgun requires separate webhook setup for each event type
  • Verify all three webhooks are configured (bounces, complaints, unsubscribes)
  • Check that each webhook URL is saved correctly

Need Help?

Having trouble with your Mailgun integration? Our support team can help.

Contact Support