Re: [imap5] Feature set? - was Re: Designing a new replacement protocol for IMAP

Bron Gondwana <brong@fastmail.fm> Sun, 19 February 2012 23:39 UTC

Return-Path: <brong@fastmail.fm>
X-Original-To: imap5@ietfa.amsl.com
Delivered-To: imap5@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A854021F8493 for <imap5@ietfa.amsl.com>; Sun, 19 Feb 2012 15:39:06 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.548
X-Spam-Level:
X-Spam-Status: No, score=-3.548 tagged_above=-999 required=5 tests=[AWL=0.051, BAYES_00=-2.599, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AW3+SPlaMF8C for <imap5@ietfa.amsl.com>; Sun, 19 Feb 2012 15:39:05 -0800 (PST)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by ietfa.amsl.com (Postfix) with ESMTP id 9414821F845F for <imap5@ietf.org>; Sun, 19 Feb 2012 15:39:05 -0800 (PST)
Received: from compute5.internal (compute5.nyi.mail.srv.osa [10.202.2.45]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 44697212D2 for <imap5@ietf.org>; Sun, 19 Feb 2012 18:39:05 -0500 (EST)
Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160]) by compute5.internal (MEProxy); Sun, 19 Feb 2012 18:39:05 -0500
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.fm; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=mesmtp; bh=GpUgcf8ZUQP2o+Hn4iCZU6jK bRM=; b=S9eY+Y8f44+Dwra9JofDq2/fsyGIgt/thWNIgHmyjpoltH7Q34Jp0OgG KBgMiFv26ibQv5mPdqqLwVPMt10zuz4OYD+4N9Du4PDRC4I+WlKD/iWbBWMZkJBV Ty5M8WrYLLYJSOBf3xh8wZw9Xfkfr/NsBohpxZow6W6y8bZqzj8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:in-reply-to; s=smtpout; bh=GpUgcf8ZUQP2o+Hn4iCZU6jKbRM=; b=B0Dwzp1z4KFsZc9TTdc4cmSPrmsE tIPWjPvYKASJ2CHxxMcnDVB8I5JAnAMJehxntU2eCr49hfTySRmm4bmiITZHnZVB iLA5RHB7BGo3Cfs5v8oQLCp29e+TcpvxJ2x3k+nSZL5XRpGtrOrq/GylZXp9Iq1z cbXQ/sa9Q7ghXVo=
X-Sasl-enc: /OlGJZATqjjuJEuPrv5ISxZWc4kwrPckkaLxXiv/nLdF 1329694744
Received: from localhost (99.249.9.46.customer.cdi.no [46.9.249.99]) by mail.messagingengine.com (Postfix) with ESMTPSA id CFC118E0204; Sun, 19 Feb 2012 18:39:04 -0500 (EST)
Received: by localhost (Postfix, from userid 1000) id B06F8316B81; Mon, 20 Feb 2012 00:39:01 +0100 (CET)
Date: Mon, 20 Feb 2012 00:39:01 +0100
From: Bron Gondwana <brong@fastmail.fm>
To: Adrien de Croy <adrien@qbik.com>
Message-ID: <20120219233901.GA13600@launde.brong.net>
References: <alpine.LSU.2.00.1202161626400.30682@hermes-2.csi.cam.ac.uk> <4F3D6E57.8010301@qbik.com> <alpine.LSU.2.00.1202171127330.30682@hermes-2.csi.cam.ac.uk> <4F3F4F8F.3040601@qbik.com> <1329550573.30138.140661038121885@webmail.messagingengine.com> <alpine.LSU.2.00.1202191832430.12769@hermes-2.csi.cam.ac.uk> <20120219192604.GA11323@launde.brong.net> <4F415C07.3040100@qbik.com> <20120219220835.GB12549@launde.brong.net> <4F417EF5.6030809@qbik.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <4F417EF5.6030809@qbik.com>
Organization: brong.net
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: "Discussion on drastically slimming-down IMAP." <imap5@ietf.org>, Arnt Gulbrandsen <arnt@gulbrandsen.priv.no>
Subject: Re: [imap5] Feature set? - was Re: Designing a new replacement protocol for IMAP
X-BeenThere: imap5@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Discussion on drastically slimming-down IMAP." <imap5.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/imap5>, <mailto:imap5-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/imap5>
List-Post: <mailto:imap5@ietf.org>
List-Help: <mailto:imap5-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/imap5>, <mailto:imap5-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 19 Feb 2012 23:39:06 -0000

