Headerfoldpreserve, headerfoldremove, headerlabelalignment, headerlineincrementheaderlinelength Channel Options

Header alignment and folding
The  channel option controls the alignment point for message headers enqueued on this channel; it takes an integer-valued argument. The alignment point is the margin where the contents of headers are aligned. For example, sample headers with an alignment point of 10 would appear as follows: To:     ned@innosoft.com From:   kristin@innosoft.com Subject: Alignment test The default  is 0, which causes headers not to be aligned.

The  channel option controls the length of message header lines enqueued on this channel. The default, if this channel option is not explicitly set, is 80. Lines longer than this are folded in accordance with RFC 822 folding rules. Note that  applies to all header lines; when some header lines should get different folding points than other header lines, then see instead the LINELENGTH  header trimming option.

The MTA attempts to fold the lines at or before the length specified by , but if no suitable folding point can be found, then the length is adjusted by. takes a required non-negative integer argument. Only values between (inclusive) 1 and 100 are permitted; note that setting values that diverge dramatically from the default value of 20 may result in problematic behavior.

Note that these channel options only control the format of the headers of the message in the message queue; the actual display of headers is normally controlled by the user agent. In addition, headers are routinely reformatted as they are transported across the Internet, so these channel options may have no visible effect even when used in conjunction with simple user agents that do not reformat message headers.

Whether the MTA attempts to preserve "original" fold points in folded header lines when practicable, or whether the MTA automatically unfolds and then later re-folds header lines, is controlled by the  and   channel options. These options apply to source channels.

is the default; it means that the MTA unfolds all incoming header lines when first receiving a message (and then refolds when outputting header lines, at fold points chosen in accordance with the  channel option or LINELENGTH header trimming option).

The  channel option tells the MTA to attempt to preserve "original" fold points in header lines. Note that fold points in addressing header lines (such as To:, Cc:, Bcc:, etc.) are not preserved by this channel option, nor are fold points in date header lines or MIME header lines. This keyword instead affects primarily text header lines such as the Subject: header line. When this option is used, it is usually most appropriate to also set ; that is, when attempting to preserve original fold points, typically one also wants to preserve all original white space, including trailing white space, that might be present in the header line. However, note that enabling the  channel option causes any originally present horizontal tab characters to be converted to space characters, except that immediately after each fold point a horizontal tab character will be used as the initial linear white space character (regardless of whether the original white space character was a tab or a space).

Note that various aspects of this sort of header line processing can be testing using the   utility.

Note that message bodies are potentially subject to MIME encoding to ensure transport-safe line length, as controlled by the  channel option; such message body encoding is separate and distinct from (and happens after) the header line processing discussed here.

See also:
 * headertrailingpreserve Option
 * Header option files
 * test -header utility
 * linelength Option
 * Headers channel options
 * Channel options