rfc-1427

SMTP Service Extension for Message Size Declaration

J. Klensin, N. Freed (Editor), K. Moore
date1993-02 streamIETF areaapp wgsmtpext statusPROPOSED STANDARD pages8 canonicalhttps://www.rfc-editor.org/rfc/rfc1427 doi10.17487/RFC1427
This memo defines an extension to the SMTP service whereby an SMTP client and server may interact to give the server an opportunity to decline to accept a message (perhaps temporarily) based on the client's estimate of the message size. [STANDARDS-TRACK]

obsoleted by

Extracted elements (19)

design-rationale §6

The declared message size may be a heuristic estimate rather than an exact count because exact computation may be infeasible. Such heuristics should be chosen so that the declared size is usually larger than the actual size, making whether SMTP DATA dots are counted largely academic.

email

design-rationale §2

The MIME extensions to Internet mail enable transmission of many new data types, causing SMTP to carry a much wider range of message sizes than previously. This creates resource pressure (e.g., disk space) on SMTP servers, motivating the need for a pre-transfer size negotiation mechanism.

email

interoperability-note §7

A minimal client may use the extension solely to compare its estimated message size against the server's advertised fixed maximum (from the EHLO SIZE parameter), without issuing the extended MAIL command, thereby avoiding temporary-limit and per-recipient-limit detection.

email

interoperability-note §6.1

A server is permitted but not required to accept a message actually larger than the size declared in the extended MAIL command, such as when a client's size-estimation heuristic underestimates. A client declaring a smaller-than-actual size receives no assurance of acceptance.

email

normative-requirement §7 MUST

A minimal server advertising the SIZE extension must accept the extended MAIL command and return a 552 reply code if the client's declared size exceeds the server's fixed size limit.

email

normative-requirement §7 SHOULD

A server that advertises SIZE with no numeric parameter may not issue a 250 response to an extended MAIL command with a SIZE specification without first checking whether sufficient resources are available to transfer and retain the message; if possible, it should actually reserve the storage space.

email

normative-requirement §6.2 MUST

A successful 250 reply to the extended MAIL command does not guarantee successful transfer. SMTP clients using the extended MAIL command must still be prepared to handle temporary and permanent error replies (including 452 and 552) after issuing DATA or after message transfer.

email

normative-requirement §6.1 SHOULD

If the indicated size exceeds the server's fixed maximum message size, the server should respond with code 552 ('message size exceeds fixed maximum message size'); a server is also permitted to accept a message actually larger than declared.

email

normative-requirement §6.1 SHOULD

If the server currently lacks sufficient resources to accept a message of the indicated size but may be able to do so later, it should respond to the extended MAIL command with code 452 ('insufficient system storage').

email

normative-requirement §6.3 SHOULD NOT

Once a server has agreed to accept a message of a declared size, it should not return a 552 reply after the DATA transfer phase unless the actual size transferred is greater than the declared message size.

email

normative-requirement §6 MUST NOT

Servers MUST NOT use the SIZE parameter to determine end of content in the DATA command; size declaration is advisory only and does not alter DATA stream framing.

email

normative-requirement §6.2 SHOULD

Upon receiving a 452 response, the client should send RSET or QUIT and retry the message to the same server at a later time. Upon receiving 552, the client should send RSET or QUIT, declare the message undeliverable, and notify the sender.

email

protocol-element §6.4

A server may return 452 or 552 in response to a RCPT command based on unwillingness to accept the declared message size for a particular recipient. A 452 permits the client to requeue for later delivery; a 552 prohibits requeuing to the same recipient.

email

protocol-element §5

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 after receiving reply code 354 to the DATA command.

email

protocol-element §5

The declared message size is the client's estimate of the message size for a particular message, supplied in the SIZE parameter of the extended MAIL FROM command.

email

protocol-element §3

The EHLO keyword for this extension is 'SIZE'. An optional decimal parameter indicates the server's fixed maximum message size in bytes; a value of 0 means no fixed maximum is in force; omission conveys no information about the server's limit.

email

protocol-element §3

The extended MAIL FROM command accepts an optional 'SIZE' parameter whose value is a decimal number representing the client's estimate of the message size in octets, including headers, body, and CR-LF pairs between lines, but excluding the DATA command's terminating dot or doubled quoting dots.

email

protocol-element §5

The fixed maximum message size is the size of the largest message a server will ever accept; any attempt to transfer a larger message will always fail. It may be an implementation artifact or administrator-configured limit.

email

security-consideration §9

The SIZE extension can facilitate crude service denial attacks: the SIZE parameter and extended MAIL command make it somewhat quicker and easier to craft an effective denial-of-service attempt. However, unless implementations are very weak, no new vulnerability is introduced that did not already exist in SMTP.

security, email