On Mon, Feb 20, 2012 at 12:00:05PM +1300, Adrien de Croy wrote:
> that depends on how your system is structured.  The MTAs I'm
> familiar with put files into their send queues, and specify
> envelopes separately, either in a separate file or in a DB or
> something..

Unless you're putting the pre-exiting file from store into
the queue by reference rather than by copying, you would do
the rewrite as you copy.

Putting it in the queue by reference means you will have to
guarantee that the original mailbox copy doesn't get
expunged until the send has finished.
 
> What is the concern about sending the parameters?

Basically the \Sent things below.

> the main use-case I can think of where the recipients and
> return-path are not normally in the message are in lists.  So with
> your system, you won't be able to have an efficient list processor
> attach to an IMAP message store.  It will need to make copies of the
> message for each recipient.

I wouldn't expect an efficient list processor to be a user-facing
client.  Hence it would obviously talk directly, probably LMTP, to
the MTA.

> Another problem is auto-responders, where commonly you specify a
> blackhole or empty return path to avoid loops.

Not a user client.

> You'll at least need a way to update certain headers into the
> message efficiently.  This would make for much more efficient
> forwarding as well... copy, rewrite To, Subject and send.  Rather
> than download, edit, upload send.  Maybe store the headers
> separately.

Lemonade style CATENATE.

> Honestly I haven't fully convinced myself either way yet.  I am
> quite nervous about such a wide-reaching change though.

So am I.  But your arguments are convincing me more that I'm right.
The cases you're coming up with are all "agents running on the
server doing non-user-client things" or "we don't support a way to
strip headers from a message when sending".

The "we don't support a way to strip headers" is the closest to a
viable argument I've heard so far, but that's an egg I think is
worth breaking in exchange for a really clear model about who a
message was sent to.  You read the headers, you know.  The \Sent
flag has a really specific meaning - and it takes an actively
malicious client to break that.  The theoretical "moron" will
get it right, because getting it wrong is a lot more work.

> I must be missing something.  AFAIK the common case that happens all
> the time is that you specify forward and reverse paths separately
> from the message content.

Yes, you do.

> You're proposing removing this.

Yes, I am.

> I'm still open to the option, but there are a myriad of consequences
> that haven't been touched on.
> 
> Most MUAs can and will still ensure the parameters match the
> headers.  Other software may have other requirements.  You're just
> saying they will need to use SMTP.  Fine, but that doesn't move us
> forward.

I'm saying this is a protocol for MUAs to talk to mail stores.  That's
all.  It does not replace SMTP, it does not replace LMTP.  It provides
a submission path for MUAs that can and will and want to make the
parameters match because the message on the server is a record of what
was sent.

> >Make the easy things EASY and the
> >hard things possible, not everything equally hard.
> sure.  I just don't think it's hard to have a command like
> 
> SEND UID forward-path reverse-path
> 
> In fact I'd be keen on something like
> 
> SENDFLAGANDMOVE UID +\Sent "Sent Items" forward-path reverse-path
> 
> to avoid magic which you're otherwise doing with your Sent flag.

The magic is a latch.  The latch is a protection against replay.
I'd rather see "SENDFLAGANDMOVE" as a composition of simpler commands
which can be composed than one funny-shaped lego block, so when you
want to add something else to your chain, you don't need to do
anything else.

Which would make it "MOVE (IFNOT (FLAGS (\Sent)) (REPLACEHEADERS (Envelope-To: forward-path Envelope-From: return-path) +FLAGS (\Sent) DELIVER) UID "Sent Items"

Looks a bit nasty in this syntax for sure.  But that's non-magic
then, it's a transaction including the various changes.  I would
infinitely prefer this to actual magic.  But I think side effects
on taking an action are significantly preferable to side effects
on reading.  The same way that a "STORE +FLAGS" has an implicit
side-effect of bumping the MODSEQ on the message, and you can do
an UNCHANGEDSINCE to latch that too.

> The final point I'd make about obtaining the forward path from the
> message vs a parameter.
> 
> If you're parsing the To, CC, BCC headers, you need to be able to
> parse all character sets (there are many) in a completely
> bullet-proof fashion.

Now that's a better argument than anything else I've seen so far.

The flip side is, you're going to have to parse them to search and
sort on them as well - so the code already exists in your server
if it's even vaguely complete.

Bron.