---
title: "Email threading"
description: "How a customer's email reply finds its ticket, what the ticket tag in the subject is for, and why a ticket number alone does not thread."
url: "https://support.outpostplatform.com/service-desk/email-threading/"
product: "depot"
type: "concept"
status: "draft"
ai_summary: "Outpost threads an inbound reply to its ticket by In-Reply-To and References headers, then by Message-IDs Outpost minted, then by the subject tag such as [OUT-1042-7f3a]. The tag carries a keyed check code and only threads when the sender is already on the ticket, so a typed or leaked ticket number cannot add mail to someone else's ticket. Each mailbox can hide the tag."
availability:
  plans: ["enterprise", "msp"]
  permission: "mailbox:manage"
  preview: false
source: "https://gitlab.com/outpostplatform/docs/-/edit/main/src/content/docs/service-desk/email-threading.md"
license: "CC BY 4.0"
---

# Email threading

Email threading is how Outpost decides that an arriving email is a reply to an
existing ticket, rather than a new request. A reply that threads joins its
ticket as a new message. Everything else opens a new ticket. This page
explains what Outpost checks, in what order, and why. For how email becomes
tickets in general, see [Email to ticket](/service-desk/mailboxes/).

## What Outpost sends

Every email Outpost sends about a ticket carries three things a reply can
bring back:

- A **Message-ID** that Outpost creates. It identifies the ticket and is
  signed, so Outpost can recognize its own IDs later.
- **In-Reply-To** and **References** headers that point at the earlier
  messages on the ticket, so the customer's mail app shows one conversation.
- A **subject tag**, such as `[OUT-1042-7f3a]`: the ticket number followed by
  a four-character check code.

Replies go out through the mailbox the ticket arrived on, with that mailbox's
address as Reply-To, so the customer's reply comes back to the same place.

## How a reply finds its ticket

Outpost checks an arriving message in this order and stops at the first
match:

1. **In-Reply-To.** The message replies to a message Outpost has seen on a
   ticket.
2. **References.** One of the earlier messages in the conversation is on a
   ticket. Outpost checks the newest first.
3. **Outpost's own Message-IDs.** The message replies to an ID Outpost
   created. This works even after older message records are pruned.
4. **Subject tag.** The subject carries a valid tag for a ticket, and the
   sender is already on that ticket.

A reply matched by its headers (1 to 3) can also add the people it copies to
the ticket. See [CC subscribe](/service-desk/mailboxes/#cc-subscribe). A
reply matched by its subject tag never adds anyone.

Mail that fails DMARC, and mail from a blocked sender, is held in
[Suspended mail](/service-desk/suspended-mail/) even when it threads.

## Why a ticket number alone does not thread

A ticket number such as `OUT-1042` is easy to type and easy to guess. If it
were enough to join a ticket, anyone could write into somebody else's ticket
by putting a number in a subject line, and read the replies that followed.

So the subject tag has two safeguards:

- **The check code.** The four characters after the number are calculated
  from the ticket number with a key only your Outpost holds. A tag with the
  wrong code, or no code, is ignored completely. `[OUT-1042]` on its own
  matches nothing.
- **The sender must already be on the ticket.** A valid tag leaks easily: a
  customer forwards the thread to a colleague, or an out-of-office reply
  quotes the subject. So a tag only threads mail from the ticket's requester
  or a participant, and never adds a new participant.

A message whose tag is refused is treated as new mail and opens a ticket.

## Hide the subject tag

Each mailbox can hide the tag. In the wizard's **Routing** step, select **Hide
the ticket number in reply subjects**. Replies still thread by their headers.

Keep the tag visible if customers reply from phones or older mail apps, or
through a mail filter that rewrites headers. The tag is what threads a reply
whose headers were lost.

Outpost never puts two tags in one subject. A notification email whose
subject already has `[OUT-1042]`, as the built-in templates do, gets the full
tag in its place. See
[Ticket notification emails](/service-desk/ticket-notifications/).

## Related

- [Email to ticket](/service-desk/mailboxes/)
- [Ticket notification emails](/service-desk/ticket-notifications/)
- [Suspended mail](/service-desk/suspended-mail/)
