RFC 4468

Message Submission BURL Extension

๐Ÿ“… published May 2006, from ietf

Message Submission BURL Extension โœจ

okay bestie, the title block first ๐Ÿ“œ this is RFC 4468, published through the Network Working Group and written by C. Newman of Sun Microsystems in May 2006. It's on the Standards Track, so it's an actual official protocol spec, not just a vibe. It updates RFC 3463 ๐Ÿฆ‹


Status of This Memo ๐ŸŽ€

This document specifies an Internet standards track protocol for the Internet community, and it asks for discussion and suggestions for improvements. For the standardization state and status of this protocol, check the current edition of the "Internet Official Protocol Standards" (STD 1). Distribution of this memo is unlimited ๐Ÿ’Œ

Copyright (C) The Internet Society (2006).

Abstract ๐Ÿฆ‹

Okay so the submission profile of Simple Mail Transfer Protocol (SMTP) already gives email clients a standard way to submit a complete message for delivery ๐Ÿ“ฌ This spec levels that up by adding a new BURL command, which can fetch submission data from an Internet Message Access Protocol (IMAP) server. The result is that a mail client can push content from an IMAP server into the SMTP infrastructure without downloading it to the client and uploading it back to the server. It's giving efficiency ๐Ÿ’…

Table of Contents ๐Ÿ“–

   1. Introduction ....................................................2
   2. Conventions Used in This Document ...............................2
   3. BURL Submission Extension .......................................3
      3.1. SMTP Submission Extension Registration .....................3
      3.2. BURL Transaction ...........................................3
      3.3. The BURL IMAP Options ......................................4
      3.4. Examples ...................................................5
      3.5. Formal Syntax ..............................................6
   4. 8-Bit and Binary ................................................7
   5. Updates to RFC 3463 .............................................7
   6. Response Codes ..................................................7
   7. IANA Considerations .............................................9
   8. Security Considerations .........................................9
   9. References .....................................................11
      9.1. Normative References ......................................11
      9.2. Informative References ....................................12
   Appendix A.  Acknowledgements .....................................13

1. Introduction ๐Ÿงš

This spec extends the standard Message Submission [RFC4409] protocol so data can be fetched from an IMAP server at message submission time ๐Ÿ’– This MAY be used together with the CHUNKING [RFC3030] mechanism, so chunks of the message can come from an external IMAP server. The payoff is that you can forward an email message without downloading it to the client first. Main character energy ๐Ÿ‘‘

2. Conventions Used in This Document ๐Ÿ“š

Whenever the key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", and "MAY" show up in this document, they're meant to be interpreted as defined in "Key words for use in RFCs to Indicate Requirement Levels" [RFC2119]. Read them carefully, bestie ๐Ÿซถ

The formal syntax uses the Augmented Backus-Naur Form (ABNF) [RFC4234] notation, including the core rules defined in Appendix B of RFC 4234 โœจ

3. BURL Submission Extension ๐Ÿ’Œ

This section defines the BURL submission extension ๐ŸŽ€

3.1. SMTP Submission Extension Registration ๐ŸŒˆ

  1. The name of this submission extension is "BURL". This extends the Message Submission protocol on port 587, and it MUST NOT be advertised by a regular SMTP [RFC2821] server on port 25 that acts as a relay for incoming mail from other SMTP relays. Not on the relay, no cap ๐Ÿ™…โ€โ™€๏ธ
  2. The EHLO keyword value associated with the extension is BURL.
  3. The BURL EHLO keyword will have zero or more arguments. The only argument defined at this time is the "imap" argument, which MUST be present in order to use IMAP URLs with BURL. Clients MUST ignore other arguments after the BURL EHLO keyword unless they are defined by a subsequent IETF standards track specification. The arguments that appear after the BURL EHLO keyword may change after SMTP AUTH [RFC2554] is used, so a server that advertises BURL with no arguments prior to authentication is saying that BURL is supported but authentication is required to use it ๐Ÿ”
  4. This extension adds the BURL SMTP verb. The verb is used as a replacement for the DATA command, and it's only permitted during a mail transaction after at least one successful RCPT TO ๐Ÿ’…

3.2. BURL Transaction ๐Ÿฆ‹

