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>Related terms
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