RFC 6857
Post-Delivery Message Downgrading for Internationalized Email Messages
Post-Delivery Message Downgrading for Internationalized Email Messages ๐
Okay bestie, this is RFC 6857 ๐ Here's the title block so you know who's behind it:
- Number: 6857
- Author: K. Fujiwara, from JPRS ๐ง
- Category: Standards Track โจ
- Date: March 2013 ๐
- ISSN: 2070-1721
- Obsoletes / Updates: the header doesn't list either one ๐
Abstract โจ
Okay so the Email Address Internationalization (SMTPUTF8) extension to SMTP lets you put Unicode characters encoded in UTF-8 (anything outside ASCII!) into mail header fields. ๐ Upgraded POP and IMAP servers can handle internationalized messages just fine. But if a POP or IMAP client doesn't support Email Address Internationalization, the server can't deliver the message to it, and it also can't remove the message. ๐ญ
So this document describes a way to convert internationalized messages into the traditional message format. During the conversion, the message elements that need internationalized treatment get recoded or removed. The receiver can then tell that it got messages containing those elements, even if it can't process them. It's giving "reasonable compromise" ๐ฆ
Status of This Memo ๐
This is an Internet Standards Track document. ๐
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It went through public review and was approved for publication by the Internet Engineering Steering Group (IESG). If you want more on Internet Standards, check out Section 2 of RFC 5741. ๐ธ
Info about the current status of this document, any errata, and how to give feedback is at http://www.rfc-editor.org/info/rfc6857. ๐
Copyright Notice ยฉ๏ธ
Copyright (c) 2013 IETF Trust and the persons identified as the document authors. All rights reserved. ๐
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication. Please read these carefully, because they spell out your rights and restrictions for this document. ๐ Code Components pulled out of this document must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come without warranty, as described in the Simplified BSD License. โญ
Table of Contents ๐๏ธ
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1. Problem Statement . . . . . . . . . . . . . . . . . . . . 4
1.2. Possible Solutions . . . . . . . . . . . . . . . . . . . . 4
1.3. Approach Taken in This Specification . . . . . . . . . . . 5
2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 6
3. Email Message Header Field Downgrading . . . . . . . . . . . . 7
3.1. Downgrading Method for Each ABNF Element . . . . . . . . . 7
3.1.1. Unstructured Downgrading . . . . . . . . . . . . . . . 7
3.1.2. Word Downgrading . . . . . . . . . . . . . . . . . . . 7
3.1.3. Comment Downgrading . . . . . . . . . . . . . . . . . 7
3.1.4. MIME-Value Downgrading . . . . . . . . . . . . . . . . 7
3.1.5. Display-Name Downgrading . . . . . . . . . . . . . . . 7
3.1.6. Domain Downgrading . . . . . . . . . . . . . . . . . . 8
3.1.7. Group Downgrading . . . . . . . . . . . . . . . . . . 8
3.1.8. Mailbox Downgrading . . . . . . . . . . . . . . . . . 8
3.1.9. Type-Addr Downgrading . . . . . . . . . . . . . . . . 9
3.1.10. Encapsulation: A Last Resort . . . . . . . . . . . . . 9
3.2. Downgrading Method for Each Header Field . . . . . . . . . 10
3.2.1. Address Header Fields That Contain <address>
Elements . . . . . . . . . . . . . . . . . . . . . . . 10
3.2.2. Non-ASCII Strings in <comment> Elements . . . . . . . 11
3.2.3. Message-ID Header Fields . . . . . . . . . . . . . . . 11
3.2.4. Received Header Field . . . . . . . . . . . . . . . . 11
3.2.5. MIME Content Header Fields . . . . . . . . . . . . . . 12
3.2.6. Non-ASCII Characters in <unstructured> Elements . . . 12
3.2.7. Non-ASCII Characters in <phrase> Elements . . . . . . 12
3.2.8. Other Header Fields . . . . . . . . . . . . . . . . . 12
4. MIME Body Parts and Delivery Status Notifications . . . . . . 12
4.1. MIME Body Part Header Field Downgrading . . . . . . . . . 13
4.2. Delivery Status Notification Downgrading . . . . . . . . . 13
5. Security Considerations . . . . . . . . . . . . . . . . . . . 13
6. Implementation Note: Encoded-Word Encoding . . . . . . . . . . 14
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 15
7.1. Obsolescence of Existing Downgraded-* Header Fields . . . 15
7.2. Registration of New Downgraded-* Header Fields . . . . . . 15
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 16
9. References . . . . . . . . . . . . . . . . . . . . . . . . . . 16
9.1. Normative References . . . . . . . . . . . . . . . . . . . 16
9.2. Informative References . . . . . . . . . . . . . . . . . . 18
Appendix A. Downgrading Example . . . . . . . . . . . . . . . . . 19
1. Introduction ๐ฆ
1.1. Problem Statement ๐ค
Traditional (legacy) mail systems are defined by the Internet Message Format [RFC5322] and other specifications, and they only allow ASCII characters in mail header field values. The SMTPUTF8 extension [RFC6530] [RFC6531] [RFC6532] allows Unicode characters encoded in UTF-8 [RFC3629] in those header fields. "Raw non-ASCII strings" means strings of those characters where at least one of them is not part of the ASCII repertoire. ๐
If a header field contains non-ASCII strings, a POP or IMAP server can't deliver internationalized messages to legacy clients that don't send UTF8 commands or have UTF8 capability. ๐ฉ And because there's no obvious or standardized way to explain what's going on to clients, the server can't even safely discard the message. ๐
1.2. Possible Solutions ๐งฉ
There are four plausible approaches to this problem. ๐ง The best one depends on the situation and on how the delivery SMTP server, the mail store, the POP or IMAP server, the users, and their Mail User Agent (MUA) clients all relate to each other. The four approaches are:
- If the delivery Mail Transport Agent (MTA) knows enough about the POP or IMAP server and the clients being used, the message may be rejected as undeliverable. ๐ โโ๏ธ
- A new, surrogate, message may be created by downgrading the original one in the POP or IMAP server. This keeps the maximum amount of information, at the cost of some complexity, and it doesn't create security or operational problems in the mail system. โจ This specification calls these surrogate messages "downgraded," and other documents call them "surrogate messages."
- Some intermediate downgrading may be applied. It balances losing a bit more information against lower complexity and being easier to implement. โ๏ธ
- The POP or IMAP server may fabricate a message that tells the client an internationalized message is waiting but can't be delivered until an upgraded client is available. ๐ฌ
1.3. Approach Taken in This Specification ๐
This specification goes with the second option. ๐ Honestly, at least in the general case, none of these options keeps enough information to guarantee you can reply to an incoming message without losing anything. So the choice is one of the available "least bad" options. ๐ญ This document specifies a well-designed mechanism, but it's only an interim solution while clients are being upgraded [RFC6855] [RFC6856]. ๐ท
The message downgrading mechanism converts mail header fields into an all-ASCII representation. The POP or IMAP server can use that mechanism and then deliver the internationalized message in its traditional form. That way, receivers can tell whether a message is internationalized, unknown, or broken. ๐
The Internationalized Mail Header specification [RFC6532] allows UTF-8 characters (see Section 2) in mail header fields and MIME header fields. The Internationalized Mail Transport specification [RFC6531] allows UTF-8 characters in some trace header fields. The message downgrading mechanism here describes how internationalized messages [RFC6530] [RFC6532] are converted into traditional email messages [RFC5322]. ๐
This document gives a precise definition of the minimum-information-loss message downgrading process. ๐ฏ
Downgrading has two parts:
- Email header field downgrading
- MIME header field downgrading
Email header field downgrading is described in Section 3, and it generates ASCII-only header fields. ๐ค
Header fields starting with Downgraded- are introduced in Section 3.1.10. They preserve the information that appeared in the original header fields. ๐พ
Internationalized messages define MIME header fields as described in RFC 6532. A delivery status notification may contain non-ASCII addresses. MIME header field downgrading is described in Section 4.1, and delivery status notification downgrading is described in Section 4.2. Together they generate ASCII-only MIME header fields. ๐จ
Displaying downgraded messages that originally had internationalized header fields is out of scope for this document. ๐ A POP or IMAP client that doesn't support the UTF8 extensions (the POP3 UTF8 command and the IMAP ENABLE UTF8=ACCEPT command) doesn't recognize the internationalized message format [RFC6532]. ๐ซถ
More in part 2 ๐ง๐
2. Terminology โจ
Okay bestie, first up is the vocab section ๐ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119]. ๐
Lots of the specialized terms here are defined in other docs, like "Overview and Framework for Internationalized Email" [RFC6530], the Internet Message Format specification [RFC5322], and some of the basic MIME documents [RFC2045] [RFC2183]. This spec makes extensive use of the MIME Message Header Extensions [RFC2047] and extended MIME parameter encodings [RFC2231]. For convenience, both get called "encoded-words" or "encoded-word encoding" ๐ฆ Every encoded-word made under this spec uses UTF-8 as its charset, so it's giving consistency. ๐
The terms "U-label", "A-label", and "IDNA" are used as defined in the IDNA Definitions document [RFC5890]. The terms "ASCII address", "non-ASCII address", "SMTPUTF8", "message", and "internationalized message" are used as defined RFC 6530. The term "non-ASCII string" uses the definition from the Internationalized Email Headers document [RFC6532]. And "UTF-8 character" is used informally here to mean a Unicode character, encoded in UTF-8, that sits outside the ASCII repertoire. These characters get a more formal description using the ABNF element <UTF8-non-ascii>, defined in RFC 6532. ๐
This document refers to the Augmented Backus-Naur Form (ABNF) [RFC5234] elements that show up in RFC 5322 and RFC 2045. RFC 5322 describes the ABNF elements <CFWS>, <comment>, <display-name>, <group>, <id-left>, <id-right>, <mailbox>, <quoted-string>, <unstructured>, and <word>. RFC 2045 describes the ABNF element <value>. Section 3.3 of the Internationalized Mail Transport specification [RFC6531] and Section 3.2 of the Internationalized Email Headers document [RFC6532] updated <domain> to allow non-ASCII characters. ๐ง
Some additional terms get defined locally, inline, below. โญ
3. Email Message Header Field Downgrading ๐ธ
This section defines the method for converting each header field that might contain non-ASCII strings into ASCII. Section 3.1 covers how to rewrite each ABNF element, and Section 3.2 covers how to rewrite each header field. It's a whole glow-up arc ๐
3.1. Downgrading Method for Each ABNF Element
Header field downgrading is defined below for each ABNF element. Conversion of the header field stops once no characters other than those in the ASCII repertoire are left in the header field. โจ
3.1.1. Unstructured Downgrading
If the header field has an <unstructured> field that contains non-ASCII strings, apply encoded-word encoding. ๐
3.1.2. Word Downgrading
If the header field has any <word> fields that contain non-ASCII strings, apply encoded-word encoding. ๐
3.1.3. Comment Downgrading
If the header field has any <comment> fields that contain non-ASCII strings, apply encoded-word encoding. ๐ฌ
3.1.4. MIME-Value Downgrading
If the header field has any <value> elements [RFC2045] that contain non-ASCII strings, remove any <CFWS> that appear outside DQUOTE [RFC5234] in those elements. Then encode the <value> elements as extended MIME parameter encodings [RFC2231] and leave the language information empty. ๐ซถ
3.1.5. Display-Name Downgrading
If the header field has any <address> (<mailbox> or <group>) elements, and they have <display-name> elements that contain non-ASCII strings, encode the <display-name> elements as encoded-words. Display-Name downgrading uses the same algorithm as Word downgrading. ๐ฆ
3.1.6. Domain Downgrading
If the header field has any <domain> elements that contain U-labels, rewrite the non-ASCII domain name into an ASCII domain name using A-labels [RFC5891]. ๐
3.1.7. Group Downgrading
<group> is defined in Section 3.4 of the Internet Message Format specification [RFC5322]. The <group> element may contain <mailbox> elements that contain non-ASCII addresses. ๐ฌ
If a <group> element contains <mailbox> elements, and one of those <mailbox> elements contains a non-ASCII <local-part>, rewrite the <group> element as:
display-name " " ENCODED_WORD " :;"
where the <ENCODED_WORD> is the original <group-list> encoded as encoded-words. ๐ง
Otherwise, the <group> element contains an ASCII-only <local-part>. If the <group> element contains non-ASCII <mailbox> elements, they contain non-ASCII domain names. Rewrite those non-ASCII domain names into ASCII domain names using A-labels [RFC5891]. Generated <mailbox> elements contain ASCII addresses only. ๐
3.1.8. Mailbox Downgrading
If the <local-part> of the <mailbox> element contains no characters other than those in the ASCII repertoire, the <domain> element may contain non-ASCII characters. Rewrite the non-ASCII domain names into ASCII domain names using A-labels [RFC5891]. ๐ธ
Otherwise, the <local-part> may contain non-ASCII characters. A <local-part> with characters outside the ASCII repertoire has no equivalent format for ASCII addresses. The <addr-spec> element that contains non-ASCII strings may appear in two forms, as:
"<" addr-spec ">"
or
addr-spec
Rewrite both as:
ENCODED-WORD " :;"
where the <ENCODED-WORD> is the original <addr-spec> encoded as encoded-words. ๐
3.1.9. Type-Addr Downgrading
If the header field contains <utf-8-type-addr>, and the <utf-8-type-addr> contains raw non-ASCII strings (<UTF8-non-ascii>), it is in utf-8-address form [RFC6533]. Convert it to utf-8-addr-xtext form [RFC6533]. Comment downgrading is also performed in this case. If the address type is unrecognized and the header field contains non-ASCII strings, fall back to using Encapsulation on the entire header field, as specified in Section 3.1.10. ๐ฅ
3.1.10. Encapsulation: A Last Resort
As a last resort, when header fields can't be converted the way we just discussed in the previous subsection, the fields get deleted and replaced by specialized new header fields. Those fields are defined to preserve, in encoded form, as much information as possible from the header field values of the incoming message. This mechanism is known as Encapsulation downgrading in this specification, because it keeps the original information in a different form. ๐งณ The syntax of these new header fields is:
fields =/ downgraded
downgraded = "Downgraded-Message-Id:" unstructured CRLF /
"Downgraded-Resent-Message-Id:" unstructured CRLF /
"Downgraded-In-Reply-To:" unstructured CRLF /
"Downgraded-References:" unstructured CRLF /
"Downgraded-Original-Recipient:" unstructured CRLF /
"Downgraded-Final-Recipient:" unstructured CRLF
Applying this procedure to the "Received:" header field is prohibited. Encapsulation downgrading is allowed for "Message-ID:", "In-Reply-To:", "References:", "Original-Recipient:", and "Final-Recipient:" header fields. ๐ซ
To preserve a header field in a Downgraded- header field:
- Generate a new header field.
- The field name is a concatenation of
Downgraded-and the original field name. - The initial new field value is the original header field value.
- The field name is a concatenation of
- Treat the initial new header field value as if it were unstructured, and then apply the encoded-word encoding as necessary so that the resulting new header field value is completely in ASCII.
- Remove the original header field.
3.2. Downgrading Method for Each Header Field
The Mail and MIME Header Fields document [RFC4021] establishes a registry of header fields. This section describes the downgrading method for each header field listed in that registry as of the date of publication of this specification. ๐
If the entire mail header field contains no characters other than those in the ASCII repertoire, email header field downgrading is not required. Each header field's downgrading method is described below. ๐ท
3.2.1. Address Header Fields That Contain <address> Elements
From:
Sender:
To:
Cc:
Bcc:
Reply-To:
Resent-From:
Resent-Sender:
Resent-To:
Resent-Cc:
Resent-Bcc:
Resent-Reply-To:
Return-Path:
Disposition-Notification-To:
If the header field contains non-ASCII characters, first perform Comment downgrading and Display-Name downgrading as described in the corresponding subsections of Section 3.1. If the header field still contains non-ASCII characters, complete the following two steps: ๐
- If the header field contains
<group>elements that contain non-ASCII addresses, perform Group downgrading on those elements. - If the header field contains
<mailbox>elements that contain non-ASCII addresses, perform Mailbox downgrading on those elements.
This procedure may generate empty <group> elements in the From: and Sender: header fields. The Group Syntax document [RFC6854] updates the Internet Message Format specification [RFC5322] to allow (empty) <group> elements in the From: and Sender: header fields. ๐ซง
3.2.2. Non-ASCII Strings in <comment> Elements
Date:
Resent-Date:
MIME-Version:
Content-ID:
Content-Transfer-Encoding:
Content-Language:
Accept-Language:
Auto-Submitted:
Except in comments, these header fields don't contain characters other than those in the ASCII repertoire. If the header field contains UTF-8 characters in comments, perform Comment downgrading. ๐ฐ๏ธ
3.2.3. Message-ID Header Fields
Message-ID:
Resent-Message-ID:
In-Reply-To:
References:
If there are non-ASCII strings in <id-left> or <id-right> elements, perform Encapsulation. Otherwise, the header field contains UTF-8 characters in comments and Comment downgrading should be performed. ๐
3.2.4. Received Header Field
Received:
If <domain> elements or <mailbox> elements contain U-labels, perform Domain downgrading as specified in Section 3.1.6. Comments may contain non-ASCII strings; if so, perform Comment downgrading. ๐
After the Domain downgrading and the Comment downgrading, if the "FOR" clause contains a non-ASCII <local-part>, remove the FOR clause. If the "ID" clause contains a non-ASCII value, remove the ID clause. ๐๏ธ
3.2.5. MIME Content Header Fields
Content-Type:
Content-Disposition:
If there are non-ASCII strings in <value> or <CFWS> elements, perform MIME-Value and Comment downgrading. ๐จ
3.2.6. Non-ASCII Characters in <unstructured> Elements
Subject:
Comments:
Content-Description:
If non-ASCII strings are present in <unstructured> elements, perform Unstructured downgrading. ๐
3.2.7. Non-ASCII Characters in <phrase> Elements
Keywords:
If non-ASCII strings are present in <phrase> elements, perform Word downgrading. ๐
3.2.8. Other Header Fields
Other header fields that aren't covered in this document (such as implementation-specific or user-defined fields) might also contain non-ASCII strings. Any header field that doesn't have a conversion method defined above will fall into this category and get treated as follows. ๐งฉ
If there are non-ASCII strings present in the header fields, perform Unstructured downgrading.
If the software understands the header field's structure, and a downgrading algorithm other than Unstructured is applicable, that software SHOULD use that algorithm. Unstructured downgrading is used when there is no other option. ๐
Mailing list header fields (those that start in "List-") are part of this category. ๐ฎ
4. MIME Body Parts and Delivery Status Notifications โจ
Okay so, bestie, there are two places where non-ASCII characters can sneak in: the MIME body part header fields [RFC2045] [RFC6532], and the contents of a delivery status notification [RFC6533]. Both can contain them, so we need to handle both ๐
4.1. MIME Body Part Header Field Downgrading
RFC 6532 is the extension that lets MIME header fields, body part header fields included, hold non-ASCII strings. This section explains how to turn each of those MIME header fields into an ASCII-only version. The vibe is: go through the message body's MIME structure at every level, and check each MIME header field to see whether it has non-ASCII strings in it ๐ If the header field's value contains non-ASCII strings, that header field gets downgraded like the rest of them.
The body part fields Content-ID, Content-Type, Content-Disposition, and Content-Description use the exact same downgrading methods as the header fields with those same names in Section 3.2 ๐
4.2. Delivery Status Notification Downgrading
If the message has a delivery status notification (see Section 6 of the SMTP DSN Extension [RFC3461]), it's test-and-convert time ๐งช
If there are Original-Recipient: and Final-Recipient: header fields, and those header fields contain non-ASCII strings, do Type-Addr downgrading. Literally that's the whole thing ๐
5. Security Considerations ๐ฅ
Okay, this section is the serious one, so pay attention. The whole point of post-delivery message downgrading is to let POP and IMAP servers deliver internationalized messages to regular old POP and IMAP clients, and to let those clients display them. Users who get these messages can tell that they were internationalized ๐ BUT it does not let receivers read the messages in their original form, and in general it won't let them generate replies either, at least not without a lot of manual user effort ๐
After downgrading as this document describes, the header fields of a message contain ASCII characters only, and some of them are in encoded-word form. Nothing in this document, or in the other SMTPUTF8 specifications [RFC6530] [RFC6531], changes the basic MIME properties that allow characters outside the ASCII repertoire in encodings specified for them. So this document inherits the security considerations tied to MIME-encoded header fields in RFC 2047 [RFC2047], and to UTF-8 itself as specified in RFC 3629 [RFC3629] ๐ง
Rewriting header fields gives malicious senders more chances to spoof things without anyone noticing ๐ฌ The good news is that the rewritten header field values are kept either in equivalent MIME form or in newly defined header fields that traditional MUAs don't have any special processing for โจ
The techniques here may break methods that rely on digital signatures over any part of the message, and that includes the top-level header fields and the body part header fields. Depending on the specific message being downgraded, at least the following are likely to break: DomainKeys Identified Mail (DKIM), and possibly S/MIME and Pretty Good Privacy (PGP) ๐ฅฒ The downgrade mechanism SHOULD NOT remove signatures, even if they'll fail validation after downgrading. As much of the information from the original message as possible SHOULD be preserved ๐ซถ Also, MUAs may be able to use the presence of an Authentication-Results header field [RFC5451] to figure out whether the digital signatures were valid before the header fields got downgraded ๐ต๏ธโโ๏ธ
Look, information in any email header field should usually be treated with some suspicion. That said, current email systems commonly use various mechanisms and protocols to make the information more trustworthy ๐ Information in the new Downgraded-* header fields isn't inspected by traditional MUAs, and it may be even less trustworthy than the traditional header fields. Also, the Downgraded-* header fields could have been inserted with malicious intent (and with content unrelated to the traditional header fields). Traditional MUAs don't evaluate Downgraded-* header fields, though ๐ญ
For more discussion, check out the Security Considerations sections in the Group Syntax document [RFC6854] and the Internationalized Email Framework [RFC6530] ๐
6. Implementation Note: Encoded-Word Encoding ๐
The encoded-word spec has specific rules for dealing with whitespace between adjacent encoded words [RFC2047]. The problem is that a bunch of deployed implementations don't implement that algorithm correctly ๐ So in practice, whitespace behavior is kind of unpredictable whenever multiple encoded words show up together. Chaos, honestly ๐
RFC 5322 says that implementations SHOULD limit lines to 78 characters or less. Implementations MAY choose to allow overly long encoded words, as a workaround for those faulty implementations ๐ง If an implementation does choose that, it SHOULD have an optional mechanism to limit line length to 78 characters โจ
7. IANA Considerations ๐ธ
7.1. Obsolescence of Existing Downgraded-* Header Fields
The experimental spec that this document was partly based on [RFC5504] said that no new header fields beginning with Downgraded- could be registered. That restriction is now lifted ๐ This document makes a whole new set of registrations, and they replace the experimental fields with standard ones ๐ฆ
The Downgraded-* header fields that were registered as experimental fields in RFC 5504 are no longer in use. IANA has changed the status from "experimental" to "obsoleted" for every name in the "Permanent Message Header Field Names" registry that began with Downgraded- ๐ชฆ
7.2. Registration of New Downgraded-* Header Fields
The following header fields have been registered in the "Permanent Message Header Field Names" registry, following the procedures in the Header Field Registration document [RFC3864] ๐
Header field name: Downgraded-Message-Id
Applicable protocol: mail
Status: standard
Author/change controller: IETF
Specification document(s): This document (Section 3.1.10)
Header field name: Downgraded-In-Reply-To
Applicable protocol: mail
Status: standard
Author/change controller: IETF
Specification document(s): This document (Section 3.1.10)
Header field name: Downgraded-References
Applicable protocol: mail
Status: standard
Author/change controller: IETF
Specification document(s): This document (Section 3.1.10)
Header field name: Downgraded-Original-Recipient
Applicable protocol: mail
Status: standard
Author/change controller: IETF
Specification document(s): This document (Section 3.1.10)
Header field name: Downgraded-Final-Recipient
Applicable protocol: mail
Status: standard
Author/change controller: IETF
Specification document(s): This document (Section 3.1.10)
8. Acknowledgements ๐ซถ
This document leans heavily on the experimental in-transit message downgrading procedure described in RFC 5504. Big thanks to the coauthor of that earlier document, Y. Yoneya ๐ Significant comments and suggestions also came from John Klensin, Barry Leiba, Randall Gellens, Pete Resnick, Martin J. Durst, and other WG participants, and they're all iconic for it ๐
9. References โจ
9.1. Normative References
- [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.
- [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
- [RFC2183] Troost, R., Dorner, S., and K. Moore, "Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field", RFC 2183, August 1997.
- [RFC2231] Freed, N. and K. Moore, "MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations", RFC 2231, November 1997.
- [RFC3461] Moore, K., "Simple Mail Transfer Protocol (SMTP) Service Extension for Delivery Status Notifications (DSNs)", RFC 3461, January 2003.
- [RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003.
- [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration Procedures for Message Header Fields", BCP 90, RFC 3864, September 2004.
- [RFC4021] Klyne, G. and J. Palme, "Registration of Mail and MIME Header Fields", RFC 4021, March 2005.
- [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, October 2008.
- [RFC5890] Klensin, J., "Internationalized Domain Names for Applications (IDNA): Definitions and Document Framework", RFC 5890, August 2010.
- [RFC5891] Klensin, J., "Internationalized Domain Names in Applications (IDNA): Protocol", RFC 5891, August 2010.
- [RFC6530] Klensin, J. and Y. Ko, "Overview and Framework for Internationalized Email", RFC 6530, February 2012.
- [RFC6531] Yao, J. and W. Mao, "SMTP Extension for Internationalized Email", RFC 6531, February 2012.
- [RFC6532] Yang, A., Steele, S., and N. Freed, "Internationalized Email Headers", RFC 6532, February 2012.
- [RFC6533] Hansen, T., Newman, C., and A. Melnikov, "Internationalized Delivery Status and Disposition Notifications", RFC 6533, February 2012.
- [RFC6854] Leiba, B., "Update to Internet Message Format to Allow Group Syntax in the "From:" and "Sender:" Header Fields", RFC 6854, March 2013.
- [RFC6855] Resnick, P., Ed., Newman, C., Ed., and S. Shen, Ed., "IMAP Support for UTF-8", RFC 6855, March 2013.
- [RFC6856] Gellens, R., Newman, C., Yao, J., and K. Fujiwara, "Post Office Protocol Version 3 (POP3) Support for UTF-8", RFC 6856, March 2013.
9.2. Informative References
- [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", STD 68, RFC 5234, January 2008.
- [RFC5451] Kucherawy, M., "Message Header Field for Indicating Message Authentication Status", RFC 5451, April 2009.
- [RFC5504] Fujiwara, K. and Y. Yoneya, "Downgrading Mechanism for Email Address Internationalization", RFC 5504, March 2009.
Appendix A. Downgrading Example ๐
okay bestie, this appendix is a worked example, and honestly it's my favourite part ๐ฆ It shows a whole message getting downgraded. We're starting with a received mail message, and here's everything that's in it:
- The sender address is a non-ASCII address, "NON-ASCII-LOCAL@example.com". Its display-name is "DISPLAY-LOCAL" โจ
- The "To:" header field has two non-ASCII addresses, "NON-ASCII-REMOTE1@example.net" and "NON-ASCII-REMOTE2@example.com". Their display-names are "DISPLAY-REMOTE1" and "DISPLAY-REMOTE2" ๐
- The "Cc:" header field has a non-ASCII address, "NON-ASCII-REMOTE3@example.org". Its display-name is "DISPLAY-REMOTE3" ๐ธ
- Four display-names contain non-ASCII characters ๐
- The "Subject:" header field is "NON-ASCII-SUBJECT", which has non-ASCII strings ๐
- The "Message-Id:" header field contains "NON-ASCII-MESSAGE_ID", which has non-ASCII strings ๐ง
- There's an unknown header field, "X-Unknown-Header:", which also has non-ASCII strings ๐
Here's the received message sitting in the maildrop:
Return-Path: <NON-ASCII-LOCAL@example.com>
Received: from ... by ... for <NON-ASCII-REMOTE1@example.net>
Received: from ... by ... for <NON-ASCII-REMOTE1@example.net>
From: DISPLAY-LOCAL <NON-ASCII-LOCAL@example.com>
To: DISPLAY-REMOTE1 <NON-ASCII-REMOTE1@example.net>,
DISPLAY-REMOTE2 <NON-ASCII-REMOTE2@example.com>
Cc: DISPLAY-REMOTE3 <NON-ASCII-REMOTE3@example.org>
Subject: NON-ASCII-SUBJECT
Date: Mon, 30 Jul 2012 01:23:45 -0000
Message-Id: NON-ASCII-MESSAGE_ID
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-Unknown-Header: NON-ASCII-CHARACTERS
MAIL_BODY
Figure 1: Received Message in a Maildrop ๐ฌ
Now the glow-up ๐ฆ The downgraded message is in Figure 2. The "Return-Path:", "From:", "To:", and "Cc:" header fields get rewritten. The "Subject:" and "X-Unknown-Header:" header fields get encoded as encoded-words. And the "Message-Id:" header field gets encapsulated as a "Downgraded-Message-Id:" header field. Iconic, honestly ๐
Return-Path: =?UTF-8?Q?NON-ASCII-LOCAL@example.com?= :;
Received: from ... by ...
Received: from ... by ...
From: =?UTF-8?Q?DISPLAY-LOCAL?=
=?UTF-8?Q?NON-ASCII-LOCAL@example.com?= :;
To: =?UTF-8?Q?DISPLAY-REMOTE1?=
=?UTF-8?Q?NON-ASCII-REMOTE1@example.net?= :;,
=?UTF-8?Q?DISPLAY-REMOTE2?=
=?UTF-8?Q?NON-ASCII-REMOTE2@example.com?= :;,
Cc: =?UTF-8?Q?DISPLAY-REMOTE3?=
=?UTF-8?Q?NON-ASCII-REMOTE3@example.org?= :;
Subject: =?UTF-8?Q?NON-ASCII-SUBJECT?=
Date: Mon, 30 Jul 2012 01:23:45 -0000
Downgraded-Message-Id: =?UTF-8?Q?MESSAGE_ID?=
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-Unknown-Header: =?UTF-8?Q?NON-ASCII-CHARACTERS?=
MAIL_BODY
Figure 2: Downgraded Message โจ
Author's Address ๐
Kazunori Fujiwara ๐ Japan Registry Services Co., Ltd. ๐ข Chiyoda First Bldg. East 13F, 3-8-1 Nishi-Kanda ๐ธ Chiyoda-ku, Tokyo 101-0065 Japan ๐
Phone: +81 3 5215 8451 ๐ EMail: fujiwara@jprs.co.jp ๐
๐ฆ where this page comes from
- ietf: rfc6857 2013-03
- ๐ girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms