RFC 1427
SMTP Service Extension for Message Size Declaration
RFC 1427: SMTP Service Extension for Message Size Declaration ๐
(part 1 of 2)
Okay bestie, here's the title block tea ๐ซ This is RFC 1427, from the Network Working Group.
- Authors: J. Klensin (WG Chair, United Nations University), N. Freed (Editor, Innosoft International, Inc.), and K. Moore (University of Tennessee) ๐ฉโ๐ป
- Category: an IAB standards track protocol ๐ฆ
- Date: February 1993 ๐
- Obsoletes / Updates: this header doesn't list anything it obsoletes or updates ๐คทโโ๏ธ
Status of this Memo โจ
This RFC specifies an IAB standards track protocol for the Internet community and asks for discussion and suggestions for improvements. For the standardization state and status of this protocol, check the current edition of the "IAB Official Protocol Standards." Distribution of this memo is unlimited. ๐ธ
1. Abstract โจ
Okay so this memo defines an extension to the SMTP service ๐. An SMTP client and server may interact so the server gets a chance to say "hmm, not taking that one" (maybe just for now ๐). That decision is based on the client's estimate of how big the message is ๐.
2. Introduction ๐
MIME is the reason mail can now carry all kinds of stuff that used to be a no-go on Internet mail ๐. One expected result is that SMTP will be expected to carry a much wider range of message sizes than it did before ๐ฆ. That has an impact on how much resources (e.g., disk space) a system needs when it's acting as a server ๐พ.
This memo uses the mechanism from [5] to make extensions to SMTP where a client ("sender-SMTP") may declare the size of a message to a server ("receiver-SMTP"). Then the server can tell the client whether or not it's willing to accept the message based on that declared size ๐. The server can also declare the maximum message size it's willing to accept to a client ("sender-SMTP") ๐.
3. Framework for the Size Declaration Extension ๐ง
The following service extension is therefore defined ๐ :
(1) the name of the SMTP service extension is "Message Size Declaration";
(2) the EHLO keyword value associated with this extension is "SIZE";
(3) one optional parameter is allowed with this EHLO keyword value. It's a decimal number indicating the fixed maximum message size in bytes that the server will accept. The syntax of the parameter is below, using the augmented BNF notation of [2]:
size-param ::= [1*DIGIT]
A parameter value of 0 (zero) indicates that no fixed maximum message size is in force. If the parameter is omitted, no information is conveyed about the server's fixed maximum message size ๐ค;
(4) one optional parameter using the keyword "SIZE" is added to the MAIL FROM command. The value for this parameter is a decimal number indicating the size of the message that is to be transmitted. The syntax of the value is below, using the augmented BNF notation of [2]:
size-value ::= 1*DIGIT
(5) no additional SMTP verbs are defined by this extension.
The remainder of this memo specifies how support for the extension affects the behavior of an SMTP client and server ๐.
4. The Message Size Declaration service extension ๐
An SMTP server may have a fixed upper limit on message size ๐ง. Any attempt by a client to transfer a message larger than this fixed upper limit will fail ๐. On top of that, a server normally has limited space to store incoming messages, so a transfer may also fail because there's not enough storage space. The good news is that it might succeed at a later time โฐ.
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 then discards the transferred message) ๐ญ. If both client and server support the Message Size Declaration service extension, though, such conditions may be detected before any transfer is attempted ๐ซถ.
An SMTP client that wants to relay a large content may issue the EHLO command to start an SMTP session and find out whether 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 in the EHLO response, it indicates the size of the largest message the server is willing to accept ๐ฆ. Any attempt by a client to transfer a message 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 the server supports it, 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 wants to transfer ๐จ. The server may then return an appropriate error code if it figures out 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. It does not include the SMTP DATA command's terminating dot or doubled quoting dots. It's the amount the SMTP client will transmit 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 ๐ฎ.
Okay, that's the first half, bestie ๐ซถ Part 2 picks up with Section 6, The extended MAIL command, along with its subsections 6.1 through 6.4, so stay tuned ๐๐
7. Minimal usage โจ
Okay bestie, so a "minimal" client MAY use this extension to just compare its (perhaps estimated) size of the message it wants to relay with the server's fixed maximum message size. That number comes from the parameter to the SIZE keyword in the EHLO response, and the comparison tells the client whether the server will ever accept the message. ๐
Such an implementation need not declare message sizes via the extended MAIL command. ngl though, it won't be able to find out about temporary limits on message size due to server resource limitations, or about per-recipient limitations on message size. ๐ฅบ
A minimal server running this service extension MAY simply use the SIZE keyword value to tell the client the size of the largest message it will accept, or to say there's no fixed limit on message size. โจ Such a server MUST accept the extended MAIL command and return a 552 reply code if the client's declared size is bigger than its fixed size limit (if it has one). It doesn't have to detect "temporary" limitations on message size, though, so it need not do that. ๐ซถ
The numeric parameter to the EHLO SIZE keyword is OPTIONAL. If the parameter is left off entirely, it means the server doesn't advertise a fixed maximum message size. ๐ธ A server that returns the SIZE keyword with no parameter in response to EHLO may not issue a positive (250) response to an extended MAIL command containing a SIZE specification. It has to check first whether sufficient resources are available to transfer a message of the declared size and to keep it in stable storage until it can be relayed or delivered to its recipients. If possible, the server SHOULD actually reserve enough storage space to transfer the message. ๐ง
8. Example ๐
Here's a look at size declaration in action, with some permanent and temporary failures mixed in. ๐ฆ
S: <wait for connection on TCP port 25>
C: <open connection to server>
S: 220 sigurd.innosoft.com -- Server SMTP (PMDF V4.2-6 #1992)
C: EHLO ymir.claremont.edu
S: 250-sigurd.innosoft.com
S: 250-EXPN
S: 250-HELP
S: 250 SIZE 1000000
C: MAIL FROM:<ned@thor.innosoft.com> SIZE=500000
S: 250 Address Ok.
C: RCPT TO:<ned@innosoft.com>
S: 250 ned@innosoft.com OK; can accomodate 500000 byte message
C: RCPT TO:<ned@ymir.claremont.edu>
S: 552 channel size limit exceeded: ned@YMIR.CLAREMONT.EDU
C: RCPT TO:<ned@hmcvax.claremont.edu>
S: 452 insufficient channel storage: ned@hmcvax.CLAREMONT.EDU
C: DATA
S: 354 Send message, ending in CRLF.CRLF.
...
C: .
S: 250 Some recipients OK
C: QUIT
S: 250 Goodbye
9. Security considerations ๐
โ ๏ธ Serious talk, bestie. Please don't skip this part! ๐
The size declaration extensions described in this memo can conceivably be used to facilitate crude service denial attacks. Specifically, both the information contained in the SIZE parameter and use of the extended MAIL command make it somewhat quicker and easier to devise an efficacious service denial attack. However, unless implementations are very weak, these extensions do not create any vulnerability that has not always existed with SMTP. In addition, no issues are addressed involving trusted systems and possible release of information via the mechanisms described in this RFC.
10. Acknowledgements ๐ซถ
This document was derived from an earlier Working Group draft contribution. Huge thanks to Jim Conklin, Dave Crocker, Neil Katin, Eliot Lear, Marshall T. Rose, and Einar Stefferud, who provided extensive comments in response to earlier drafts of both this and the previous memo. ๐
11. References ๐
[1] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821, USC/Information Sciences Institute, August 1982.
[2] Crocker, D., "Standard for the Format of ARPA Internet Text Messages", STD 11, RFC 822, UDEL, August 1982.
[3] Borenstein, N., and N. Freed, "Multipurpose Internet Mail Extensions", RFC 1341, Bellcore, Innosoft, June 1992.
[4] Moore, K., "Representation of Non-ASCII Text in Internet Message Headers", RFC 1342, University of Tennessee, June 1992.
[5] Klensin, J., WG Chair, Freed, N., Editor, Rose, M., Stefferud, E., and D. Crocker, "SMTP Service Extensions" RFC 1425, United Nations University, Innosoft International, Inc., Dover Beach Consulting, Inc., Network Management Associates, Inc., The Branch Office, February 1993.
[6] Partridge, C., "Mail Routing and the Domain System", RFC 974, BBN, January 1986.
12. Chair, Editor, and Author's Addresses ๐
John Klensin, WG Chair
John Klensin, WG Chair
United Nations University
PO Box 500, Charles Street Station
Boston, MA 02114-0500 USA
Phone: +1 617 227 8747
Fax: +1 617 491 6266
Email: klensin@infoods.unu.edu
Ned Freed, Editor
Ned Freed, Editor
Innosoft International, Inc.
250 West First Street, Suite 240
Claremont, CA 91711 USA
Phone: +1 909 624 7907
Fax: +1 909 621 5319
Email: ned@innosoft.com
Keith Moore
Keith Moore
Computer Science Dept.
University of Tennessee
107 Ayres Hall
Knoxville, TN 37996-1301 USA
Email: moore@cs.utk.edu
๐ฆ where this page comes from
- ietf: rfc1427 1993-02
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms