RFC 5504

Downgrading Mechanism for Email Address Internationalization

๐Ÿ“… published March 2009, from ietf

RFC 5504 ๐Ÿ’– Downgrading Mechanism for Email Address Internationalization

okay so this one is RFC 5504 ๐Ÿฆ‹ It's titled Downgrading Mechanism for Email Address Internationalization, and it came out of the Network Working Group in March 2009. The two editors are K. Fujiwara (Ed.) and Y. Yoneya (Ed.), both from JPRS โœจ The category is Experimental ๐Ÿงช and the title block doesn't list anything it obsoletes or updates, so it's just doing its own thing ๐Ÿ’…

Status of This Memo ๐Ÿ“œ

bestie, this part is short and sweet ๐ŸŒธ It defines an Experimental Protocol for the Internet community. It is not an Internet standard of any kind. The authors are asking for discussion and suggestions for improvement ๐Ÿซถ And distribution of this memo is unlimited, so share away โœจ

Copyright (c) 2009 IETF Trust and the persons identified as the document authors, with all rights reserved ๐Ÿ’œ This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents, as in effect on the date of publication. The license info lives at http://trustee.ietf.org/license-info. Please actually read those docs carefully, because they describe your rights and restrictions for this document ๐Ÿ™ˆ

Abstract ๐Ÿ“

So traditional mail systems only handle ASCII characters in the SMTP envelope and in mail header fields ๐Ÿ’€ The Email Address Internationalization (UTF8SMTP) extension lets you use UTF-8 characters in those same places, which is iconic. BUT if some server in the delivery path doesn't support UTF8SMTP, the message could get rejected, and that's where a converting mechanism comes in ๐Ÿ”ฅ This document describes a downgrading mechanism for Email Address Internationalization. It's a way to downgrade, not tunnel. There's no up-conversion mechanism that goes with it, although internationalized email clients might use the original internationalized addresses or other data when they display or reply to downgraded messages ๐Ÿ‘‘

Table of Contents ๐Ÿ“‘

   1. Introduction ....................................................3
   2. Terminology .....................................................4
   3. New Header Fields Definition ....................................5
      3.1. Envelope Information Preservation Header Fields ............5
      3.2. Address Header Fields' Preservation Header Fields ..........6
      3.3. Unknown Header Fields' Preservation Header Fields ..........6
   4. SMTP Downgrading ................................................7
      4.1. Path Element Downgrading ...................................7
      4.2. ORCPT downgrading ..........................................8
   5. Email Header Fields Downgrading .................................8
      5.1. Downgrading Method for Each ABNF Element ...................8
           5.1.1. RECEIVED Downgrading ................................9
           5.1.2. UNSTRUCTURED Downgrading ............................9
           5.1.3. WORD Downgrading ....................................9
           5.1.4. COMMENT Downgrading .................................9
           5.1.5. MIME-VALUE Downgrading ..............................9
           5.1.6. DISPLAY-NAME Downgrading ............................9
           5.1.7. MAILBOX Downgrading .................................9
           5.1.8. ENCAPSULATION Downgrading ..........................10
           5.1.9. TYPED-ADDRESS Downgrading ..........................10
      5.2. Downgrading Method for Each Header Field ..................10
           5.2.1. Address Header Fields That Contain <address>s ......10
           5.2.2. Address Header Fields with Typed Addresses .........11
           5.2.3. Downgrading Non-ASCII in Comments ..................11
           5.2.4. Received Header Field ..............................11
           5.2.5. MIME Content Header Fields .........................12
           5.2.6. Non-ASCII in <unstructured> ........................12
           5.2.7. Non-ASCII in <phrase> ..............................12
           5.2.8. Other Header Fields ................................12
   6. MIME Body-Part Header Field Downgrading ........................12
   7. Security Considerations ........................................13
   8. Implementation Notes ...........................................14
      8.1. RFC 2047 Encoding .........................................14
      8.2. Trivial Downgrading .......................................15
      8.3. 7bit Transport Consideration ..............................15
   9. IANA Considerations ............................................16
   10. Acknowledgements ..............................................18
   11. References ....................................................18
      11.1. Normative References .....................................18
      11.2. Informative References ...................................19
   Appendix A.  Examples .............................................20
     A.1.  Downgrading Example 1 .....................................20
     A.2.  Downgrading Example 2 .....................................22

1. Introduction โœจ

okay so traditional mail systems, which are defined by [RFC5321] and [RFC5322], allow ASCII characters in SMTP envelope and mail header field values ๐ŸŽ€ The UTF8SMTP extension ([RFC4952], [RFC5335], and [RFC5336]) lets you use UTF-8 characters in those same SMTP envelope and mail header field values, which is so main character ๐Ÿ‘‘

Here's the problem: if an envelope address or header field has non-ASCII characters, the message can't be delivered unless every system in the delivery path supports UTF8SMTP ๐Ÿ˜ญ This document describes a downgrading mechanism to avoid rejecting those messages when it runs into a server that doesn't support the UTF8SMTP extension. The downgrading mechanism converts envelope and mail header fields into an all-ASCII representation ๐Ÿฆ‹

