MIME Content-type: and Content-disposition: header line parameter lengths (nameparameterlengthlimit, parameterlengthlimit)

MIME Content-type: and Content-disposition: header line parameter lengths
A number of popular e-mail clients (mail user agents) have had a history of security problems involving buffer overruns during header line processing, such as during processing of the Content-type: or Content-disposition: header lines. So although RFC 2045 (MIME) does not impose any length constraints on such parameters,  keeping in mind the historical vulnerabilities of many popular e-mail clients, the MTA normally truncates MIME parameters in an attempt to protect any downstream, vulnerable clients. By default, the MTA truncates the Content-type: NAME and Content-disposition: FILENAME parameters at 128 characters each, and other general parameters at 1024 characters. These defaults may be changed by using the  and   channel options, respectively. Each takes an integer argument specifying the desired maximum length to allow for such parameters; (longer parameters will be truncated).

A distinct but related issue to parameter truncation is parameter segmentation, per RFC 2231 rules, which can be controlled in part by the  and related channel options.

See also:
 * parameterformatdefault Option
 * Attachments and MIME processing channel options
 * Channel options