Subject: [EAI] draft-ietf-eai-utf8headers-01.txt / draft-ietf-eai-downgrade-02.txt suggestion

From: Kari Hurtta <[email-masked]>
Date: Sat, 14 Oct 2006 14:48:07 +0300 (EEST)

draft-ietf-eai-utf8headers-01.txt:

   header-content  = "UTF8SMTP:" [FWS] content-code [FWS]
                     *( ";" parameter ) CRLF
   content-code    = "UTF8" / "ASCII" / "Downgraded"
   parameter       = "Header-Language:" [FWS] Language-List
   Language-List   = Language-Tag [FWS]
                     *("," [FWS] Language-Tag [FWS])

following was suggested:

   header-content  = "Header-Type:" [FWS] content-code [FWS]
                      *( ";" parameter ) CRLF

   ; parameter is defined on RFC 2045 

   content-code    = "UTF8SMTP" / "ASCII" / "Downgraded"

   The "header-language" parameter is defined for "Header-Type"
   header-field. Value of "header-language" parameter is defined
   as following (after possible quotation of quoted-string is decode):

   header-language-value = Language-Tag [FWS]
                     *("," [FWS] Language-Tag [FWS])

I also suggest following (almost same was also suggested):

   The "required-fields" parameter is defined for "Header-Type"
   header-field. Value of "required-fields" parameter is defined
   as following (after possible quotation of quoted-string is decode):

   required-fields-value = field-name [FWS]
                     *("," [FWS] field-name [FWS])

   ; field-name is defined on RFC 2822

draft-ietf-eai-downgrade-02.txt:

  Downgrading:
      *  Check if the mail has 'UTF8SMTP' header and its value is
         "UTF8".  Otherwise, downgrading is not required.
      *  Check each header whether it contains UTF-8 characters or not.
         If the header contains UTF-8 characters,
         +  If the header is an address header which is described in
            Section 5.1.1,
            -  Preserve the header in 'Downgraded' header.
            -  Downgrade the header defined in Section 5.1.1.
         +  The other header case, encode the header by [RFC2047] with
            UTF-8 tag.
      *  Change 'UTF8SMTP' header value to "Downgraded".

Suggested changes:

   Downgrading:
      *  Check if the mail has 'Header-Type' header field and 
         its value is "UTF8SMTP".  Otherwise, downgrading is not required.
      *  Check each header field whether it contains UTF-8 characters or not.
         If the header field contains UTF-8 characters,
         +  If the header field is an address header field which is 
            described in Section 5.1.1,
            -  Preserve the header in 'Downgraded' header field.
            -  Downgrade the header field defined in Section 5.1.1.
         +  Otherwise if syntax of header field is known:
            - Encode header elements according of [RFC2047]
              and [RFC2231]
            - If encoding is not possible, preserve the header in 
              'Downgraded' header field and remove original header field.
         -  If syntax of header field is not known
            - Preserve the header in 'Downgraded' header field and 
              remove original header field.
      * If some header field was removed, which is mentioned on
        "required-fields" parameter on 'Header-Type' header field,
        downgrading fails. 
      *  Change 'Header-Type' header field value to "Downgraded".
     
      NOTE: Address header downgrading in Section 5.1.1 may also
            remove header field. If that header field is mentioned 
            on "required-fields" parameter on 'Header-Type' header 
            field, downgrading fails. 
            
draft-ietf-eai-downgrade-02.txt:

    Upgrading:
      *  Check if the mail has 'UTF8SMTP' header and its value is
         "Downgraded".  Otherwise, upgrading is not required.
      *  Decode all 'Downgraded' headers.
         +  Decode header value field string which is [RFC2047] encoded.
         +  If the header is address header described in Section 5.1.1,
            -  Apply address header downgrading to the decoded header.
            -  Remove the header line which is the same with the
               downgraded line.
         +  Remove the 'Downgraded' header.
         +  Add decoded header to mail header.
      *  If each mail header has [RFC2047] encoded part and which
         encoding is "UTF-8", it is a downgraded header, so decode it.
      *  Change 'UTF8SMTP' header value to "UTF8".

Suggested changes:

      *  Check if the mail has 'Header-Type' header field and its value is
         "Downgraded".  Otherwise, upgrading is not required.
         +  Decode header value field string which is [RFC2047] encoded.
         +  If the header is address header field described in Section 5.1.1,
            -  Apply address header field downgrading to the decoded header.
            -  Remove the header field line which is the same with the
               downgraded line.
         +  Remove the 'Downgraded' header field.
         +  Add decoded header to mail header field.
      *  For every mail header field, which syntax is known
         +  If each mail header field has [RFC2047] or [RFC2231] encoded part 
            and which encoding is "UTF-8", it is a downgraded header field, 
            so decode it.
      *  Change 'Header-Type' header value to "UTF8SMTP".

/ Kari Hurtta

_______________________________________________
IMA mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ima

---

From: Frank Ellermann <[email-masked]>
Date: Sat, 14 Oct 2006 15:29:22 +0200

>    header-content  = "Header-Type:" [FWS] content-code [FWS]

"Header-Type" is good.

>    ; parameter is defined on RFC 2045

It's now in RFC 2231 (don't ask), and a MIME parameter uses "="
to separate name and value, not ":".  The "parameter" in the
utf8headers I-D is apparently no MIME parameter, it's a simpler
construct (?).  Or it's a typo.  <Language-Tag> is now defined
in RFC 4646.

And for a MIME parameter a <Language-List> with more than one
<Language-Tag> would need to be a <quoted-string> because the
comma belongs to <tspecials>.

>    content-code    = "UTF8SMTP" / "ASCII" / "Downgraded"

Why not "UTF8" as is ?

>                      *("," [FWS] Language-Tag [FWS])

The xyz-List style is used in 2822 (and in "grandson-of-1036"
now in state "waiting for writeup").

>    ; field-name is defined on RFC 2822

That could be misinterpreted to cover only the field names
defined in 2822, maybe say:

|    ; the term <field-name> is defined in RFC 2822

Frank

---

From: Kari Hurtta <[email-masked]>
Date: 14 Oct 2006 18:14:44 +0300

> >    header-content  = "Header-Type:" [FWS] content-code [FWS]

(  Charles Lindsey suggested "Header-Content", I was not mean
   invent new, but seems that I remembered wrongly :-)
   Anyway "Header-Type"  is now suggested. )
 
> It's now in RFC 2231 (don't ask), and a MIME parameter uses "="

( Well, I have implemented RFC 2231 once -- not need to ask :-) 
  Also I referenced RFC 2231 on that my suggestions downgrade -part. )

> construct (?).  Or it's a typo.  <Language-Tag> is now defined

  I assumed that ":" was typo.  Anyway I objected earlier
  that it is not good to introduce yet another syntax for parameters
  when MUAs and MTAs already implement parser for MIME parameters.

> comma belongs to <tspecials>.

Yes. I was taken account on that my suggestion that quoted-string
is needed.   Maybe it was not clear enough?

> >    content-code    = "UTF8SMTP" / "ASCII" / "Downgraded"

( Charles Lindsey also suggested "Utf8smtp". But actually "UTF8"
  is also ok. )

> now in state "waiting for writeup").

So that may be also
       header-language-value = Language-List

> |    ; the term <field-name> is defined in RFC 2822

Yes.

/ Kari Hurtta

---

From: Frank Ellermann <[email-masked]>
Date: Sun, 15 Oct 2006 00:21:45 +0200

Kari Hurtta wrote:

> Well, I have implemented RFC 2231 once -- not need to ask :-)

So far for my wild theory that only Bruce Lilly tried this. <g>
 
> I assumed that ":" was typo.  Anyway I objected earlier that
> it is not good to introduce yet another syntax for parameters