[RFC5335] allows UTF-8 characters in mail header fields and MIME header fields. The downgrading mechanism specified here converts both the mail header fields and the MIME header fields to ASCII ๐Ÿ’…

This document doesn't change any protocols, except by defining new header fields ๐Ÿงš It describes the conversion method from the internationalized email envelopes and messages defined in [RFC4952], [RFC5335], and [RFC5336] to the traditional email envelopes and messages defined in [RFC5321] and [RFC5322].

Section 3.2 of [RFC5336] defines when downgrading happens. If the SMTP client has a UTF8SMTP envelope or an internationalized message, and the SMTP server doesn't support the UTF8SMTP extension, then the SMTP client MUST NOT send a UTF8SMTP envelope or an internationalized message to the SMTP server ๐Ÿ™ˆ That section lists 4 choices for this situation, and the fourth one is downgrading, which is what we're talking about here ๐Ÿ“

Downgrading may be implemented in Mail User Agents (MUAs), Mail Submission Agents (MSAs), and Mail Transport Agents (MTAs) that act as SMTP clients. It may also be implemented in Message Delivery Agents (MDAs), Post Office Protocol (POP) servers, and IMAP servers that store or offer UTF8SMTP envelopes or internationalized messages to non-UTF8SMTP-compliant systems, which includes message stores ๐Ÿ’œ

This document really tries to define the downgrading process clearly, and it keeps the original internationalized email information as much as possible ๐Ÿซถ

Downgrading in UTF8SMTP has these four parts:

  • New header field definitions
  • SMTP downgrading
  • Email header field downgrading
  • MIME header field downgrading

In Section 3 of this document, you'll meet a bunch of header fields that start with "Downgraded-". They preserve the original envelope information and the original header fields ๐ŸŒˆ

SMTP downgrading is in Section 4, and it makes ASCII-only envelope information out of a UTF8SMTP envelope โœจ

Email header field downgrading is in Section 5, and it makes ASCII-only header fields ๐Ÿ’–

MIME header fields are expanded in [RFC5335]. MIME header field downgrading is in Section 6, and it makes ASCII-only MIME header fields ๐ŸŒธ

Displaying downgraded messages that originally had internationalized email addresses or internationalized header fields is covered in another document ([DISPLAY]) ๐Ÿ‘‘

2. Terminology ๐Ÿ“š

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] ๐Ÿง 

All the specialized terms used in this specification are defined in the Email Address Internationalization (EAI) overview [RFC4952], in the mail specifications [RFC5321] [RFC5322], or in the MIME documents [RFC2045] [RFC2047] [RFC2183] [RFC2231] ๐ŸŽ€ The terms "ASCII address", "internationalized email address", "non-ASCII address", "i18mail address", "UTF8SMTP", "message", and "mailing list" are used with the definitions from [RFC4952] โœจ

This document depends on [RFC5335], [RFC5336], and [RFC5337]. Key words used in those documents are used in this document, too ๐Ÿซถ

The term "non-ASCII" refers to a UTF-8 string that contains at least one non-ASCII character ๐ŸŒˆ

A "UTF8SMTP envelope" has email originator and recipient addresses expanded by [RFC5336] and [RFC5337] ๐Ÿ’…

A "UTF8SMTP message" is an email message expanded by [RFC5335] ๐Ÿฆ‹

3. New Header Fields Definition ๐Ÿงš

okay this is the part where the magic starts ๐Ÿช„ New header fields starting with "Downgraded-" are defined here to preserve the original envelope and mail header field values that contain UTF-8 characters ๐Ÿ’– During downgrading, one new "Downgraded-" header field is added for each original envelope or mail header field that can't be passed as-is to a server that doesn't support UTF8SMTP. The original envelope or mail header field is removed or rewritten. Only the envelope and mail header fields that contain non-ASCII characters are affected ๐ŸŒธ The result is a message that complies with the existing email specifications [RFC5321] and [RFC5322], so it's giving compatibility ๐Ÿ‘‘ The original internationalized information can be retrieved by looking at the "Downgraded-" header fields that were added ๐Ÿ”

3.1. Envelope Information Preservation Header Fields ๐Ÿ’Œ

bestie, this is where the SMTP envelope info gets saved ๐Ÿซถ The downgraded envelope information, <downgraded-envelope-addr>, has two parts: the original non-ASCII address and the downgraded all-ASCII address. Here's the ABNF [RFC5234] syntax:

   downgraded-envelope-addr = [FWS] "<" [ A-d-l ":" ] uMailbox
                              FWS "<" Mailbox ">" ">" [CFWS]

<uMailbox> is defined in [RFC5336]. <Mailbox> and <A-d-l> are defined in Section 4.1.2 of [RFC5321] โœจ

