Maxblocks, maxlines Channel Options
Automatic fragmentation of large messages (maxblocks
, maxlines
)
Some mail systems or network transports cannot handle messages that exceed certain size limits. The MTA provides facilities to impose such limits on a channel-by-channel basis. Messages larger than the set limits will automatically be split (fragmented) into multiple, smaller messages. The Content-type: used for such fragments is message/partial, and a unique id parameter is added so that parts of the same message can be associated with one another and, possibly, be automatically reassembled by the receiving mailer.
Message fragmentation and defragmentation may also be used to effectively provide "checkpointing" of message transmission.
The maxblocks
and maxlines
channel options are used to impose size limits beyond which automatic fragmentation will be activated. Both of these channel options require a single integer argument. maxblocks
specifies the maximum number of blocks allowed in a message. An MTA block is normally 1024 bytes; this can be changed with the block_size
MTA option. maxlines
specifies the maximum number of lines allowed in a message. These two limits can be imposed simultaneously if necessary.
Message headers are to a certain extent included in the size of a message. Since message headers cannot be split into multiple messages, and yet they themselves may exceed the specified size limits, a rather complex mechanism is used to account for message header sizes. This logic is controlled by the max_header_block_use
and max_header_line_use
MTA options.
max_header_block_use
is used to specify a real number between 0 and 1. The default value is 0.5. A message's header is allowed to occupy this much of the total number of blocks a message can consume (specified by the maxblocks
channel option). If the message header is larger, the MTA takes the product of max_header_block_use
and maxblocks
as the size of the header; i.e., the header size is taken to be the smaller of the actual header size and maxblocks
* max_header_block_use
.
For example, if maxblocks
is 10 and max_header_block_use
is the default, 0.5, any message header that is larger than 5 blocks is treated as a 5 block header, and if the message is 5 or fewer blocks in size it will not be fragmented. A value of 0 will cause headers to be effectively ignored insofar as message size limits are concerned. A value of 1 allows headers to use up all of the size that's available. Note, however, that each fragment will always contain at least one message line, regardless of whether or not the limits are exceeded by this.
The max_header_line_use
channel option operates in a similar fashion in conjunction with the maxlines
channel option.
See the defragment
channel option and the Defragmentation channel for discussion of the reverse operation: that is, how the MTA can be configured to perform automatic defragmentation of message fragments that it receives.
See also: