Skip to content

Sender rules

Allow or block exact addresses and domains before inbound mail is stored.

01

Open and allowlist modes#

OPEN accepts every sender except matching block rules. ALLOWLIST rejects senders unless an allow rule matches; block rules always win.

Shell
curl https://botinbox.dev/v0/inboxes/INBOX_ID/rules -X POST -H "Authorization: Bearer $BOTINBOX_API_KEY" \
  -H "Content-Type: application/json" -d '{"sender_policy":"ALLOWLIST"}'

02

Create a rule#

Rules match one ADDRESS or an entire DOMAIN.

Shell
curl https://botinbox.dev/v0/inboxes/INBOX_ID/rules -X POST -H "Authorization: Bearer $BOTINBOX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"BLOCK","scope":"DOMAIN","value":"spam.example"}'