Delivery rules

Rules decide, per recipient, whether a message is allowed or blocked, before it ever reaches a provider.

How rules evaluate

For every recipient, Messy checks each active rule and the first match wins. If nothing matches, the channel’s default permission applies.

FieldTypeDescription
channelreqstringThe channel the rule applies to.
conditionreqstringA case-insensitive substring of the recipient address or phone number.
outcomereqstringallow (deliver) or deny (block).
A condition is a plain substring, not an expression. @acme.com matches ada@acme.com, and +1555 matches +15551234567. Something like recipient == 'ada@acme.com' is stored literally and will never match.

Common patterns

  • Allow only your own domain in staging; block everything else by default.
  • Block a known-bad domain across production.

Each cc and bcc recipient is evaluated independently, so one message can deliver to some recipients and be rejected for others.