Email header / CRLF / folding boundary

Separate email header line-break boundaries

Use fixed cases for CRLF, folding, the header/body separator, newline injection risk and unknown values to decide safe or needs-review. No email is sent, and this page does not communicate, store or send.

Five line-break boundaries

A line break is more than a display separator. Separate header values, continuations and the body boundary, and stop inputs that could create another header.

CRLF = delimiter / folding = WSP continuation / CRLF CRLF = body boundary
boundaryreviewdecision
CRLFCRLF separating header linesneeds review before assembling a value
foldingWSP-starting continuationconditionally safe after specification check
body separatorCRLF CRLFneeds review; keep header and body separate
injection riskCRLF followed by another headerReject; never call it safe without review
unknownunrecognized line-break formReject; needs review rather than guessing

Safe review order

  1. Record the header name, value and line-break owner separately.
  2. Do not treat CRLF and a WSP continuation as the same value.
  3. Make CRLF CRLF an explicit header/body boundary.
  4. Reject inputs that can create another header and unknown values before sending.

This page uses synthetic cases only. It does not send mail, make SMTP/HTTP requests, accept arbitrary headers, store data or send analytics.

Five fixed cases

casefixed exampledecision
crlf-boundarySubject: hello CRLFneeds review
legal-foldingHeader: first CRLF WSP secondconditionally safe
header-body-separatorCRLF CRLFneeds review
newline-injection-riskvalue CRLF Bcc:Reject / needs review
unknown-header-valueunknown line breakReject / needs review