Headerfoldpreserve, headerfoldremove, headerlabelalignment, headerlinelength Channel Options

From MsgServerDocWiki

Jump to: navigation, search


Header alignment and folding (headerfoldpreserve, headerfoldremove, headerlabelalignment, headerlinelength)

The headerlabelalignment 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 headerlabelalignment is 0, which causes headers not to be aligned.

The headerlinelength 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 headerlinelength 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.

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 headerfoldremove and headerfoldpreserve channel options. These options apply to source channels.

headerfoldremoveis 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 headerlinelength channel option or LINELENGTH header trimming option).

The headerfoldpreserve 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 headertrailingpreserve; 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 headerfoldpreserve 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).

Personal tools