Internet-Draft Linked Attachments November 2026
Gondwana & Melnikov Expires 23 May 2027 [Page]
Workgroup:
Network Working Group
Internet-Draft:
draft-gondwana-email-big-files-01
Published:
Intended Status:
Standards Track
Expires:
Authors:
B. Gondwana
Fastmail
A. Melnikov
Isode Limited

Linked Attachments in Email Messages

Abstract

Message size limits mean that large files are sent by email as links to a web server rather than as attachments. A link loses the properties that make an attachment useful: it can stop working, the file behind it can change, it can't be scanned in transit, and it may need a separate login.

This document defines the "Content-External" header field, which lets receiving systems fetch, verify and keep a linked file, and then treat it like any other attachment. The field is on a body part with a fallback link, which aware clients hide.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 23 May 2027.

▲

Table of Contents

1. Introduction

Most SMTP systems limit the size of messages that can be sent, which can be as low as 10 megabytes. Moreover, limits vary depending on the recipient's system. End users want to send files to each other, and the files they create keep getting bigger.

The usual workaround is to upload the file to a web server and send a link. Many clients and services do this, each in their own way.

An attached file has properties that a link lacks:

  1. A copy lasts as long as the message.

  2. It can't be changed after sending.

  3. Systems that handle the message can scan it.

  4. Anyone who has the message has the file.

A link can stop working, the file behind it can change, it can't be scanned in transit, and it may need a separate login.

This document defines the "Content-External" header field (Section 3), which gives the URL, size and digest of a file and, if the file is encrypted, its key. Receiving servers fetch, verify and scan the file when the message arrives (Section 6), and keep it as long as the message (Section 6.4), which restores those properties. The field is on a body part with an ordinary link to the file, which clients that support this document hide (Section 4).

This document replaces [BIG-FILES-00]; see Appendix "Changes from draft-melnikov-email-big-files-00".

2. Conventions and Definitions

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.

This document uses the terms MUA, MDA and message store from [MAIL-ARCH], and:

sender:

The sending MUA, or a service acting for it.

linked attachment:

A file described by a Content-External header field.

attachment server:

The HTTP [HTTP] server that holds a linked attachment.

receiving server:

Any system on the recipient's side that inspects message content, such as an MDA, a content filter or a message store.

4. Fallback Body Part

The body part with a Content-External header field contains a link from which the file can be downloaded with a web browser, with its file name and size. It SHOULD be text/html [HTML], with "Content-Disposition: inline", where an attached file would go. A sender that knows every recipient's MUA supports this document, for example because they all use the same service, MAY leave the body part empty.

The download link is usually not the "URL" parameter, which gives the stored, possibly encrypted, data. So that the attachment server can decrypt the file, the download link SHOULD include the key in the format of Section 3.2, for example as a query parameter. The attachment server chooses the rest of the URL. See Section 9.

In a text/html body part, the link SHOULD be inside a "div" element with class "content-external", so that an MUA that shows several body parts as one can hide it.

MUAs that support this document SHOULD hide body parts with a Content-External header field, and show the linked attachment instead. They MUST NOT hide one unless they offer the user a way to download the file. The file can be fetched and verified (Section 6.1) on arrival or when the user opens it.

The example uses the line wrapping of [WRAP]:

=============== NOTE: '\' line wrapping per RFC 8792 ================

Content-Type: multipart/mixed; boundary="b1"

--b1
Content-Type: text/plain; charset=utf-8

Here is the survey video.

--b1
Content-Type: text/html; charset=utf-8
Content-Disposition: inline
Content-External: video/mp4; name="site-survey.mp4"; ...

<div class="content-external">
<a href="https://dl.example/pR7wQxV3mTz9KcLe2Hd8Fy?k=AEAD_AES_128_\
  GCM:9Mzuq2AvtfQJxwuIzYB4Gg:Xq3mC8vT0bLw5RzH">site-survey.mp4</a>
(700 MiB)
</div>
--b1--

4.1. CID URLs

A "cid" URL [CID] that refers to the Content-ID of a body part with a Content-External header field refers to the linked attachment. For example, if that body part has "Content-ID: a2.20261117T091500Z@mail.example.com":

<img src="cid:a2.20261117T091500Z@mail.example.com"
     alt="Site plan">

An MUA resolves such a URL only to a verified copy of the file (Section 6.1). An MUA that would have to fetch the file from the attachment server to display it SHOULD treat it as remote content, under the same policy as remote images (Section 10).

MUAs that don't support this document resolve these URLs to the fallback body part, and will show, for example, a broken image. Senders SHOULD NOT use them unless they know that the recipients' MUAs support this document.

