Block_limit, block_size, header_limit, line_limit, max_header_block_use, max_header_blocks, max_header_line_use, max_header_lines, max_mime_levels, max_mime_parts, normal_block_limit, non_urgent_block_limit, urgent_block_limit MTA Options
From MsgServerDocWiki
Message size controls (block_limit, block_size, header_limit, line_limit, max_header_block_use, max_header_blocks, max_header_line_use, max_header_lines, max_mime_levels, max_mime_parts, normal_block_limit, non_urgent_block_limit, urgent_block_limit)
The MTA has a variety of options relating to message size, such as limits on the size of messages allowed in, message size affecting message processing priority, limits on the extent to which the MTA looks into messages of complex MIME structure, and fine tuning of message fragmentation.
block_limit (integer > 0)
This option places an absolute limit on the size, in MTA blocks, of any message which may be sent by or received with the MTA. Any message exceeding this size will be rejected. By default, the MTA imposes no size limits. Note also that the blocklimit and sourceblocklimit channel options can be used to impose limits on a per-channel basis. The size in bytes of an MTA block is specified with the block_size MTA option. Or domain LDAP attributes can be used to impose per-domain limits; see the ldap_domain_attr_blocklimit MTA option (normally specifying the use of the mailDomainMsgMaxBlocks attribute) and ldap_domain_attr_sourceblocklimit MTA option. Or user LDAP attributes can be used to impose per-user limits; see the ldap_maximum_message_size MTA option (normally specifying the use of the mgrpMsgMaxSize LDAP attribute) and the ldap_sourceblocklimit MTA option.
block_size (integer > 0)
The MTA measures message size in units of MTA "blocks". For instance, the MTA message log files (resulting from placing the logging option on a channel) record message sizes in terms of blocks. MTA blocks are also the unit of measurement for various message size limit and message size based effects, as specified via channel options including blocklimit, sourceblocklimit, alternateblocklimit, holdlimit, nonurgentblocklimit, normalblocklimit, urgentblocklimit, and maxblocks, and via MTA options including block_limit, bounce_block_limit, content_return_block_limit, header_limit, non_urgent_block_limit, normal_block_limit, urgent_block_limit, max_header_block_use, and max_internal_blocks. Normally an MTA block is equivalent to 1024 octets. This option can be used to modify this sense of what a block is.
NOTE: The MTA stores message sizes internally as an integer number of blocks. If the size of a block in bytes is set to a very small value it is possible for a very large message to cause an integer overflow. A message size of greater than 2**31 blocks would be needed, but this value is not inconceivable if the block size is small enough.
Given the extensive list (above) of values measured in units of "blocks", it may be useful here to also list values that are not measured in "blocks". In particular, measurements that do not use the block_size, but which instead are always measured in units of bytes, include the conversion channel environment variable PART_SIZE, the Content-length: MIME header line value, the SMTP protocol extension SIZE value (see RFC 1870), and the user-level mailQuota LDAP attribute (more properly from the MTA's point of view, the attribute pointed to by the ldap_disk_quota MTA option and the domain-level mailDomainDiskQuota LDAP attribute (which note is not used by the MTA proper). Furthermore, the user-level mailQuota LDAP attribute (more properly from the MTA's point of view, the attribute pointed to by the ldap_disk_quota MTA option and the Sieve filter size operator's value are also normally interpreted as bytes, (though Sieve size values can optionally use a K, M, or G unit indicator to indicator measuring in units of 2**10, 2**20, or 2**30, and similarly the mailQuota attribute's value can use K, M, or G unit indicators).
header_limit (integer)
The header_limit option sets a limit, in MTA blocks (see the block_size option), on how big a message's primary (outermost) header can be. Headers over the specified size will be (silently) truncated. The default is 2000 blocks.
line_limit (integer)
This option places an absolute limit on the overall number of lines in any message which may be sent or received by the MTA. Any message exceeding this limit will be rejected. By default, the MTA imposes no line count limits. Note also that the linelimit channel option can be used to impose limits on a per-channel basis.
max_header_block_use (real number between 0 and 1)
The max_header_block_use option controls what fraction of the available message blocks can be used by message headers.
max_header_blocks (integer)
Truncate original, incoming message header after the specified number of blocks (by forcing additional, supposedly header material, into the message body). The default is no limit, but see also the max_header_lines MTA option. The max_header_blocks and max_header_lines MTA options provide some protection against denial-of-service attacks in the form of messages with extravagantly large/long headers.
max_header_line_use (real number between 0 and 1)
The max_header_line_use option controls what fraction of the available message lines can be used by message headers.
max_header_lines (integer)
Truncate original, incoming message header after the specified number of lines (by forcing additional, supposedly header material, into the message body). The default is 10,000. The max_header_blocks and max_header_lines MTA options provide some protection against denial-of-service attacks in the form of messages with extravagantly large/long headers.
max_mime_levels (integer)
Specify the maximum depth to which the MTA should process MIME messages. The default is 100, meaning that the MTA will process up to one hundred levels of message nesting. Higher values may require additional amounts of memory and, for the Dispatcher, additional per-thread storage space. If max_mime_levels>0, then levels of nesting higher than specified will not be processed. If max_mime_levels<0, then in addition such messages will be sidelined as .HELD files. See the held_sndopr MTA option for discussion of optionally logging (to syslog) when such events occur.
max_mime_parts (integer)
Specify the maximum number of MIME parts which the MTA should process in a MIME message. The default value is 0, meaning no limit is imposed. If max_mime_parts>0, then message parts greater than specified will not be processed. If max_mime_parts<0, then in addition such messages will be sidelined as .HELD files. See the held_sndopr MTA option for discussion of optionally logging (to syslog) when such events occur.
normal_block_limit (integer)
The normal_block_limit option may be used to instruct the MTA to downgrade the priority of messages based on size: messages above the specified size will be downgraded to non-urgent priority. The Job Controller automatically pays attention to message effective processing priority when scheduling delivery attempts. The value is interpreted in terms of MTA blocks, as specified by the block_size MTA option. Note also that the normalblocklimit channel option may be used to impose such downgrade thresholds on a per-channel basis.
non_urgent_block_limit (integer)
The non_urgent_block_limit option may be used to instruct the MTA to downgrade the priority of messages based on size: messages above the specified size will be downgraded to lower than non-urgent priority, meaning that they will not be processed immediately and will wait for processing until the next periodic delivery run. The value is interpreted in terms of MTA blocks, as specified by the block_size MTA option. Note also that the nonurgentblocklimit channel option may be used to impose such downgrade thresholds on a per-channel basis.
urgent_block_limit (integer)
The urgent_block_limit option may be used to instruct the MTA to downgrade the priority of messages based on size: messages above the specified size will be downgraded to normal priority. This priority, in turn, may affect whether the message is processed immediately, or whether it is left to wait for processing until the next periodic delivery run. The value is interpreted in terms of MTA blocks, as specified by the block_size option. Note also that the urgentblocklimit channel keyword may be used to impose such downgrade thresholds on a per-channel basis.

