Skip to content
Nov 27, 2026NewsletterRSS

Mailtrap Inbound Can Now Route Incoming Mail to Teams by Rule

Mailtrap Inbound inboxes can forward matching mail by sender, recipient or header to up to 5 addresses, set through the API, while an app keeps the thread.

3 min read

MailtrapAgent inboxes

Isometric illustration of a red mailbox on a post with a direction signpost beside it and three envelopes flying off in different directions on a lime green background

Mailtrap Inbound inboxes can now forward incoming email to other addresses based on rules that match the sender, the recipient or any header, the company said in its Nov. 13 changelog. Each rule sends a copy to up to 5 addresses, and the app or AI agent reading the inbox keeps working with the full thread, Mailtrap said.

Rules are set through the API only

POST /api/inbound/inboxes/{inbox_id}/forward_rules creates a rule, and GET, PATCH and DELETE on /forward_rules/{id} list, update and delete rules, according to the changelog. Mailtrap’s help article for the feature says rules are available through the API only for now.

A rule is a list of conditions plus a list of destinations. A condition matches on sender, recipient (the To or Cc address) or a header named in header_key, with operators such as equal, contains, starts_with and ends_with. Header conditions also accept empty and not_empty. Mailtrap’s example sends mail from @vendor.com with “invoice” in the subject to a finance address.

Every condition in a rule must match

Conditions combine with AND only, so “either/or” logic takes separate rules, the help article says. Matching is plain text, with no regular expressions, and rules never read the message body. An inbox can hold up to 5 rules, each with up to 5 conditions and 5 destinations. A rule with no conditions matches every message.

Every matching rule forwards the message, and an address named by several matching rules gets one copy, according to Mailtrap’s API reference. The result for each destination shows up in a forwards field on the message in the Messages and Threads endpoints.

Forwards leave from the inbox address

Mailtrap sends each forward from the inbox’s own address, so it passes DMARC on the customer’s domain, the help article says. A catch-all inbox on a custom domain sends from the exact address the mail was sent to. Body and headers stay as they were, and the original sender goes into Original-From and X-Mailtrap-Original-From headers.

Each destination gets one delivery attempt with no retry, the help article says. Replies from the destination mailbox go back to the inbox address unless the original mail carried a Reply-To header. Mail that Mailtrap already forwarded is not forwarded again.

Key takeaways

  • Rules match sender, recipient or any header and forward to up to 5 addresses.
  • Each inbox holds up to 5 rules, set through the API only.
  • Conditions combine with AND, match plain text and never read the body.
  • Forwards come from the inbox address and get one delivery attempt with no retry.

The take

We think the single delivery attempt matters more than the rule limits. A forward that fails once is gone, so a destination mailbox can silently miss mail while the inbox still has it. Mailtrap records each outcome in the forwards field, so read it.

Rewriting the sender is the right call for DMARC. A forward sent under the original sender’s domain would fail that domain’s policy, because Mailtrap is not allowed to send for it. The cost is that the destination sees the inbox as the sender, so a helpdesk that sorts by sender needs to read Original-From instead.

Before relying on a rule, send a test message that should match it and one that should not. Then check the forwards field on both and confirm the copy arrived only where it should.