Skip to content

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.

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.

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. 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 even when it threads.

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.

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.

Content is licensed CC BY 4.0. Code samples are MIT. Outpost and the Outpost mark are trademarks of Outpost Business Solutions, PBC and are not covered by either license.