Two header fields, Downgraded-Mail-From: and Downgraded-Rcpt-To:, are defined to preserve the SMTP envelope downgraded information ๐ŸŽ€ Their syntax goes like this:

   fields             =/ downgradedmailfrom / downgradedrcptto

   downgradedmailfrom =  "Downgraded-Mail-From:" unstructured CRLF

   downgradedrcptto   =  "Downgraded-Rcpt-To:"   unstructured CRLF

The unstructured content is downgraded-envelope-addr, and it gets treated as if it were unstructured, with [RFC2047] encoding (and charset UTF-8) as needed ๐Ÿฆ‹ ngl this is how the original address survives the trip ๐Ÿ’œ

3.2. Address Header Fields' Preservation Header Fields ๐Ÿ’Œ

okay so this one is for the address header fields ๐Ÿ’– the whole point is to keep the original header safe. its value field holds the original header field value, so nothing gets lost โœจ the syntax is giving clean ABNF energy:

fields                   =/ known-downgraded-headers ":"
                            unstructured CRLF

known-downgraded-headers =  "Downgraded-" original-headers

original-headers         =  "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"

to preserve a header field in a "Downgraded-" header field, you do this:

  1. Generate a new "Downgraded-" header field whose value is the original header field value.
  2. Treat the generated header field content as if it were unstructured, and then apply [RFC2047] encoding with charset UTF-8 as necessary so that the result is ASCII.

3.3. Unknown Header Fields' Preservation Header Fields ๐Ÿฆ‹

this one is for the original header fields that have non-ASCII characters and aren't covered anywhere else in this spec ๐Ÿซถ the encapsulation header field name is "Downgraded-" glued onto the original name, and the value field holds the original header field value. it's giving wrapped gift energy ๐ŸŽ

the header field syntax:

fields     =/ unknown-downgraded-headers ":" unstructured CRLF

unknown-downgraded-headers = "Downgraded-" original-header-field-name

original-header-field-name = field-name

field-name =  1*ftext
ftext      =  %d33-57 /           ; Any character except
              %d59-126            ;  controls, SP, and ":".

to encapsulate a header field in a "Downgraded-" header field:

  1. Generate a new "Downgraded-" header field whose value is the original header field value.
  2. Treat the generated header field content as if it were unstructured, and then apply [RFC2047] encoding with charset UTF-8 as necessary so the result is ASCII.
  3. Remove the original header field.

4. SMTP Downgrading ๐Ÿ“ฎ

okay this section is about the SMTP envelope, which is the part that's basically the mail's "who's it from and who's it to" info ๐Ÿ’… the targets of downgrading elements in an SMTP envelope are:

  • <reverse-path> of MAIL FROM command
  • <forward-path> of RCPT TO command
  • ORCPT parameter of RCPT TO command

<reverse-path> and <forward-path> are described in [RFC5321] and [RFC5336]. the ORCPT parameter is described in [RFC3461] and [RFC5337]. ๐Ÿงš

4.1. Path Element Downgrading ๐Ÿ›ฃ๏ธ

downgrading the <path> of MAIL FROM and RCPT TO commands uses the ALT-ADDRESS parameter defined in [RFC5336]. an SMTP command is downgradable if the <path> has a non-ASCII address and the command has an ALT-ADDRESS parameter that specifies an ASCII address. ๐ŸŒธ

here's the tea: only non-ASCII addresses are downgradable. so specifying an ALT-ADDRESS value for an all-ASCII address is invalid for use with this specification, and no interpretation is assigned to it. this restriction allows for future extension of the specification, even though no such extensions are currently anticipated ๐Ÿ”ฎ

note that even if no downgrading is performed on the envelope, message header fields and message body MIME header fields that contain non-ASCII characters MUST be downgraded. this is described in Sections 5 and 6 ๐Ÿ’–

when downgrading, replace each <path> that contains a non-ASCII mail address with its specified alternative ASCII address, and preserve the original information using "Downgraded-Mail-From" and "Downgraded-Rcpt-To" header fields as defined in Section 3. before replacing, decode the ALT-ADDRESS parameter value because it is encoded as xtext [RFC3461] ๐Ÿซง

to avoid disclosing recipient addresses, the downgrading process MUST NOT add the "Downgraded-Rcpt-To:" header field if the SMTP downgrading targets multiple recipients. see Section 7 for more details ๐Ÿ™ˆ

as a result of the recipient address downgrading, the domain part of the recipient address prior to downgrading might be different from the domain part of the new recipient address. if the result of address resolution for the domain part of the new recipient address contains the server at the connection destination of the SMTP session for the recipient address prior to downgrading, the SMTP connection is valid for the new recipient address. otherwise, the downgrading process MUST NOT send the downgraded message to the new recipient address via the connection and MUST try to send the downgraded message to the new recipient address โœจ

4.2. ORCPT downgrading ๐ŸŽ€

the "RCPT TO" command can have an ORCPT parameter if the Delivery Status Notification (DSN) extension [RFC3461] is supported. if the ORCPT parameter contains a "utf-8" type address and the address contains raw non-ASCII characters, the address MUST be converted to utf-8-addr-xtext form. those forms are described in [RFC5337] and clarified by successor documents such as [DSNBIS] ๐Ÿ“ฌ