ACK, if you want or need RFC 2231 somewhere you can stick to it.
 
> I was taken account on that my suggestion that quoted-string

Your <required-field-value> is clear, I wasn't sure about the
<Language-List> value, confused by that ":" vs. "=" issue.

>                          *("," [FWS] Language-Tag [FWS])

One term's enough, *-value or *-List.  It's not important, I
like the shorter Language-List better, matter of taste.

Frank

---

From: "Charles Lindsey" <[email-masked]>
Date: Mon, 16 Oct 2006 12:26:52 +0100

>    content-code    = "UTF8SMTP" / "ASCII" / "Downgraded"

Yes, that was my suggestion, posted here on 31st August when commenting on  
eai-utf8headers-01. It looks like you, myself, and Frank now prefer the  
new header to be called "Header-Type". The reason the content-code is  
"UTF8SMTP" rather than "UTF8" was to make it the same as the capability to  
be returned by the EHLO command (no point in inventing more than one  
keyword for the same concept). Not that I particularly like "UTF8SMTP"  
(because these new messages might also be handled by other transports such  
as UUCP and NNTP), but that is a separate issue.

As an aside, there has been no other response to my comments on  
eai-utf8headers-01 on 31st August, so I don't know whether the authors  
have accepted them or not. Certainly I also drew attention to the  
"{alt-address}" problem which you have also mentioned recently.
>    as following (after possible quotation of quoted-string is decode):

No, read further in my proposal and you will see that I wanted to abolish  
that "header-language" parameter and substitute instead a new header  
"Header-Language" defined in the same way as the "Content-Language" in RFC  
3282.

>    Downgrading:

Yes, I also suggested similar changes in my separate comments on  
eai-downgrade-02 on 31st August, but there has been no response from the  
authors yet.

-- 
Charles H. Lindsey ---------At Home, doing my own thing------------------------
Tel: +44 161 436 6131                       
   Web: http://www.cs.man.ac.uk/~chl
Email: [email-masked]      Snail: 5 Clerewood Ave, CHEADLE, SK8 3JU, U.K.
PGP: 2C15F1A9      Fingerprint: 73 6D C2 51 93 A0 01 E7 65 E8 64 7E 14 A4 AB A5

---

From: Jeff <[email-masked]>
Date: Wed, 18 Oct 2006 18:18:41 +0800

Thanks for your comment Charles. I was fail to catch up with the mailing 
list.
I'll fix those editorial update that you mentioned on the previous post 
("Comments on draft-ietf-eai-utf8headers-01.txt").
Sorry for late reply.
If I miss something, please do remind me.
Thank you.

Charles Lindsey wrote:
> On Sat, 14 Oct 2006 12:48:07 +0100, Kari Hurtta 
> <[email-masked]> wrote:
>
> Yes, that was my suggestion, posted here on 31st August when 
> commenting on eai-utf8headers-01. It looks like you, myself, and Frank 
> now prefer the new header to be called "Header-Type". The reason the 
> content-code is "UTF8SMTP" rather than "UTF8" was to make it the same 
> as the capability to be returned by the EHLO command (no point in 
> inventing more than one keyword for the same concept). Not that I 
> particularly like "UTF8SMTP" (because these new messages might also be 
> handled by other transports such as UUCP and NNTP), but that is a 
> separate issue.
I'm good with this propose. Will put like following.
header-content    = "Header-Type:" [FWS] content-code [FWS]
                  *( ";" parameter ) CRLF
                ; parameter is defined on RFC 2045
content-code    = "UTF8" / "ASCII" / "Downgraded"
header-language-value = DQUOTE Language-Tag [FWS]
                        *("," [FWS] Language-Tag [FWS]) DQUOTE
                    ; Language-Tag is defined in RFC4646
required-fields-value = field-name [FWS]
                        *("," [FWS] field-name [FWS])
                    ; the term <field-name> is defined in RFC 2822

Hopefully can get a updated version out before the cut-off date.

Jeff
-TWNIC