Skip to content
nofeb

What is Reply extraction?

Also called quoted-text stripping

Reply extraction separates the new text of an email reply from the quoted history and signature below it. An agent that reads only the new text uses less context, does not mistake old messages for new instructions, and cannot be fooled by a forged earlier message inside the quote.

Checked against the engine on .

How does Reply extraction work?

Mail clients quote differently: "On … wrote:" lines, > prefixes, Outlook header blocks, forwarded-message separators. Signatures vary as much. Parsing a reply reliably means recognising these markers and stopping at the first one.

For a language model, quoted history is also a security problem: anyone can type a fake "previous message" from your CFO into a reply. Dropping the quote removes that vector.

How does nofeb use Reply extraction?

  • Every message carries reply_text, its new content with quoted history and signature removed, beside the full text and HTML.
  • safe_body builds on it, removing invisible characters and hidden HTML too, and get_thread_context returns a whole thread oldest first with safe_body for each message, so the model sees each message's new words once.

Frequently asked questions

How do I get only the new reply text from an inbound email?

Read reply_text on the message, or safe_body if the text is going to a model. Both are computed for every inbound path, including Postmark, Mailgun and SendGrid.

Status of everything on this page

Every capability named above, with its status as reconciled against the engine.

CapabilityWhat it doesStatus
Reply extraction Each message carries its new text with quoted history and signature removed. Shipped
safe_body for untrusted mail The message's new text with zero-width and direction-altering characters, hidden HTML and forgeable quoted history removed, wrapped in a provenance header that tells the model whose words these are. Shipped
LLM-ready thread context A whole thread, oldest first, with safe_body text and the thread's metadata, in one call. Shipped