RFC 1870 (rfc1870) - Page 3 of 9
SMTP Service Extension for Message Size Declaration
Alternative Format: Original Text Document
RFC 1870 SMTP Size Declaration November 1995
A client using the unextended SMTP protocol defined in [1], can only
be informed of such failures after transmitting the entire message to
the server (which discards the transferred message). If, however,
both client and server support the Message Size Declaration service
extension, such conditions may be detected before any transfer is
attempted.
An SMTP client wishing to relay a large content may issue the EHLO
command to start an SMTP session, to determine if the server supports
any of several service extensions. If the server responds with code
250 to the EHLO command, and the response includes the EHLO keyword
value SIZE, then the Message Size Declaration extension is supported.
If a numeric parameter follows the SIZE keyword value of the EHLO
response, it indicates the size of the largest message that the
server is willing to accept. Any attempt by a client to transfer a
message which is larger than this limit will be rejected with a
permanent failure (552) reply code.
A server that supports the Message Size Declaration extension will
accept the extended version of the MAIL command described below.
When supported by the server, a client may use the extended MAIL
command (instead of the MAIL command as defined in [1]) to declare an
estimate of the size of a message it wishes to transfer. The server
may then return an appropriate error code if it determines that an
attempt to transfer a message of that size would fail.
5. Definitions
The message size is defined as the number of octets, including CR-LF
pairs, but not the SMTP DATA command's terminating dot or doubled
quoting dots, to be transmitted by the SMTP client after receiving
reply code 354 to the DATA command.
The fixed maximum message size is defined as the message size of the
largest message that a server is ever willing to accept. An attempt
to transfer any message larger than the fixed maximum message size
will always fail. The fixed maximum message size may be an
implementation artifact of the SMTP server, or it may be chosen by
the administrator of the server.
The declared message size is defined as a client's estimate of the
message size for a particular message.
Klensin, et al Standards Track