Skip to main content

Module headers

Module headers 

Source
Expand description

The raw header block, unfolded (RFC 5322 §2.2.3).

mail-parser decodes what people read: names, subjects, bodies. The headers servers write to record a message’s journey (Authentication-Results, Received, the spam verdicts) are read here from the raw block instead, because they repeat and their order matters: each server adds its own on top (RFC 5321 §4.4).

Structs§

RawHeaders
Header fields in the order they appear, names as written, values unfolded.

Functions§

header_block 🔒
The header block ends at the first empty line (RFC 5322 §2.1), whatever ends the lines: a body’s own blank line further down never extends it, so the body cannot pass for headers (an Authentication-Results among them).
push_line 🔒
A line starting with a space or a tab continues the previous field (folding).