before converting to utf-8-addr-xtext form, remove xtext encoding ๐Ÿงน

5. Email Header Fields Downgrading ๐Ÿ’Œ

this section is the conversion method to ASCII for each header field that might have non-ASCII characters. it's the main event, bestie ๐Ÿ‘‘

[RFC5335] expands "Received:" header fields. [RFC5322] describes the ABNF elements <mailbox>, <word>, <comment>, and <unstructured>. [RFC2045] describes the ABNF element <value> ๐Ÿ“–

5.1. Downgrading Method for Each ABNF Element ๐Ÿงฉ

header field downgrading is defined below for each ABNF element. downgrading an unknown header field is also defined as ENCAPSULATION downgrading. converting the header field terminates when no non-ASCII characters remain in the header field ๐ŸŒˆ

5.1.1. RECEIVED Downgrading

if the header field name is "Received:" and the FOR clause contains a non-ASCII address, remove the FOR clause from the header field. other parts (not counting <comment>s) should not contain non-ASCII values ๐Ÿ™ƒ

5.1.2. UNSTRUCTURED Downgrading

if the header field has an <unstructured> field that contains non-ASCII characters, apply [RFC2047] encoding with charset UTF-8 ๐Ÿซถ

5.1.3. WORD Downgrading

if the header field has any <word> fields that contain non-ASCII characters, apply [RFC2047] encoding with charset UTF-8 โœจ

5.1.4. COMMENT Downgrading

if the header field has any <comment> fields that contain non-ASCII characters, apply [RFC2047] encoding with charset UTF-8 ๐Ÿ’œ

5.1.5. MIME-VALUE Downgrading

if the header field has any <value> elements defined by [RFC2045] and the elements contain non-ASCII characters, encode the <value> elements according to [RFC2231] with charset UTF-8 and leave the language information empty. if the <value> element is <quoted-string> and it contains <CFWS> outside the DQUOTE, remove the <CFWS> before this conversion ๐ŸŽ€

5.1.6. DISPLAY-NAME Downgrading

if the header field has any <address> (<mailbox> or <group>) elements and they have <display-name> elements that contain non-ASCII characters, encode the <display-name> elements according to [RFC2047] with charset UTF-8. DISPLAY-NAME downgrading is the same algorithm as WORD downgrading ๐ŸŒธ

5.1.7. MAILBOX Downgrading ๐Ÿ“ญ

the <mailbox> elements have no equivalent format for non-ASCII addresses ๐Ÿ˜ญ if the header field has any <mailbox> elements that contain non-ASCII characters, preserve the header field in the corresponding "Downgraded-" header field, which is defined in Section 3.2, and rewrite each <mailbox> element to ASCII-only format. the <mailbox> element that contains non-ASCII characters is one of three formats:

  • first format:
[ Display-name ] "<" Utf8-addr-spec 1*FCS "<" Addr-spec ">>"

rewrite it as:

[ Display-name ] "<" Addr-spec ">"
  • second format:
[ Display-name ] "<" Utf8-addr-spec ">"
  • third format:
Utf8-addr-spec

rewrite both the second and third formats as:

[ Display-name ] "Internationalized Address " Encoded-word
" Removed:;"

where the <Encoded-word> is the original <Utf8-addr-spec> encoded according to [RFC2047] ๐Ÿง

5.1.8. ENCAPSULATION Downgrading ๐ŸŽ

if the header field contains non-ASCII characters and is such that no rule is given above, encapsulate it in a "Downgraded-" header field as described in Section 3.3 as a last resort ๐Ÿซฃ

applying this procedure to "Received:" header field is prohibited ๐Ÿšซ

5.1.9. TYPED-ADDRESS Downgrading ๐Ÿ—‚๏ธ

if the header field contains <utf-8-type-addr> and the <utf-8-type-addr> contains raw non-ASCII characters, it is in utf-8-address form. convert it to utf-8-addr-xtext form as described in Section 4.2. COMMENT downgrading is also performed in this case. if the address type is unrecognized and the header field contains non-ASCII characters, then fall back to using ENCAPSULATION downgrading on the entire header field ๐ŸŒ™

5.2. Downgrading Method for Each Header Field ๐Ÿ“‹

header fields are listed in [RFC4021]. this section describes the downgrading method for each header field ๐Ÿ’…

if the whole mail header field does not contain non-ASCII characters, email header field downgrading is not required. each header field's downgrading method is described below โœจ

5.2.1. Address Header Fields That Contain <address>s ๐Ÿ’Œ

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 <mailbox> elements that contain non-ASCII addresses, preserve the header field in a "Downgraded-" header field before the conversion. then perform COMMENT downgrading, DISPLAY-NAME downgrading, and MAILBOX downgrading ๐Ÿซถ

5.2.2. Address Header Fields with Typed Addresses ๐Ÿท๏ธ

Original-Recipient:
Final-Recipient:

if the header field contains non-ASCII characters, perform TYPED-ADDRESS downgrading ๐ŸŒˆ

5.2.3. Downgrading Non-ASCII in Comments ๐Ÿ’ฌ

Date:
Message-ID:
Resent-Message-ID:
In-Reply-To:
References:
Resent-Date:
Resent-Message-ID:
MIME-Version:
Content-ID:
Content-Transfer-Encoding:
Content-Language:
Accept-Language:
Auto-Submitted:

these header fields do not contain non-ASCII characters except in comments. if the header field contains UTF-8 characters in comments, perform COMMENT downgrading ๐Ÿ™ˆ

5.2.4. Received Header Field ๐Ÿ“จ

Received:

perform COMMENT downgrading and RECEIVED downgrading ๐Ÿ”ฅ

5.2.5. MIME Content Header Fields ๐Ÿ–ผ๏ธ

Content-Type:
Content-Disposition:

perform MIME-VALUE downgrading and COMMENT downgrading ๐Ÿ’–

5.2.6. Non-ASCII in <unstructured> ๐Ÿงถ

Subject:
Comments:
Content-Description:

perform UNSTRUCTURED downgrading โœจ

5.2.7. Non-ASCII in <phrase> ๐Ÿ”‘

Keywords:

perform WORD downgrading ๐Ÿฆ‹

5.2.8. Other Header Fields ๐ŸŒธ

for all other header fields that contain non-ASCII characters, are user-defined, and are missing from this document or future defined header fields, perform ENCAPSULATION downgrading.

if the software understands the header field's structure and a downgrading algorithm other than ENCAPSULATION is applicable, that software SHOULD use that algorithm; ENCAPSULATION downgrading is used as a last resort ๐Ÿง 

mailing list header fields (those that start in "List-") are part of this category ๐Ÿ“ฃ

6. MIME Body-Part Header Field Downgrading ๐ŸŽ€

Okay so MIME body-part header fields can contain non-ASCII characters [RFC5335] ๐Ÿ’…. This section tells you how to convert each MIME header field that has non-ASCII into an ASCII-only one. Parse the message body's MIME structure at all levels and check each MIME header field to see whether it contains non-ASCII characters. If the header field value has non-ASCII characters in it, that header field is a target of MIME body-part header field downgrading. Each MIME header field's method is described below. COMMENT downgrading, MIME-VALUE downgrading, and UNSTRUCTURED downgrading are described in Section 5 โœจ

  • Content-ID:: The "Content-ID:" header field does not contain non-ASCII characters except in comments. If the header field contains UTF-8 characters in comments, perform COMMENT downgrading. ๐Ÿซถ
  • Content-Type:
  • Content-Disposition:: Perform MIME-VALUE downgrading and COMMENT downgrading. ๐Ÿฆ‹
  • Content-Description:: Perform UNSTRUCTURED downgrading. ๐ŸŒธ

7. Security Considerations ๐Ÿ”ฅ

Bestie, this part is serious ๐Ÿ˜ญ A downgraded message's header fields contain ASCII characters only. But they still contain MIME-encapsulated header fields that have non-ASCII UTF-8 characters. Plus, the body part may contain UTF-8 characters too. Implementations parsing Internet messages need to accept UTF-8 body parts and UTF-8 header fields that are MIME-encoded. So this document inherits the security considerations of MIME-encoded header fields ([RFC2047] and [RFC3629]) ๐Ÿ’€

Rewriting header fields makes it easier for malicious senders to spoof things without anyone noticing ๐Ÿ™ˆ However, rewritten header fields are preserved in Downgraded-* header fields. And parsing Downgraded-* header fields lets you detect spoofing caused by downgrading. Iconic save ๐Ÿ‘‘

Addresses that do not appear in the message header fields may still show up in the RCPT commands sent to an SMTP server, for a number of reasons. Copying information from the envelope into the header fields risks inadvertent information disclosure (see [RFC5321] and Section 4 of this document). Mitigating inadvertent information disclosure is also discussed in these locations ๐Ÿงš

The techniques described here break methods that depend on digital signatures over the envelope or any part of the message. That includes the top-level header fields and body-part header fields. Depending on the specific message being downgraded, the following techniques are likely to break: DomainKeys Identified Mail (DKIM), and possibly S/MIME and Pretty Good Privacy (PGP). The two obvious mitigations are to stick to 7-bit transport when using these techniques (as most or all of them presently require), or to make sure you have UTF8SMTP end-to-end when needed ๐Ÿ”

Many gateways and servers on the Internet will discard header fields they don't recognise ๐Ÿ˜ค To the extent that the downgrade procedures depend on new header fields (e.g., "Downgraded-") to avoid information loss, the risk of those header fields being dropped, and the subsequent implications, must be identified. In particular, if the "Downgraded-" header fields are dropped, there is no possibility of reconstructing the original information at any point (before, during, or after delivery). Such gateways violate [RFC2979] and can be upgraded to correct the problem ๐Ÿ› ๏ธ