5. Sending

5.1. Publishing the File

The sender stores the file on an attachment server, and chooses its URL and key. Unless the file is meant to be public, the sender SHOULD encrypt it (Section 3.2).

The "URL" and the download link MUST NOT be guessable, unless the file is already public. Each SHOULD contain at least 128 random bits, as a capability URL [CAPABILITY-URLS].

The attachment server MUST serve GET requests for the "URL" without authentication, cookies or other state, and MUST always return the same content for it. It SHOULD keep the file until "EXPIRATION", if given, and for at least several days in any case. Its download pages SHOULD send "Referrer-Policy: no-referrer" [REFERRER-POLICY].

5.2. Composing

The MUA adds a body part with a Content-External header field for each linked attachment (Section 4). The DKIM [DKIM] body hash covers these fields.

A linked attachment can be kept in a draft, and is published once.

5.3. Forwarding and Replying

An MUA that forwards a message with linked attachments, or replies and keeps them, SHOULD publish its own copy of each file (Section 5.1) and give the new message body parts with Content-External header fields that point to that copy. The Content-ID and the parameters other than "URL", "KEY", "STORED-DIGEST-" and "EXPIRATION" stay the same. This keeps the file from depending on the original attachment server (Section 9).

A message forwarded as a message/rfc822 body part keeps its linked attachments inside it, as it would attached files.

6. Receiving

6.1. Fetching and Verifying

A receiving server or MUA fetches a linked attachment with a GET request to its "URL". The client:

  • MUST NOT send cookies, credentials or anything else that identifies the recipient;

  • MUST verify the server's certificate (Section 4.3.4 of [HTTP]);

  • MAY follow redirects, only to "https" URIs, and SHOULD limit how many;

  • treats any final status code other than 2xx as failure, and MAY retry after a 429 (Too Many Requests) [RATE-LIMIT], a 5xx or a network error; and

  • SHOULD stop reading once the content is longer than "SIZE" plus the length of the algorithm's tag, if there is a "KEY".

A client that retries MUST back off. After a response with a Retry-After header field (Section 10.2.3 of [HTTP]), it MUST NOT send another request to that host before the time given. Otherwise it MUST wait at least a minute before the first retry, at least double the wait after each further failure, and add random jitter. The back-off applies to the host, not just the URL, so that a receiving server fetching many files from one attachment server slows down for all of them. A client SHOULD give up after a day or so, and treat the linked attachment as unavailable.

The client then checks each "STORED-DIGEST-" whose algorithm it supports, decrypts the file if there is a "KEY", and checks "SIZE" and each "DIGEST-" whose algorithm it supports. If no "DIGEST-" is supported, or any check fails, the linked attachment is unavailable, and MUST NOT be shown as a verified attachment.

A receiving server MAY decline to fetch a file, for example because it is too large. The MUA or the user can then fetch it.

6.2. Content Scanning

A receiving server SHOULD fetch and scan each linked attachment that it would have scanned if the file had been attached, and apply the same policy to the result. If fetching during the SMTP transaction would take too long, it MAY scan after accepting the message and before delivering it.

6.3. Storage and Access

A message store SHOULD fetch each linked attachment on delivery, if it wasn't fetched during scanning, and store it with the message.

It SHOULD let the user's MUAs fetch the stored file the same way as an attached file, so the MUA needn't contact the attachment server. It MUST require the user to authenticate, and MUST NOT let a user fetch the file unless the user can read a message that refers to it. This applies to any lookup by digest, and to any proxy for remote content that the message store offers.

An MUA whose message store doesn't do this MAY fetch the file itself, when the user opens it or in the background on arrival, but SHOULD NOT fetch it just because the message was displayed, except for an image that the user's remote image policy allows (Section 4.1).

6.4. Lifetime

A message store SHOULD keep a linked attachment as long as any message that refers to it, and SHOULD remove it once no message does, as it would an attached file, so that it doesn't keep data the user has deleted. It can keep one copy for many messages, found by digest.

7. Requirements and Alternatives Not Taken

The design meets these requirements:

The message/external-body media type [MEDIA-TYPES] also refers to external content, but many MUAs show it as an attachment with no link, and it has no digest or key.

[BIG-FILES-00] asked whether the field should also be allowed in the header section of a message. This document doesn't allow it, so that the field always has a fallback. The field's name starts with "Content-" because only such fields have a defined meaning in body parts, and gateways may discard others (Section 5.1 of [MEDIA-TYPES]).