A simple BURL transaction consists of MAIL FROM, one or more RCPT TO headers, and a BURL command with the "LAST" tag. The BURL command includes an IMAP URL pointing to a fully formed message that's ready for injection into the SMTP infrastructure. If PIPELINING [RFC2920] is advertised, the client MAY send the entire transaction in one round trip. If no valid RCPT TO address is supplied, the BURL command simply fails, and no resolution of the BURL URL argument is performed. If at least one valid RCPT TO address is supplied, the BURL URL argument gets resolved before the server responds to the command ๐Ÿ“

A more sophisticated BURL transaction MAY occur when the server also advertises CHUNKING [RFC3030]. In this case, the BURL and BDAT commands may be interleaved until one of them terminates the transaction with the "LAST" argument. If PIPELINING [RFC2920] is also advertised, the client may pipeline the entire transaction in one round trip. However, it MUST wait for the results of the "LAST" BDAT or BURL command before starting a new transaction. Patience is a virtue ๐Ÿงš

The BURL command directs the server to fetch the data object that the URL refers to and include it in the message. If the URL fetch fails, the server fails the entire transaction ๐Ÿ’€

3.3. The BURL IMAP Options ๐ŸŒธ

When "imap" is present in the space-separated list of arguments following the BURL EHLO keyword, it means the BURL command supports the URLAUTH [RFC4467] extended form of IMAP URLs [RFC2192], and the submit server is configured with the necessary credentials to resolve "urlauth=submit+" IMAP URLs for the submit server's domain ๐Ÿ”‘

Subsequent to a successful SMTP AUTH command, the submission server MAY indicate a prearranged trust relationship with a specific IMAP server by including a BURL EHLO keyword argument of the form "imap://imap.example.com". In this case, the submission server permits a regular IMAP URL that refers to messages or parts of messages on imap.example.com, as long as the user who authenticated to the submit server can access them. Note that this form does not imply that the submit server supports URLAUTH URLs. The submit server must advertise both "imap" and "imap://imap.example.com" to indicate support for both extended and non-extended URL forms โญ

When the submit server connects to the IMAP server, it acts as an IMAP client, so it's subject to both the mandatory-to-implement IMAP capabilities in Section 6.1.1 of RFC 3501 and the security considerations in Section 11 of RFC 3501. Specifically, this requires that the submit server implement a configuration that uses STARTTLS followed by SASL PLAIN [SASL-PLAIN] to authenticate to the IMAP server. Security is not a vibe you skip ๐Ÿ”ฅ

When the submit server resolves a URLAUTH IMAP URL, it uses submit server credentials when authenticating to the IMAP server. The authentication identity and password used for submit credentials MUST be configurable. The string "submit" is suggested as a default value for the authentication identity, with no default for the password. Typically the authorization identity is empty in this case, so the IMAP server derives the authorization identity from the authentication identity. If the IMAP URL uses the "submit+" access identifier prefix, the submit server MUST refuse the BURL command unless the userid in the URL's <access> token matches the submit client's authorization identity ๐Ÿ™ˆ

When the submit server resolves a regular IMAP URL, it uses the submit client's authorization identity when authenticating to the IMAP server. If both the submit client and the submit server's embedded IMAP client use SASL PLAIN (or the equivalent), the submit server SHOULD forward the client's credentials if and only if the submit server knows that the IMAP server is in the same administrative domain. If the submit server supports SASL mechanisms other than PLAIN, it MUST implement a configuration in which the submit server's embedded IMAP client uses STARTTLS and SASL PLAIN with the submit server's authentication identity and password (for the respective IMAP server) and the submit client's authorization identity. Okay that's a lot, but it's all iconic ๐Ÿ‘‘

3.5. Formal Syntax ๐Ÿงฉ

Okay so here's the grammar, bestie ๐ŸŽ€ It builds on ABNF [RFC4234] and Uniform Resource Identifiers [RFC3986], and it's giving precision โœจ

      burl-param  = "imap" / ("imap://" authority)
                  ; parameter to BURL EHLO keyword

      burl-cmd    = "BURL" SP absolute-URI [SP end-marker] CRLF

      end-marker  = "LAST"

4. 8-Bit and Binary โœจ

Okay, the big rule here: if your submit server is flexing BURL, it MUST also advertise 8BITMIME [RFC1652] ๐Ÿ’… It also has to do the down conversion from that spec on the complete message when 8-bit data shows up with the BURL command and gets passed to a 7-bit server. If the URL argument to BURL points at binary data, the submit server MAY refuse the command or down convert it the way Binary SMTP [RFC3030] describes ๐Ÿง 

