> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lekalao.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Provider feedback

> Deliveries, bounces and complaints: what the provider sends back, and what Lekalao does with it.

An e-mail handed to the provider has not arrived yet. The provider then knows whether it was **delivered**, whether it **bounced** (no such address, a full mailbox) or whether the person **reported it as spam**. It tells Lekalao through a **webhook**: an address the provider calls on every event.

Without that wiring, Lekalao keeps writing to dead addresses and to people who complain, and your sender reputation decays without your seeing it.

## Wiring the webhook up

On the mailer's page (**Settings → Mailers → a mailer**), the **Feedback** section:

### Automatically

For **Postmark, Mailgun, SendGrid, Brevo and Resend**, the **Set it up for me** button creates the webhook at the provider with the API key you saved, for the right events, and keeps what the provider sends back (SendGrid's public key, Resend's signing secret). The date it was created is shown afterwards; **Set it up again** recreates it or brings it back in line.

<Note>
  The API key needs the right to manage webhooks. For **Mailgun**, the
  webhook signing key belongs to the account and is never returned by the
  API: copy it from Mailgun into the field provided.
</Note>

### By hand

Copy the **Webhook URL** and follow the instructions on screen:

| Provider       | Where                                                                                                                       | Events                                                                    | Signature                |
| -------------- | --------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------ |
| **Amazon SES** | A *configuration set* with an SNS destination, then an HTTPS subscription of the URL to the SNS topic (it confirms itself). | Delivery, Bounce, Complaint                                               | SNS signature checked    |
| **Postmark**   | The *message stream*, then Webhooks.                                                                                        | Delivery, Bounce, Spam complaint                                          | A secret in the URL      |
| **Mailgun**    | Sending → Webhooks.                                                                                                         | delivered, permanent failure, temporary failure, complained, unsubscribed | HTTP signing key         |
| **SendGrid**   | Settings → Mail Settings → Event Webhook, with the signature on.                                                            | delivered, bounce, blocked, deferred, dropped, spamreport, unsubscribe    | A public key to copy     |
| **Brevo**      | Transactional → Settings → Webhooks.                                                                                        | delivered, bounce, spam, unsubscribe                                      | A secret in the URL      |
| **Resend**     | Webhooks.                                                                                                                   | delivered, bounced, complained                                            | A signing secret to copy |

An **SMTP** provider sends nothing back: bounces come back as e-mails in the sending mailbox, which Lekalao does not read.

## What each event does

| Event                                      | Effect                                                                                           |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------ |
| **Delivered**                              | The send is marked delivered; it counts in "Delivered" in the statistics.                        |
| **Soft bounce**                            | The send is marked; the address is not blocked (a full mailbox, a server briefly unavailable).   |
| **Hard bounce**                            | The address goes to the **suppression list** and the person is **unsubscribed from every list**. |
| **Spam complaint**                         | The same: suppressed and unsubscribed everywhere.                                                |
| **Unsubscribe** (reported by the provider) | Unsubscribed from every list.                                                                    |

Every bounce is classified (no such address, full mailbox, blocked by the receiving server, content refused, no such domain, other) and visible in the campaign's outbox. Bounces and complaints are also passed to the [outgoing webhooks](/developers/webhooks) (`mail.bounced`, `mail.complaint`).

<Info>
  The opens and clicks some providers report are **ignored**: Lekalao
  measures them itself, with its own pixel and links, so that nothing is
  counted twice.
</Info>

## The log

**Settings → Provider feedback**: every call received, kept 30 days (you can change it), with the date, the provider, the event, the status and the address. Click a row to see the raw payload.

| Status        | Means                                                                |
| ------------- | -------------------------------------------------------------------- |
| **Processed** | The event was applied.                                               |
| **Ignored**   | An event with no effect (an open, a click, an unknown kind).         |
| **Rejected**  | An invalid signature, or a call that did not come from the provider. |

Filter by status and, when you have several, by provider. Many **rejected** calls usually mean a signing secret was copied wrongly.