The ExternalPart of [MIMI-CONTENT] has much the same information for instant messaging. This document uses the same encryption, AEAD algorithms from the AEAD Registry, and the same option of a digest of the stored file. It also requires a digest of the plaintext, so that copies under different keys match. It names digest algorithms from the HTTP Digest registry rather than the Named Information registry; both have SHA-256.

8. IANA Considerations

8.1. Message Header Field

IANA is asked to add this entry to the "Permanent Message Header Field Names" registry [REG-PROC]:

Header field name:

Content-External

Applicable protocol:

mail

Status:

standard

Author/change controller:

IETF

Specification document(s):

this document

8.2. Content-External Parameters

IANA is asked to create a "Content-External Parameters" registry, with the Specification Required policy. Each entry has a name, a description and a reference. The initial entries are:

Table 1
Name Description Reference
URL URL of the data Section 3.1
SIZE Size of the data in octets Section 3.1
DIGEST-* Digest of the data Section 3.1
STORED-DIGEST-* Digest of the stored data Section 3.1
NAME Recommended file name Section 3.1
DESCRIPTION Description of the data Section 3.1
LANGUAGE Language of the data Section 3.1
CREATION-DATE Creation date of the file Section 3.1
MODIFICATION-DATE Modification date of the file Section 3.1
READ-DATE Last read date of the file Section 3.1
KEY Encryption algorithm, key and nonce Section 3.1
EXPIRATION Date after which the data may be gone Section 3.1

9. Security Considerations

Access. Anyone with the message can fetch the file, as with an attachment. But URLs leak more easily, through browser history, logs or Referer header fields, so encryption keeps a leaked "URL" alone from revealing the file. The download link includes the key, so it is as sensitive as the message, and the attachment server sees the key when it is used. An attachment server could instead put the key in the fragment and decrypt in the browser.

Guessable URLs. Even if the file is encrypted, a guessable URL reveals that it exists and its size.

Changed content. Whoever controls the URL can change the file without changing the message, and the digest detects this. The digest is required even with "KEY", because every recipient has the key, and so does the attachment server once the download link is used, so any of them can make a ciphertext that decrypts correctly.

Request forgery. Receiving servers MUST NOT fetch from addresses that aren't publicly routable, such as loopback, link-local or private addresses, and MUST check again after each redirect.

Resource use. Receiving servers SHOULD limit the number and total size of linked attachments they fetch per message.

Denial of service. Someone who receives a message with linked attachments can resend it, or just its Content-External header fields, to millions of recipients, each of whose servers then fetches the file from the original attachment server. The same works with a "URL" that points at any large file on any server. Forwarding MUAs that publish their own copies (Section 5.3) avoid this for ordinary forwarding. Receiving servers SHOULD fetch a URL only once, and reuse the result for every message that names the same URL and digest, and SHOULD limit how fast they fetch from any one host. Attachment servers MAY limit how often they serve a file, and receivers MUST back off when they do (Section 6.1).

Misleading links. The fallback link might not match the header field. An MUA that hides them and shows the verified file avoids this.

Scanning. The key is in the message, so systems that handle the message can decrypt the file. Encryption protects it only from the attachment server, unless the download link is used, and from anyone with the URL alone.

10. Privacy Considerations

The attachment server sees each fetch. If an MUA fetches the file from it when the user views the message or opens the file, the sender learns when and from where, as with a remote image, and per-recipient URLs show who. An image shown through a "cid" URL (Section 4.1) is then a "web bug" (Section 9.7.3 of [E2E-GUIDANCE]). If the message store fetches it on arrival and MUAs get it from there (Section 6.3), the attachment server learns only that the message was delivered, and not the recipient's address.

11. References

11.1. Normative References