Even though the information is not lost, the original message cannot be perfectly reconstructed. Some downgrading methods remove information (see Sections 5.1.1 and 5.1.5). Hence, downgrading is a one-way process โžก๏ธ

Information in any email header field should usually be treated with some suspicion. Current email systems commonly use various mechanisms and protocols to make the information more trustworthy ๐Ÿง Right now, information in the new Downgraded-* header fields is usually not inspected by these mechanisms. It may even be less trustworthy than the traditional header fields. Note that the Downgraded-* header fields could have been inserted with malicious intent, with content unrelated to the traditional header fields ๐Ÿšฉ

If an internationalized MUA simply tries to "upgrade" the message for display purposes (that is, display the information in the Downgraded-* header fields instead of the traditional header fields), the effectiveness of the deployed mechanisms and protocols is likely to be reduced. The user may also be exposed to additional risks. More guidance on how to display downgraded messages is given in [DISPLAY] ๐Ÿ‘€

Concerns about the trustworthiness of the Downgraded-* header fields are not limited to displaying and replying in MUAs. They should be carefully considered before using such header fields for other purposes as well ๐Ÿ’œ

See the "Security Considerations" section in [RFC4952] for more discussion ๐Ÿ“š


8. Implementation Notes โœจ

8.1. RFC 2047 Encoding

Okay so [RFC2047] has a specific algorithm for whitespace in adjacent encoded words, but a bunch of deployed implementations don't implement it correctly ๐Ÿ˜ญ So whitespace behaviour is kinda unpredictable in practice when multiple encoded words are used. While RFC 5322 states that implementations SHOULD limit lines to not more than 78 characters, implementations MAY choose to allow overly long encoded words in order to work around faulty [RFC2047] implementations. Implementations that choose to do so SHOULD have an optional mechanism to limit line length to 78 characters ๐Ÿ“

8.2. Trivial Downgrading

Downgrading is an alternative for avoiding the rejection of messages that require UTF8SMTP support by a server that doesn't provide it ๐Ÿฆ‹ Implementing the full specification of this document is desirable, but a partial implementation is also possible.

If a partial downgrading implementation runs into an unsupported downgrading target, the implementation MUST NOT send the message to a server that does not support UTF8SMTP. Instead, it MUST either reject the message or generate a notification of non-deliverability ๐Ÿšซ

A partial downgrading, called trivial downgrading, is discussed here. It does not support non-ASCII addresses in SMTP envelope and address header fields, unknown header field downgrading, or the MIME body-part header field downgrading. It supports:

  • some simple header field downgrading: Subject
  • comments and display name downgrading: From, To, Cc
  • trace header field downgrading: Received

Otherwise, the downgrading fails ๐Ÿ’”

Trivial downgrading targets mail messages that are generated by UTF8SMTP-aware MUAs and contain non-ASCII characters in comments, display names, and unstructured parts, without using non-ASCII email addresses. These messages usually don't have non-ASCII email addresses in the SMTP envelope or its header fields. But they still can't be delivered via a UTF8SMTP-unaware SMTP server. Full specification downgrading may be hard to implement, but trivial downgrading saves mail messages that don't use non-ASCII addresses ๐ŸŒˆ

8.3. 7bit Transport Consideration

The SMTP client may run into an SMTP server that does not support the 8BITMIME SMTP extension [RFC1652]. That server does not support "8bit" or "binary" data. Implementers need to consider converting "8bit" data to "base64" or "quoted-printable" encoded form, and adjust the Content-Transfer-Encoding header field accordingly. If the body contains multiple MIME parts, this conversion MUST be performed for each MIME part ๐Ÿงƒ


9. IANA Considerations ๐Ÿ“‹

IANA has registered the following header fields in the Permanent Message Header Field registry, following the procedures in [RFC3864] ๐ŸŽ€

Header field name:  Downgraded-Mail-From
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Rcpt-To
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-From
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Sender
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-To
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Cc
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Bcc
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Reply-To
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Resent-From
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Resent-Sender
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Resent-To
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Resent-Cc
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Resent-Bcc
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Resent-Reply-To
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Return-Path
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

Header field name:  Downgraded-Disposition-Notification-To
Applicable protocol:  mail
Status:  experimental
Author/change controller:  IETF
Specification document(s):  This document (Section 3)

IANA is also requested to refuse registration of all field names that start with "Downgraded-" ๐Ÿ™…โ€โ™€๏ธ For unknown header fields, use the downgrading method described in Section 3.3 so you don't cause conflicts with existing IETF activity (Email Address Internationalization) ๐ŸŒธ


10. Acknowledgements ๐Ÿซถ

Significant comments and suggestions came from John Klensin, Harald Alvestrand, Chris Newman, Randall Gellens, Charles Lindsey, Marcos Sanz, Alexey Melnikov, Frank Ellermann, Edward Lewis, S. Moonesamy, and JET members ๐Ÿ’–


11. References ๐Ÿ“š

11. References ๐Ÿ“šโœจ

11.1. Normative References ๐Ÿ’…

