Rejectsmtplonglines, truncatesmtplonglines, wrapsmtplonglines Channel Options

SMTP long line handling
The SMTP protocol is a line oriented protocol, and in particular, SMTP transmissions are limited to a maximum of 1000 characters including the carriage-return CR and line-feed LF characters, or 998 characters not including the CRLF sequence; (though see RFC 3030 for a proposed extension of the SMTP protocol that relaxes this definition). Nevertheless, there are some clients (typically arising in HTML applications) that try to send illegally long lines over SMTP.

The channel options,  , and   control the MTA&#x27;s behavior when it sees such illegal long lines in incoming SMTP messages. is the default, and causes the MTA to truncate illegally long SMTP lines to the legal length limit; the MTA also in MS 6.0 inserts a header line Sun-ONE-SMTP-Warning: Lines longer than SMTP allows found and truncated. or in MS 6.1 or later, a header line Sun-Java-System-SMTP-Warning: Lines longer than SMTP allows found and truncated. when it sees such long lines. The  option normally causes the MTA to reject such illegal messages with a  550 5.6.0 lines longer than SMTP allows encountered; message rejected SMTP error (but see the  channel option which postpones the error generation),  and may be useful when it is desired to enforce strict standards compliance upon message submissions. The  keyword causes the MTA to forcibly wrap (insert hard line breaks) into illegally long incoming lines, and insert a header line of (in MS 6.0) Sun-One-SMTP-Warning: Lines longer than SMTP allows found and wrapped. or in MS 6.1 or later Sun-Java-System-SMTP-Warning: Lines longer than SMTP allows found and wrapped. The MTA will attempt to find a space or TAB character in the line as a suitable place at which to perform the line break. In the absence of such a white space character, the MTA may have to add the hard line break at a less suitable location, changing the character of the data; in particular,  when applying to a header line (to an illegally long line in a message header) may damage the message header since the forced line break may (in the absence of white space characters) cause a syntactically illegal line. is hence only intended for dealing with cases of illegally long lines in the message body. Furthermore, some charsets (e.g., ISO-2022-JP) have encoding requirements that are triggered at line wraps, so that forcible line wrapping can interact badly with such charsets; or even when a message body is in a charset that has no line wrap/encoding issues, the message content itself may be "damaged" by line wrapping. is thus only a partial workaround to cases of illegally long data in SMTP transmitted messages; it makes an attempt to more-or-less preserve message contents, but some damage is not unexpected.

Note that these channel options must be placed on the initial (default) incoming TCP/IP channel  in order to take effect, that is, the SMTP server default channel; for instance, these options would typically be used on a   or   channel. These channel options do not take effect on a channel "switched to" subsequently (due for instance to a ,  , or    channel option effect, or a   LDAP attribute effect).

See also:
 * acceptalladdresses Option
 * switchchannel Option
 * tlsswitchchannel Option
 * saslswitchchannel Option
 * TCPIP channels
 * SMTP and LMTP protocol channel options
 * Channel options