Re: [ietf-822] utf8 messages

Brandon Long <blong@google.com> Wed, 13 August 2014 08:00 UTC

Return-Path: <blong@google.com>
X-Original-To: ietf-822@ietfa.amsl.com
Delivered-To: ietf-822@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 57F8C1A08D1 for <ietf-822@ietfa.amsl.com>; Wed, 13 Aug 2014 01:00:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.046
X-Spam-Level:
X-Spam-Status: No, score=-2.046 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.668, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jZxnQK98MT5v for <ietf-822@ietfa.amsl.com>; Wed, 13 Aug 2014 01:00:33 -0700 (PDT)
Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 009911A7035 for <ietf-822@ietf.org>; Wed, 13 Aug 2014 01:00:32 -0700 (PDT)
Received: by mail-ig0-f172.google.com with SMTP id h15so9368970igd.11 for <ietf-822@ietf.org>; Wed, 13 Aug 2014 01:00:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=lgxyuSkkliveFohMdam2yr6/sGZdXq3x6JuRau29vJ4=; b=Vv0JbC7f9dFY1uIJ/kAbQKQ8UPPeVhm813VpDrWjIMfkIIuYVt1CjvWyZtsQ4ZK6pP 8amKV4cDXf+amhScn6LUcGZ197IwtcURT57IDloN92zI85rqO3VOfgzji0ehGbSUtSxE Zk5XLOIWQenBfyjr2Gd2bv0CDGjunFAX0d9UB3q82EGDjjf+UUOsPvlPqTccA8itIDhD pnbqYKqJnUJOR6YBV8NBq6GjtQmqgk73u2B0Z+KlSU7/n8op7Lr/grZ16qlZM2lc7oGM ZwCNDBfUyMvKwIEYpYW0Wytemnl+UpZRB+UPhuAtD6nkGtNZiiGyg2zFXHmFYqh5qCX4 VAWw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=lgxyuSkkliveFohMdam2yr6/sGZdXq3x6JuRau29vJ4=; b=m8Og0i+82TDN0HvUCV0HN8KC3jnce2R7Yr/GqxgIJsqspwVwxFigR/mo36/lV46iaO McaqnG/b/wTpERVAFy1N7MoN8chyHk9h/Sw16YS52izKI+fdTZliMPhLur41+uHv6sGH CK1sAsIsyeyj2pcdgeOxlFw65EzN/KVOxXrJeTk9Z9mZuTmplwwhhg4+Y+OjpPu7F00K 75Ne550cHEQoekqxEPuH3/nRTVeIICXRo97PwNSZkELyuvJRCG0ikbkTejNjdF59CrBM iQ63fEaas7P/7sRcFTCPScH0Csvqq4GV4qxOeV6uq91dCnsBBkU85oyglqHAFGH7KNXZ /lBw==
X-Gm-Message-State: ALoCoQk252sf+oKfjhZs4MIoBIRfFlWdpq+mRMv/aY0PAp9zl+g+e3RDTa7y7K0n2J0Km2f15phj
MIME-Version: 1.0
X-Received: by 10.50.79.195 with SMTP id l3mr46041258igx.23.1407916832285; Wed, 13 Aug 2014 01:00:32 -0700 (PDT)
Received: by 10.64.62.78 with HTTP; Wed, 13 Aug 2014 01:00:32 -0700 (PDT)
In-Reply-To: <01PBABOOL4QO0000SM@mauve.mrochek.com>
References: <CABa8R6tWEhjjZSvq6NbM7EimokOms3suZufn0-6N1SB_fzGM8Q@mail.gmail.com> <01PB9FABWA4E0000SM@mauve.mrochek.com> <CABa8R6tns-idiZTj=+vb9fVNyH-nNYT+w9oNMb80XbCs5osvFw@mail.gmail.com> <01PBABOOL4QO0000SM@mauve.mrochek.com>
Date: Wed, 13 Aug 2014 01:00:32 -0700
Message-ID: <CABa8R6vBqS1ewmTtHh8tTOdzobsWpvSEokRxOqpj1Oq3hA+vsw@mail.gmail.com>
From: Brandon Long <blong@google.com>
To: Ned Freed <ned.freed@mrochek.com>
Content-Type: multipart/alternative; boundary="089e01182d0aa99ff905007e2e1d"
Archived-At: http://mailarchive.ietf.org/arch/msg/ietf-822/AoRSo4CN4bUg5XyLwkrpRs57aMA
Cc: ietf-822@ietf.org
Subject: Re: [ietf-822] utf8 messages
X-BeenThere: ietf-822@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Discussion of issues related to Internet Message Format \[RFC 822, RFC 2822, RFC 5322\]" <ietf-822.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ietf-822>, <mailto:ietf-822-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf-822/>
List-Post: <mailto:ietf-822@ietf.org>
List-Help: <mailto:ietf-822-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-822>, <mailto:ietf-822-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 13 Aug 2014 08:00:38 -0000

On Tue, Aug 12, 2014 at 7:54 AM, Ned Freed <ned.freed@mrochek.com> wrote:

> > > It is, or is supposed to be, a sealed system implemented as a set of
> > > interlocking extensions to existing email facilities.
>
> > So, if I have an "email" message, I can no longer just parse it.
> Instead,
> > there are actually two
> > types of email messages, and the only way to know how to parse it is to
> > know a priori which type it is.
> > Because all systems are "sealed" and there's never any leakage.
>
> Wrong on all counts, I'm afraid. First and foremost, in practice you have
> never
> been able to "just parse" email messages, for the simple reason that too
> many
> message creation agents don't follow the rules and create wildly
> incompliant
> messages. So there's always some heuristics involved, unless of course
> you're
> willing to only accept syntacticaly valid messages, in which case yes, you
> can "just parse" messages, including EAI messages.
>
> Where the lines are drawn has always been a tradeoff, and one which has
> changed over the years. It used to be the case that a lot more crap was
> generally tolerated. The spam problem has led to an overall tightening up
> what's tolerated.
>
> Second, because of overall lack of compliance, there have always been
> many types of messages.
>
> Third, of course there's leakage.
>

Ok, let me try to rephrase my point.  Before, there were two types of
messages, well specified / syntactically correct message, and not.  The not
well specified messages amount to a non-trivial number, but best
effort/heuristic results are fine.

If we imagine handling 1B messages/day, 2% being the "not well specified",
we have 20M messages handled by heuristic.  If we have only 1% heuristic
failures, that's 200k bad messages a day.  Eh, maybe ok.  Especially since
in practice, these tend to be spam messages or the 8bit chars in the header
are limited to some "content preview" header or other boneheadedness, or
best case, its only a character or two that's broken.

Adding under-specified 6532 messages to the mix means that we are now
generating messages that can easily slip into the second pool.  We try our
best to only generate well specified / syntactically correct messages.. "be
conservative in what you send" and all, but now we're being forced to take
steps that we know will increase the number of failures.  We're attempting
to adjust our heuristics to compensate, but that seems like a poor response
compared to making the messages be well specified.

Now, one can add some bit outside of the message to say its 6532... and
then modify everything that exchanges or stores messages to also exchange
and store that bit.  Passing messages to procmail?  Guess we need a new env
var.  Maildrop programs used by smtp servers to pass messages to imap
servers.  Mailing list software.  Mailing list archives.  How you call
spamassassin.  The thread about this during the discussion suggested adding
a new field to the From_ mbox separator.  Guess a new attribute field in
the maildir spec?

> > The problem we're having with 6532 messages, is that we moved from
> > > > explicitly identified charsets via 2047/etc mechanisms, to "its just
> > > > utf8"... and sometimes we mis-detect the utf8 as cp1250 or other
> > > encodings.
> > >
> > > No message created prior to the release of support for RFC 6532 can be
> > > assumed
> > > to be a RFC 6532 message. Now, if you want to vet those messages using
> some
> > > sort of process to insure such a message meets the syntax and at least
> > > looks
> > > semantically sensible, then I suppose you could set the flag in the
> > > metadata.
> > >
> > > But if you can't distinguish such messages from legitimate RFC 6532
> > > created and
> > > submitted by compliant clients, it sounds to me like you're not
> retaining a
> > > really critical piece of envelope/metadata in your implementation.
> > >
>
> > Yes.  And the most obvious place for that information, to me, is in the
> > headers of the message.  Assuming that every mechanism for exchanging
> email
> > messages needs an explicit external piece of data...
>
> Sorry, I'm not going to revisit or defend past design decisions. My point
> was
> and is that when you said that a piece of information was missing, that
> statement was incorrect.
>

I'm saying that requiring the information to be external grossly increases
the development required to support the standard.  I already pointed out
some common tools above.  For us, not having to add a new piece of external
metadata means that all we have to do is upgrade our parser... and validate
how we use addresses and fix hopefully minor issues.  If we have to use
external metadata, then we have 100s of data paths and data stores that
need to be upgraded.

We've also already agreed that leaks happen, which means separating the
metadata from the data itself guarantees that under specified data will
leak.  Making the message itself well specified means that
re-synchronization can take place, that messages can pass through agnostic
mechanisms (whether agnostic by choice or by happenstance) and be
understood on the other side.

You may not like or agree with how this was done. (For that matter, I never
> said I liked or agreed with how it was done.) But for better or worse,
> there's
> now a standard in place, and absent compelling evidence of there being a
> problem with implementing that standard - evidence which AFAICT you have
> not
> provided - it's not appropriate to propose competing mechanisms to that
> standard.
>

I thought implementation feedback was a useful thing, and generally desired
prior to something becoming a standard.  I also thought that internet
standards were generally considered a work in progress... 6532 is standards
track but not a STD.

I also wasn't proposing a competing mechanism, I was proposing that
implementation experience showed, to me, a strong possibility that a
clarification or change to the standard would be beneficial.  Also,
frankly, there is nothing in the standards that say we MUST not do this, so
thanks for the exhortation from authority, I'll take it under advisement.

Frankly, I don't understand this concept of refusing to revisit or defend.
 I tried to find and follow the discussion in the eai wg archives... and to
me, the decision seemed under explored.  The original section spent a lot
of real estate on the importance of such an explicit in message spec, only
to be removed.  I found two threads about it, about equal numbers of people
contributing to either side (like 1-2 on each side), a somewhat heavy
handed dismissal of the need, a call for consensus that passed due mostly
to non-contributors.  Perhaps more took place in meetings, or there were
other discussions that someone could point me to.

Perhaps you can explain to me what 'compelling evidence of there being a
problem implementing the standard' would mean in practice?

Brandon