The Submit server MAY refuse to accept a BURL command, or a combo of BURL and BDAT commands, that ends up with un-encoded 8-bit data in mail or MIME [RFC2045] headers. Or, if it's feeling generous, the server MAY accept that data and down convert it to MIME header encoding [RFC2047] ๐Ÿซถ

5. Updates to RFC 3463 ๐Ÿ’Œ

SMTP or Submit servers that advertise ENHANCEDSTATUSCODES [RFC2034] use the enhanced status codes from RFC 3463 [RFC3463] ๐Ÿ“ฎ BURL introduces new error cases that RFC didn't think about, so this spec adds a few more enhanced status codes:

X.6.6 Message content not available

The message content couldn't be fetched from a remote system. This might be useful as a permanent or persistent temporary notification ๐ŸŒธ

X.7.8 Trust relationship required

The submission server needs a configured trust relationship with a third-party server before it can access the message content ๐Ÿ”‘

6. Response Codes ๐Ÿšฆ

This section has example response codes for the BURL command. You can use other text with the same codes. This list isn't exhaustive, and BURL clients MUST tolerate any valid SMTP response code ๐Ÿซ  Most of these examples come with the right enhanced status code [RFC3463].

554 5.5.0 No recipients have been specified

Shows up when BURL is used (like with PIPELINING) and every RCPT TO failed ๐Ÿ’€

503 5.5.0 Valid RCPT TO required before BURL

This one's the alternative to the one above. It shows up when BURL is used (like with PIPELINING) and every RCPT TO failed ๐Ÿ™ˆ

554 5.6.3 Conversion required but not supported

This happens when the URL points to binary data and the implementation can't down convert to base64. It can also happen if the URL points to message data with 8-bit content in headers and the server doesn't down convert that content โœจ

554 5.3.4 Message too big for system

The message (after URL resolution) is bigger than this server's per-message size limit ๐Ÿ“ฆ

554 5.7.8 URL resolution requires trust relationship

The submit server doesn't have a trust relationship with the IMAP server named in the URL argument to BURL ๐Ÿ”

552 5.2.2 Mailbox full

The recipient is local, the submit server supports direct delivery, and the recipient has gone over their quota, grace period for delivery attempts included ๐Ÿ“ฌ

554 5.6.6 IMAP URL resolution failed

The IMAP URLFETCH command returned an error or no data ๐Ÿ˜ญ

250 2.5.0 Waiting for additional BURL or BDAT commands

A BURL command without the "LAST" modifier got sent. The URL for this BURL command was resolved successfully, but the content won't necessarily be committed to persistent storage until the rest of the message content comes in. For example, a Unix server might have written the content into a queue file buffer without having run fsync() yet.

If the server loses power in that window, the content can still be lost โšก

451 4.4.1 IMAP server unavailable

The connection to the IMAP server for resolving the URL failed ๐Ÿฅ€

250 2.5.0 Ok.

The URL was resolved successfully, and the complete message data has been committed to persistent storage ๐ŸŽ‰

250 2.6.4 MIME header conversion with loss performed

The URL pointed to message data with 8-bit data in mail or MIME headers. That data got converted to MIME header encoding [RFC2047], but the submit server might not have guessed the unlabeled character set correctly ๐Ÿคญ

7. IANA Considerations ๐Ÿ—‚๏ธ

The "BURL" SMTP extension, as described in Section 3, has been registered. That registration is marked for use by message submission [RFC4409] only in the registry ๐Ÿ’–

8. Security Considerations ๐Ÿšจ

Okay this section is SERIOUS bestie ๐Ÿ˜ญ Modern SMTP submission servers often have content-based security and denial-of-service defenses like virus filtering, size limits, server-generated signatures, spam filtering, etc. Implementations of BURL should fetch the URL content before those content-based mechanisms get applied, so they can keep doing their job ๐Ÿ›ก๏ธ

Clients that send unsolicited bulk email or email with viruses could use this mechanism to make up for a slow link between the client and submit server. Like, this would make it totally doable for a programmable cell phone or other device on a slow link to become a major source of unsolicited bulk email and/or viruses ๐Ÿ“ฑ๐Ÿ’€ So it matters even more that submit server vendors implementing BURL have auditing and/or defenses against these denial-of-service attacks. That includes mandatory authentication, logging that ties unique client identifiers to mail transactions, limits on reuse of the same IMAP URL, rate limits, recipient count limits, and content filters ๐Ÿ”ฅ

