Rejectsmtplonglines, truncatesmtplonglines, wrapsmtplonglines Channel Options

From MsgServerDocWiki

Jump to: navigation, search


SMTP long line handling (rejectsmtplonglines, truncatesmtplonglines, wrapsmtplonglines)

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 truncatesmtplonglines, rejectsmtplonglines, and wrapsmtplonglines control the MTA's behavior when it sees such illegal long lines in incoming SMTP messages. truncatesmtplonglines 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 JES 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 rejectsmtplonglines keyword causes the MTA to reject such illegal messages with a

550 5.6.0 lines longer than SMTP allows encountered; message rejected 

SMTP error, and may be useful when it is desired to enforce strict standards compliance upon message submissions. The wrapsmtplonglines 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, wrapsmtplonglines 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. wrapsmtplonglines is hence only intended for dealing with cases of illegally long lines in the message body.

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 tcp_local or tcp_submit channel. These channel options do not take effect on a channel "switched to" subsequently (due for instance to a switchchannel, tlsswitchchannel, or saslswitchchannnel channel option effect, or a mailSMTPSubmitChannel LDAP attribute effect).

Personal tools