Skip to content

Blog / All posts

Signed inbound email webhooks: retries, and what happens if your webhook is down (2026)

Postmark, Mailgun, SendGrid, Resend, AgentMail, Nylas, Amazon SES, Cloudflare and Bavimail compared on inbound webhook signing, retry schedules, and whether the email survives when every retry fails.

Originally published

If your inbound email webhook is down, the question that matters is not how many retries you get but whether the email still exists when the retries run out. As of November 30, 2026:

  • Kept and retrievable: Postmark (45 days by default, retry by API), Resend (30 days), AgentMail, Nylas, and Bavimail (until you delete the thread). You can catch up by listing messages.
  • Kept only if you asked for it: Mailgun stores a copy for 3 days when the route uses store(); Amazon SES keeps it if a receipt rule writes it to your S3 bucket.
  • Dropped: SendGrid Inbound Parse drops the message after 3 days of retries, without notice and without a bounce to the sender.

Retry windows range from about 4 minutes (Bavimail) to 72 hours (SendGrid). We build Bavimail. Every other figure is from the vendor's own documentation, checked on November 30, 2026.

How do inbound email webhooks compare?

ProviderSigned?RetriesIf every retry failsBody in the webhook?
BavimailHMAC-SHA256 over {timestamp}.{raw body}, X-Webhook-Signature and X-Webhook-Timestamp6 attempts: now, then 5 s, 10 s, 30 s, 60 s, 120 s (about 4 minutes); any non-2xx retried; 10 s timeoutStored before the webhook is sent; readable with GET /inbound-emails until you delete its threadNo: a summary with a 100-character preview; full message and signed attachment URLs by API
PostmarkNo HMAC; basic auth in the URL plus IP allowlisting10 retries at 1, 5, 10, 10, 10, 15, 30 minutes, 1, 2, 6 hours (about 10.5 hours); anything but 200 retried, 403 stopsShown as "Inbound Error"; retry with PUT /messages/inbound/{id}/retry; kept 45 days by default (7 to 365)Yes, with attachments inline
Mailgun (Routes)HMAC-SHA256 signature with timestamp and token10, 15, 30 minutes, 1, 2, 4 hours (8 hours); 406 stopsKept 3 days only if the route also uses store()Yes, with attachments
SendGrid Inbound ParseOnly with a security policy (ECDSA signature and/or OAuth)Up to 72 hours at increasing intervalsDropped after 3 days, no notification, no bounceYes, with attachments
Resend (email.received)Svix (svix-id, svix-timestamp, svix-signature)8 attempts: now, 5 s, 5 min, 30 min, 2 h, 5 h, 10 h, 10 h (about 27.5 hours); endpoint auto-disabled with an emailReadable through the Receiving API; 30-day retention; manual replayNo: metadata only; attachments by download_url valid 1 hour
AgentMail (message.received)SvixSame 8 attempts over about 27.5 hours; 2xx within 15 sMarked failed; readable through the messages API; endpoint disabled after 5 days of failures, missed events not redeliveredYes up to 64 KiB, then a body_url valid 1 hour
Nylas (message.created)Hex HMAC-SHA256 in X-Nylas-Signature5 attempts with backoff, the last 10 to 20 minutes after the first; only 408, 429, 502, 503, 504, 507 and timeouts retried; 20 s timeoutNotification dropped; message stays readable via /messagesDocs disagree (truncated above 1 MB vs summary fields)
Amazon SES (receipt rules)SNS messages are signed (SignatureVersion2 = SHA256)SES retries rule execution for up to 36 hours; SNS HTTP retries per its delivery policySNS discards it unless a dead-letter queue is attached; the S3 action keeps raw MIME in your bucketSNS: raw MIME, but mail over 150 KB bounces; Lambda: no body (read S3)
Cloudflare Email WorkersNo webhook: your Worker's email() handler runs on CloudflareNo Cloudflare retry; a throw returns a temporary 4xx and the sender's server retriesHeld by the sending server during its retriesRaw MIME stream, up to 25 MiB

What is the tradeoff in Bavimail's design?

Bavimail's retry window is the shortest in this table, about 4 minutes. That is deliberate: the message is written to storage, and its email.inbound.received event created in the same transaction, before any delivery is attempted, and inbound messages are not removed after a fixed time. A webhook that is down for a day loses no mail; the agent catches up by listing it.

  • A timeout or connection error is not resent automatically, because your endpoint may have received it. The delivery is held instead of being sent twice blindly.
  • After 10 failed attempts in a row across all deliveries, the endpoint is set to disabled. Any 2xx resets the count.
  • event_id stays the same on every attempt, so you can deduplicate.
  • Exhausted deliveries are not replayed. Recovery is the catch-up below.

If you would rather have the provider keep retrying for a day, Resend and AgentMail do. If you need the message to survive any outage without a catch-up job, pick a provider that keeps it (most do) and make sure you know the retention.

How do you catch up after an outage?

On Bavimail, page through GET /inbound-emails (newest first, up to 100 per page) and process the ids you haven't seen, then fetch each one with GET /inbound-emails/{email_id}:

import { Bavimail, iterPages } from 'bavimail'

const client = new Bavimail({ apiKey: process.env.BAVIMAIL_API_KEY! })

export async function catchUp(seen: Set<string>, handle: (id: string) => Promise<void>) {
  for await (const email of iterPages((opts) => client.inboundEmails.list(opts), { pageSize: 100 })) {
    if (seen.has(email.id)) break
    await handle(email.id)
    seen.add(email.id)
  }
}

Run it when your service starts and on a schedule, so any gap longer than the retry window closes on its own.

How do you verify a signed inbound webhook?

The rules are the same everywhere; only the header names change.

  1. Use the raw body. Verify the exact bytes you received before parsing JSON.
  2. Check the timestamp. Reject requests too far from your clock (Bavimail's SDK helpers default to 300 seconds) to stop replays.
  3. Compare in constant time. On Bavimail, compute HMAC-SHA256 over {X-Webhook-Timestamp}.{raw body} with the hex-decoded endpoint secret and compare it with X-Webhook-Signature (sha256=<hex>). verifyWebhookSignature (TypeScript) and verify_webhook_signature (Python) do all of this.
  4. Answer fast. Return a 2xx within the provider's timeout (10 s on Bavimail, 15 s on AgentMail, 20 s on Nylas) and do the work in a queue.
  5. Deduplicate. Every provider here may deliver an event more than once.

For a full Node and Python handler, see the inbound email webhook tutorial. Bavimail's signing, headers and retry rules are in the webhooks docs.

← All posts