Sending the URLAUTH [RFC4467] form of IMAP URLs in the clear can expose the authorization token to network eavesdroppers ๐Ÿ‘€ Implementations that support these URLs can fix this by using a strong confidentiality protection mechanism. For example, the SMTP STARTTLS [RFC3207] and IMAP STARTTLS [RFC3501] extensions, combined with a configuration setting that requires their use with these IMAP URLs, would address the concern ๐Ÿ”’

Using a prearranged trust relationship between a submit server and a specific IMAP server brings its own security considerations. A compromise of the submit server should not automatically compromise every account on the IMAP server, so trust relationships involving super-user proxy credentials are strongly discouraged ๐Ÿ™…โ€โ™€๏ธ A system that makes the submit server authenticate to the IMAP server with submit credentials, and then requires a URLAUTH URL to fetch any content, addresses this concern. A trusted third party model for proxy credentials, like the one Kerberos 5 [RFC4120] provides, would also do the job ๐Ÿงš

When a client uses SMTP STARTTLS to send a BURL command that references non-public information, users expect the entire message content to be treated confidentially ๐Ÿซฃ To meet that expectation, the message submission server SHOULD use STARTTLS or a mechanism providing equivalent data confidentiality when it fetches the content referenced by that URL ๐Ÿ’œ

A legit user of a submit server might try to compromise other accounts on the server by giving an IMAP URLAUTH URL that points to a server under their control, one designed to undermine the security of the submit server ๐Ÿ˜ˆ So the IMAP client code the submit server uses must be robust with respect to arbitrary input sizes (including large IMAP literals) and arbitrary delays from the IMAP server. Requiring a prearranged trust relationship between a submit server and the IMAP server also handles this concern ๐Ÿฐ

An authorized user of the submit server could set up a fraudulent IMAP server and pass its URL to the submit server. The submit server might then contact that fraudulent IMAP server to authenticate with submit credentials and fetch content. There are several ways to reduce this risk. A submit server that only uses submit credentials with a fixed set of trusted IMAP servers won't expose those credentials. A submit server can also treat the IMAP server as untrusted and include defenses for buffer overflows, denial-of-service slowdowns, and other potential attacks. Finally, because authentication is required to use BURL, it's possible to keep a secure audit trail and use it to detect and punish the offending party ๐Ÿ‘‘

9. References ๐Ÿ“š

9.1. Normative References

   [RFC1652]     Klensin, J., Freed, N., Rose, M., Stefferud, E., and D.
                 Crocker, "SMTP Service Extension for
                 8bit-MIMEtransport", RFC 1652, July 1994.

   [RFC2119]     Bradner, S., "Key words for use in RFCs to Indicate
                 Requirement Levels", BCP 14, RFC 2119, March 1997.

   [RFC2192]     Newman, C., "IMAP URL Scheme", RFC 2192,
                 September 1997.

   [RFC2554]     Myers, J., "SMTP Service Extension for Authentication",
                 RFC 2554, March 1999.

   [RFC2821]     Klensin, J., "Simple Mail Transfer Protocol", RFC 2821,
                 April 2001.

   [RFC3207]     Hoffman, P., "SMTP Service Extension for Secure SMTP
                 over Transport Layer Security", RFC 3207,
                 February 2002.

   [RFC3501]     Crispin, M., "INTERNET MESSAGE ACCESS PROTOCOL -
                 VERSION 4rev1", RFC 3501, March 2003.

   [RFC3986]     Berners-Lee, T., Fielding, R., and L. Masinter,
                 "Uniform Resource Identifier (URI): Generic Syntax",
                 STD 66, RFC 3986, January 2005.

   [RFC4234]     Crocker, D. and P. Overell, "Augmented BNF for Syntax
                 Specifications: ABNF", RFC 4234, October 2005.

   [RFC4409]     Gellens, R. and J. Klensin, "Message Submission for
                 Mail", RFC 4409, April 2006.

   [RFC4467]     Crispin, M., "Internet Message Access Protocol (IMAP) -
                 URLAUTH Extension", RFC 4467, May 2006.

