Webhooks
Dovecot Push Hook
Accepts push events and fans out mailbox changes to websocket clients.
POST
/hooks/dovecot
Webhook
Request body is newline-delimited JSON. Each line is a single event.
Headers
x-dovecot-signature: hex_hmac
Signature is HMAC-SHA256 of the raw body, hex encoded.
Body
{"event_id":"evt_1","user":"user_123","event_type":"MailboxesChanged","mailbox":"INBOX","uidvalidity":"33","highestmodseq":"4401"}
{"event_id":"evt_2","user":"user_123","event_type":"MailboxesChanged","mailbox":"Sent","uidvalidity":"33","highestmodseq":"4402"}
Example request
curl -X POST "http://127.0.0.1:3000/hooks/dovecot" \
-H "x-dovecot-signature: HEX_HMAC" \
--data-binary '{"event_id":"evt_1","user":"user_123","event_type":"MailboxesChanged","mailbox":"INBOX","uidvalidity":"33","highestmodseq":"4401"}'
Response
{ "ok": true, "accepted": 1 }