Inbox processing rules determine what happens to each message after it's fetched: whether to create a record, file the message, run an action, or simply discard it. Rules run in order and the first match wins (unless you mark a rule as “continue on match”).
Match Criteria
- From address: Match a specific sender or domain (e.g.
@stripe.com). - Subject regex: Match a pattern (e.g.
^Ticket #(\d+):). - Body contains: Plain-text or HTML body contains a keyword.
- Has attachments / specific MIME type: Match messages with PDFs, images etc.
- Header values: Match arbitrary headers (e.g. List-Id, Auto-Submitted, In-Reply-To).
Action Types
- Create record: Spawn a new row in a chosen datastore, mapping email fields to columns.
- Append to existing record: Find a record by reference number in the subject or by In-Reply-To header, then add the message as a related note.
- Run task: Trigger a configured task (which can in turn run any custom code).
- Forward: Hand off to another address.
- Discard: Mark processed and drop.
Worked Examples
- Support ticket creation: Match anything to support@; create a ticket; auto-reply with the new ticket number.
- Ticket reply matching: Match subject
^Re: Ticket #(\d+); find ticket by ID; append the body as a customer reply. - Bounce handling: Match from
mailer-daemon; parse the bounced recipient address; mark the user's email as invalid. - Auto-responders: Match Auto-Submitted header; discard silently so vacation replies don't loop.
Tip: Always end your rule list with a catch-all “unmatched” rule that creates a row in a triage inbox. That way nothing ever vanishes and you can refine rules over time as patterns emerge.