These are the references the spec leans on hardest, so bestie, read these first ๐Ÿค“

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

[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.

[RFC2979]  Freed, N., "Behavior of and Requirements for Internet
           Firewalls", RFC 2979, October 2000.

[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.

[RFC4952]  Klensin, J. and Y. Ko, "Overview and Framework for
           Internationalized Email", RFC 4952, July 2007.

[RFC5234]  Crocker, D. and P. Overell, "Augmented BNF for Syntax
           Specifications: ABNF", STD 68, RFC 5234, January 2008.

[RFC5321]  Klensin, J., "Simple Mail Transfer Protocol", RFC 5321,
           October 2008.

[RFC5322]  Resnick, P., Ed., "Internet Message Format", RFC 5322,
           October 2008.

[RFC5335]  Abel, Y., "Internationalized Email Headers", RFC 5335,
           September 2008.

[RFC5336]  Yao, J. and W. Mao, "SMTP Extension for Internationalized
           Email Addresses", RFC 5336, September 2008.

[RFC5337]  Newman, C. and A. Melnikov, "Internationalized Delivery
           Status and Disposition Notifications", RFC 5337,
           September 2008.

11.2. Informative References ๐Ÿฆ‹

These ones are just extra reading, not required, but lowkey worth a peek โœจ

[DISPLAY]  Fujiwara, K., "Displaying Downgraded Messages for Email
           Address Internationalization", Work in Progress,
           March 2009.

[DSNBIS]   Newman, C. and A. Melnikov, "Internationalized Delivery
           Status and Disposition Notifications", Work in Progress,
           December 2008.

Appendix A. Examples ๐ŸŽ€

A.1. Downgrading Example 1 ๐Ÿ’–

okay so this appendix walks through an SMTP downgrading example, and it's giving very main character ๐Ÿงš imagine a message where:

  • The sender address is "NON-ASCII-local@example.com", which is a non-ASCII address. Its ASCII alternative is "ASCII-local@example.com" and its display-name is "DISPLAY-local".
  • The "To:" address is "NON-ASCII-remote1@example.net", which is a non-ASCII address. Its ASCII alternative is "ASCII-remote1@example.net" and its display-name is "DISPLAY-remote1".
  • The "Cc:" address is a non-ASCII address, "NON-ASCII-remote2@example.org", without an alternative ASCII address. Its display-name is "DISPLAY-remote2".
  • Three display names contain non-ASCII characters.
  • The Subject header field is "NON-ASCII-SUBJECT", which contains non-ASCII characters.
  • Assume the "To:" recipient's MTA (example.net) does not support UTF8SMTP.
  • Assume the "Cc:" recipient's MTA (example.org) supports UTF8SMTP.

Here's the first envelope/message, figure 1 ๐ŸŒธ. The "To:" recipient's session is the focus here.

MAIL FROM: <NON-ASCII-local@example.com>
            ALT-ADDRESS=ASCII-local@example.com
RCPT TO: <NON-ASCII-remote1@example.net>
          ALT-ADDRESS=ASCII-remote1@example.net
RCPT TO: <NON-ASCII-remote2@example.org>
-------------------------------------------------------------
Message-Id: MESSAGE_ID
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Subject: NON-ASCII-SUBJECT
From: DISPLAY-local <NON-ASCII-local@example.com
 <ASCII-local@example.com>>
To: DISPLAY-remote1 <NON-ASCII-remote1@example.net
 <ASCII-remote1@example.net>>
Cc: DISPLAY-remote2 <NON-ASCII-remote2@example.org>
Date: DATE

MAIL_BODY

Figure 1: Original envelope/message (example 1) ๐Ÿ“

In this one there are two SMTP recipients, one is "To:" and the other is "Cc:" ๐Ÿ’… The SMTP downgrading uses To: session downgrading. Figure 2 shows the SMTP downgraded version โœจ

MAIL FROM: <ASCII-local@example.com>
RCPT TO: <ASCII-remote1@example.net>
-------------------------------------------------------------
Downgraded-Mail-From: =?UTF-8?Q?<NON-ASCII-local@example.com_?=
 =?UTF-8?Q?<ASCII-local@example.com>>?=
Downgraded-Rcpt-To: =?UTF-8?Q?<NON-ASCII-remote1@example.net_?=
 =?UTF-8?Q?<ASCII-remote1@example.net>>?=
Message-Id: MESSAGE_ID
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Subject: NON-ASCII-SUBJECT
From: DISPLAY-local <NON-ASCII-local@example.com
 <ASCII-local@example.com>>
To: DISPLAY-remote1 <NON-ASCII-remote1@example.net
 <ASCII-remote1@example.net>>
Cc: DISPLAY-remote2 <NON-ASCII-remote2@example.org>
Date: DATE

MAIL_BODY

Figure 2: SMTP downgraded envelope/message (example 1) ๐Ÿฆ‹

After SMTP downgrading, header field downgrading is performed. The final downgraded message is shown in Figure 3. A Return-Path header field will be added by the final destination MTA ๐Ÿงš

Return-Path: <ASCII-local@example.com>
Downgraded-Mail-From: =?UTF-8?Q?<NON-ASCII-local@example.com_?=
 =?UTF-8?Q?<ASCII-local@example.com>>?=
Downgraded-Rcpt-To: =?UTF-8?Q?<NON-ASCII-remote1@example.net_?=
 =?UTF-8?Q?<ASCII-remote1@example.net>>?=
Message-Id: MESSAGE_ID
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Subject: =?UTF-8?Q?NON-ASCII-SUBJECT?=
From: =?UTF-8?Q?DISPLAY-local?= <ASCII-local@example.com>
Downgraded-From: =?UTF-8?Q?DISPLAY-local_<NON-ASCII-local@example.com_?=
 =?UTF-8?Q?<ASCII-local@example.com>>?=
To: =?UTF-8?Q?DISPLAY-remote1?= <ASCII-remote1@example.net>
Downgraded-To: =?UTF-8?Q?DISPLAY-remote1_?=
 =?UTF-8?Q?<NON-ASCII-remote1@example.net_<ASCII-remote1@example.net>>?=
Cc: =?UTF-8?Q?DISPLAY-remote2?= Internationalized address
 =?UTF-8?Q?NON-ASCII-remote2@example.org?= removed:;
Downgraded-Cc: =?UTF-8?Q?DISPLAY-remote2_?=
 =?UTF-8?Q?<NON-ASCII-remote2@example.org>?=
Date: DATE

MAIL_BODY

Figure 3: Downgraded message (example 1) ๐Ÿ’œ

A.2. Downgrading Example 2 ๐ŸŒˆ

in lots of cases the sender wants to use a non-ASCII address and the recipient is a traditional mail user ๐Ÿซถ The SMTP server handling mail for the recipient and/or the recipient's MUA does not support the UTF8SMTP extension. Picture a message where:

  • The sender address is "NON-ASCII-local@example.com", which is a non-ASCII address. Its ASCII alternative is "ASCII-local@example.com". It has a display-name "DISPLAY-local", which contains non-ASCII characters.
  • The "To:" address is "ASCII-remote1@example.net", which is ASCII-only. It has a display-name, "DISPLAY-remote1", which contains non-ASCII characters.
  • The "Subject:" header field is "NON-ASCII-SUBJECT", which contains non-ASCII characters.

Here's the second envelope/message, figure 4 ๐ŸŽ€

MAIL From: <NON-ASCII-local@example.com>
            ALT-ADDRESS=ASCII-local@example.com
RCPT TO: <ASCII-remote1@example.net>
-------------------------------------------------------------
Message-Id: MESSAGE_ID
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Subject: NON-ASCII-SUBJECT
From: DISPLAY-local <NON-ASCII-local@example.com
 <ASCII-local@example.com>>
To: DISPLAY-remote1 <ASCII-remote1@example.net>
Date: DATE

MAIL_BODY

Figure 4: Original message (example 2) ๐ŸŒธ

In this example the SMTP session is downgradable ๐Ÿ”ฅ Figure 5 shows the SMTP downgraded envelope/message.

MAIL From: <ASCII-local@example.com>
RCPT TO: <ASCII-remote1@example.net>
-------------------------------------------------------------
Downgraded-Mail-From: =?UTF-8?Q?<NON-ASCII-local@example.com_?=
 ?=UTF8?Q?<ASCII-local@example.com>>?=
Message-Id: MESSAGE_ID
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Subject: NON-ASCII-SUBJECT
From: DISPLAY-local <NON-ASCII-local@example.com
 <ASCII-local@example.com>>
To: DISPLAY-remote1 <ASCII-remote1@example.net>
Date: DATE

MAIL_BODY

Figure 5: SMTP downgraded envelope/message (example 2) ๐Ÿ“

After SMTP downgrading, header field downgrading is performed. The downgraded example is shown in Figure 6. ๐Ÿงš

Return-Path: <ASCII-local@example.com>
Downgraded-Mail-From: =?UTF-8?Q?<NON-ASCII-local@example.com_?=
 =?UTF8?Q?<ASCII-local@example.com>>?=
Message-Id: MESSAGE_ID
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
Subject: =?UTF-8?Q?NON-ASCII-SUBJECT?=
Downgraded-From: =?UTF-8?Q?DISPLAY-local_<NON-ASCII-local@example.com_?=
 =?UTF-8?Q?<ASCII-local@example.com>>?=
From: =?UTF-8?Q?DISPLAY-local?= <ASCII-local@example.com>
To: =?UTF-8?Q?DISPLAY-remote1?= <ASCII-remote1@example.net>
Date: DATE

MAIL_BODY

Figure 6: Downgraded message (example 2) ๐Ÿ’…


Authors' Addresses ๐Ÿ’–

Kazunori Fujiwara (editor)
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


Yoshiro Yoneya (editor)
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: yone@jprs.co.jp
๐Ÿ“ฆ where this page comes from