Every call sent by Mailpro carries headers that let you authenticate it:

X-Mailpro-Signature : t=1758000000,v1=5a72…c8b1
X-Mailpro-Event-Id  : evt_5f2c…
X-Mailpro-Event-Type: email.delivered
X-Mailpro-Attempt   : 1

Computing the signature

v1 is the HMAC-SHA256, in lowercase hexadecimal, of the string t + "." + raw request body, computed with the secret given when the webhook was created. The body must be taken exactly as received, before any JSON decoding.

// Node.js
const crypto = require("crypto");
function verify(rawBody, header, secret) {
const t  = header.match(/t=([0-9]+)/)[1];
const v1 = header.match(/v1=([0-9a-f]+)/)[1];
const expected = crypto.createHmac("sha256", secret).update(t + "." + rawBody).digest("hex");
const fresh = Math.abs(Date.now() / 1000 - Number(t)) < 300;   // 5 minutes
return fresh && crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(v1));
}

Good practice

  • Reject any request whose signature does not match, or whose timestamp t is more than a few minutes old (replay protection).
  • Use X-Mailpro-Event-Id to ignore an event you have already processed: the same delivery may be presented several times when retried.
  • Answer 2xx within 10 seconds, then process the message asynchronously.
  • After Rotate the secret, the old secret is invalidated immediately: update your server first, or tolerate a minute of rejected signatures.

Automation webhook targets (direction B) use the same principle, with the X-Mailpro-Automation-Signature header and the optional signing key you define on the target.

Previous question

   

Next question

You might also be interested in:

How to Install Mailpro?

Good news — there's nothing to install. Mailpro runs entirely in your browser. You sign up, log in, and start...

Read more

How to Configure SPF With Mailpro: 5-Step Guide

Configuring SPF with Mailpro is a 5-minute job that pays off immediately: better inbox placement, fewer bounces and protection against...

Read more

Countdown Timers for FREE Mailpro Accounts

The countdown timer shown on a free Mailpro account is your 30-day evaluation window. It tells you how much time...

Read more

How to Configure DKIM With Mailpro: 4 Easy Steps

Configuring DKIM with Mailpro takes about ten minutes and pays off immediately: signed messages, higher inbox placement and protection against...

Read more

How to Integrate Mailpro SMTP with an AI / GPT Operator

Connecting your Mailpro SMTP relay to an AI agent — like ChatGPT Operator, Claude, n8n or your own Python/Node script...

Read more