9.2. Informative References

   [RFC2034]     Freed, N., "SMTP Service Extension for Returning
                 Enhanced Error Codes", RFC 2034, October 1996.

   [RFC2045]     Freed, N. and N. Borenstein, "Multipurpose Internet
                 Mail Extensions (MIME) Part One: Format of Internet
                 Message Bodies", RFC 2045, November 1996.

   [RFC2047]     Moore, K., "MIME (Multipurpose Internet Mail
                 Extensions) Part Three: Message Header Extensions for
                 Non-ASCII Text", RFC 2047, November 1996.

   [RFC2920]     Freed, N., "SMTP Service Extension for Command
                 Pipelining", STD 60, RFC 2920, September 2000.

   [RFC3030]     Vaudreuil, G., "SMTP Service Extensions for
                 Transmission of Large and Binary MIME Messages",
                 RFC 3030, December 2000.

   [RFC3463]     Vaudreuil, G., "Enhanced Mail System Status Codes",
                 RFC 3463, January 2003.

   [RFC4120]     Neuman, C., Yu, T., Hartman, S., and K. Raeburn, "The
                 Kerberos Network Authentication Service (V5)", RFC
                 4120, July 2005.

   [SASL-PLAIN]  Zeilenga, K., "The Plain SASL Mechanism", Work in
                 Progress, March 2005.

Appendix A. Acknowledgements โœจ

okay bestie, big thank-you train ๐Ÿš‚๐Ÿ’– this whole doc came out of the lemonade WG, and every single person in that group chat gets love for their input ๐Ÿซถ. Mark Crispin was the one who basically dreamed up this mechanism in the first place, so he's a whole legend ๐Ÿ‘‘. Huge shoutout to Randall Gellens, Alexey Melnikov, Sam Hartman, Ned Freed, Dave Cridland, Peter Coates, and Mark Crispin again for reviewing the document ๐Ÿ”. The RFC Editor also gets a thank-you for fixing the author's grammar mistakes ๐Ÿ’…๐Ÿ˜ญ. Then there's Ted Hardie, Randall Gellens, Mark Crispin, Pete Resnick, and Greg Vaudreuil, who had extremely intense debates comparing this proposal to the alternatives ๐Ÿ”ฅ๐Ÿง . And finally the lemonade WG chairs, Eric Burger and Glenn Parsons, who knew when to end the debate and kept the doc moving until it was finished ๐Ÿ‹๐ŸŽ€


Author's Address

This is where to find the author:

Chris Newman
Sun Microsystems
3401 Centrelake Dr., Suite 410
Ontario, CA  91761
US

EMail: chris.newman@sun.com

Copyright (C) The Internet Society (2006). ๐ŸŒธ

This document is subject to the rights, licenses and restrictions in BCP 78. Except for what's set out there, the authors keep all their rights ๐Ÿ“œ๐Ÿฆ‹

The document and the info in it are provided "AS IS". The contributor, the organization they represent or sponsor (if any), the Internet Society, and the Internet Engineering Task Force all turn down any and every warranty ๐Ÿ™…โ€โ™€๏ธ. That covers EXPRESS OR IMPLIED warranties too, including any promise that using the info won't infringe anyone's rights, and any implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE ๐Ÿ’€


Intellectual Property

The IETF doesn't take a side on whether any intellectual property rights or other rights people claim over the tech in this document are valid or how far they reach. It also doesn't say whether any license for those rights is available. And it hasn't independently checked for any such rights either ๐Ÿ•ต๏ธโ€โ™€๏ธ For how rights work with RFC docs, check out BCP 78 and BCP 79 ๐Ÿ“šโœจ

Copies of IPR disclosures sent to the IETF Secretariat are in the online IPR repository at http://www.ietf.org/ipr. You can also find any assurances of licenses that were offered there, along with the result of any attempt to get a general license or permission for implementers or users to use those proprietary rights ๐Ÿ”—๐Ÿ’œ

The IETF also invites anyone to flag any copyrights, patents, patent applications, or other proprietary rights that might cover tech needed to implement this standard ๐Ÿ™‹โ€โ™€๏ธ. Send that info to the IETF at ietf-ipr@ietf.org ๐Ÿ“ฌ


Acknowledgement

Funding for the RFC Editor function comes from the IETF Administrative Support Activity (IASA) ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from