[ABNF]
Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, DOI 10.17487/RFC5234, , <https://www.rfc-editor.org/rfc/rfc5234>.
[AEAD]
McGrew, D., "An Interface and Algorithms for Authenticated Encryption", RFC 5116, DOI 10.17487/RFC5116, , <https://www.rfc-editor.org/rfc/rfc5116>.
[BASE64]
Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10.17487/RFC4648, , <https://www.rfc-editor.org/rfc/rfc4648>.
[CID]
Levinson, E., "Content-ID and Message-ID Uniform Resource Locators", RFC 2392, DOI 10.17487/RFC2392, , <https://www.rfc-editor.org/rfc/rfc2392>.
[CONTENT-DISP]
Troost, R., Dorner, S., and K. Moore, Ed., "Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field", RFC 2183, DOI 10.17487/RFC2183, , <https://www.rfc-editor.org/rfc/rfc2183>.
[CONTENT-LANG]
Alvestrand, H., "Content Language Headers", RFC 3282, DOI 10.17487/RFC3282, , <https://www.rfc-editor.org/rfc/rfc3282>.
[DIGEST-FIELDS]
Polli, R. and L. Pardue, "Digest Fields", RFC 9530, DOI 10.17487/RFC9530, , <https://www.rfc-editor.org/rfc/rfc9530>.
[DKIM]
Crocker, D., Ed., Hansen, T., Ed., and M. Kucherawy, Ed., "DomainKeys Identified Mail (DKIM) Signatures", STD 76, RFC 6376, DOI 10.17487/RFC6376, , <https://www.rfc-editor.org/rfc/rfc6376>.
[HTML]
WHATWG, "HTML Living Standard", <https://html.spec.whatwg.org/>.
[HTTP]
Fielding, R., Ed., Nottingham, M., Ed., and J. Reschke, Ed., "HTTP Semantics", STD 97, RFC 9110, DOI 10.17487/RFC9110, , <https://www.rfc-editor.org/rfc/rfc9110>.
[MAIL]
Resnick, P., Ed., "Internet Message Format", RFC 5322, DOI 10.17487/RFC5322, , <https://www.rfc-editor.org/rfc/rfc5322>.
[MEDIA-TYPES]
Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, DOI 10.17487/RFC2046, , <https://www.rfc-editor.org/rfc/rfc2046>.
[MIME]
Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, DOI 10.17487/RFC2045, , <https://www.rfc-editor.org/rfc/rfc2045>.
[MIME-PARAM]
Freed, N. and K. Moore, "MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations", RFC 2231, DOI 10.17487/RFC2231, , <https://www.rfc-editor.org/rfc/rfc2231>.
[RATE-LIMIT]
Nottingham, M. and R. Fielding, "Additional HTTP Status Codes", RFC 6585, DOI 10.17487/RFC6585, , <https://www.rfc-editor.org/rfc/rfc6585>.
[REG-PROC]
Klyne, G., Nottingham, M., and J. Mogul, "Registration Procedures for Message Header Fields", BCP 90, RFC 3864, DOI 10.17487/RFC3864, , <https://www.rfc-editor.org/rfc/rfc3864>.
[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/rfc/rfc2119>.
[RFC8174]
Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, , <https://www.rfc-editor.org/rfc/rfc8174>.
[URI]
Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, , <https://www.rfc-editor.org/rfc/rfc3986>.

11.2. Informative References

[BIG-FILES-00]
Gondwana, B. and A. Melnikov, "Referencing big external files in email messages", Work in Progress, Internet-Draft, draft-melnikov-email-big-files-00, , <https://datatracker.ietf.org/doc/html/draft-melnikov-email-big-files-00>.
[CAPABILITY-URLS]
Tennison, J., "Good Practices for Capability URLs", W3C First Public Working Draft, , <https://www.w3.org/TR/capability-urls/>.
[E2E-GUIDANCE]
Gillmor, D. K., Ed., Melnikov, A., Ed., and B. Hoeneisen, Ed., "Guidance on End-to-End Email Security", RFC 9787, DOI 10.17487/RFC9787, , <https://www.rfc-editor.org/rfc/rfc9787>.
[JMAP-MAIL]
Jenkins, N. and C. Newman, "The JSON Meta Application Protocol (JMAP) for Mail", RFC 8621, DOI 10.17487/RFC8621, , <https://www.rfc-editor.org/rfc/rfc8621>.
[MAIL-ARCH]
Crocker, D., "Internet Mail Architecture", RFC 5598, DOI 10.17487/RFC5598, , <https://www.rfc-editor.org/rfc/rfc5598>.
[MIMI-CONTENT]
Mahy, R., "More Instant Messaging Interoperability (MIMI) message content", Work in Progress, Internet-Draft, draft-ietf-mimi-content-10, , <https://datatracker.ietf.org/doc/html/draft-ietf-mimi-content-10>.
[REFERRER-POLICY]
Eisinger, J. and E. Stark, "Referrer Policy", W3C Candidate Recommendation, , <https://www.w3.org/TR/referrer-policy/>.
[WRAP]
Watsen, K., Auerswald, E., Farrel, A., and Q. Wu, "Handling Long Lines in Content of Internet-Drafts and RFCs", RFC 8792, DOI 10.17487/RFC8792, , <https://www.rfc-editor.org/rfc/rfc8792>.

Changes from draft-gondwana-email-big-files-00

Changes from draft-melnikov-email-big-files-00

Acknowledgments

Thanks to the participants in the discussion of large file attachments at the IETF meeting where this design was sketched out.

Authors' Addresses

Bron Gondwana
Fastmail
Alexey Melnikov
Isode Limited