Skip to content
Glossary · Message format

Header folding

Splitting a long header field over several lines by inserting a line break before a space or tab; programs undo it by joining the lines back together.

What it means

RFC 5322 lets a header field continue over several lines: a CRLF immediately followed by a space or tab is a fold, and the continuation belongs to the same field. Unfolding simply removes those CRLFs. Folding keeps lines under the recommended 78 characters, and it is how long values such as a DKIM signature, a list of recipients or an encoded subject stay within the line length limit.

Folds may go only where the syntax allows folding white space, and RFC 5322 forbids folding so that a line holds nothing but white space; it recommends folding at high-level breaks, such as after the comma between addresses. Badly folded headers are read as malformed by some receivers, Gmail among them. DKIM's relaxed header canonicalization unfolds fields before checking, so legitimate refolding in transit does not break the signature.

Example

To: Ana Silva <ana@example.net>,
 Ben Okafor <ben@example.net>

On this site

Sources

What this definition rests on. The wording is ours; the facts are theirs.

All 432 terms in the glossaryThe wiki: blocklists and bounce codes

Beat · paid monitoring

A heartbeat for your email.

Beat runs every check on this site on a schedule: 41 checks, 25 blacklists and real inbox placement. The moment something breaks, it tells you what broke, why it matters, and the exact fix.

example.comWatching
  • SPFpass
  • DKIMpass
  • DMARCp=none
  • Blacklists0 of 25

Illustrative. Your domain, every few hours.

Also from us:Pulse: your own sending infrastructureConsulting: $65/hr, no retainer