Re: [MORG] New draft at MORG: POP3 LIST+ Extension

Timo Sirainen <tss@iki.fi> Fri, 04 February 2011 18:39 UTC

Return-Path: <tss@iki.fi>
X-Original-To: morg@core3.amsl.com
Delivered-To: morg@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id A74193A69CF for <morg@core3.amsl.com>; Fri, 4 Feb 2011 10:39:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.299
X-Spam-Level:
X-Spam-Status: No, score=-106.299 tagged_above=-999 required=5 tests=[AWL=-0.300, BAYES_00=-2.599, J_CHICKENPOX_43=0.6, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hKy7hN6bXvtJ for <morg@core3.amsl.com>; Fri, 4 Feb 2011 10:39:36 -0800 (PST)
Received: from dovecot.org (dovecot.org [62.236.108.70]) by core3.amsl.com (Postfix) with ESMTP id 7693B3A694A for <morg@ietf.org>; Fri, 4 Feb 2011 10:39:36 -0800 (PST)
Received: from [192.168.100.43] (a91-153-29-233.elisa-laajakaista.fi [91.153.29.233]) by dovecot.org (Postfix) with ESMTP id 79E1CFA8B6C; Fri, 4 Feb 2011 20:43:01 +0200 (EET)
From: Timo Sirainen <tss@iki.fi>
To: Steffen Lehmann <lehmann@strato-rz.de>
In-Reply-To: <4D4ACA2A.3080401@strato-rz.de>
References: <4D4ACA2A.3080401@strato-rz.de>
Content-Type: text/plain; charset="ISO-8859-15"
Date: Fri, 04 Feb 2011 20:43:01 +0200
Message-ID: <1296844981.18488.385.camel@hurina>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3
Content-Transfer-Encoding: 7bit
Cc: morg@ietf.org
Subject: Re: [MORG] New draft at MORG: POP3 LIST+ Extension
X-BeenThere: morg@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Messaging Organization <morg.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/morg>, <mailto:morg-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/morg>
List-Post: <mailto:morg@ietf.org>
List-Help: <mailto:morg-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/morg>, <mailto:morg-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 04 Feb 2011 18:39:37 -0000

> POP3 clients using the LIST command, and,
>    immediately followed, the UIDL command to get the Message Number,
>    Message Size and Unique-ID, of all messages of a mailbox, to see if
>    new messages have arrived.  On large mailboxes, holding hundreds or
>    thousands of mails, this causes serious resource consumption on the
>    server, and will prolong the duration a mailbox is hold in locked
>    state.  This situation is even stressed by the fact that POP3 clients
>    will usually poll a mailbox for new messages periodically in short
>    intervals.

I agree with the above, but

> Using the LIST+ Extension, a server has to scan through the mailbox
>    only for a single time, and can send the Message Number, Message Size
>    and Unique-ID in a more compact form to the client (as shown in
>    Appendix A.2.1).

I don't see this helping all that much with the server's resource
consumption or even much with the client's bandwidth consumption. The
server still has to look up all the sizes and UIDLs. In Appendix A the
client downloads 22% less.

Most of the time POP3 clients just poll an unchanged mailbox. It would
be possible to get a much more dramatic bandwidth improvement by being
able to tell clients that nothing had changed since the last time.
Here's an example of how it could work:

Client connecting for the first time:

   C: LIST +UIDL
   S: +OK 14758f1afd44c09b7992073ccf00b43d 3 messages, listing follows:
   S: 1 4536 7abcb6f4da22080e121f2824aef2be9a
   S: 2 4422 577151e65ea4e62bb9b1c5830a818fe7
   S: 3 3828 2fe542ac6d1c29bb6a5161558f527e2e
   S: .

Client connecting the second time when there are no changes:

   C: LIST +UIDL +ID=14758f1afd44c09b7992073ccf00b43d
   S: +OK 14758f1afd44c09b7992073ccf00b43d No changes
   S: .

Client connecting the 3rd time when there are changes:

   C: LIST +UIDL +ID=14758f1afd44c09b7992073ccf00b43d
   S: +OK ddd2cae8a4a5ec890737d07adb537b99 4 messages, listing follows:
   S: 1 4536 7abcb6f4da22080e121f2824aef2be9a
   S: 2 4422 577151e65ea4e62bb9b1c5830a818fe7
   S: 3 3828 2fe542ac6d1c29bb6a5161558f527e2e
   S: 4 3284 86519edbbe78d203c5c9618df50b21a7
   S: .

So, the client would just remember the value after the "OK". The server
can use whatever value it wants there, but one simple possibility would
be to just use a hash(all UIDLs).

This could be made to save more bandwidth by allowing server to send
only changes based on the given ID, such as:

   C: LIST +UIDL +ID=14758f1afd44c09b7992073ccf00b43d
   S: +OK ddd2cae8a4a5ec890737d07adb537b99 1 new message:
   S: 4 3284 86519edbbe78d203c5c9618df50b21a7
   S: .

Deleted messages could also be reported by adding more complexity.

> The +UNREAD Flag requests to add the number of whole days, since the
>    message was read for last time, to the extended scan listing.

What exactly is the "last read time" for a message? RETR time? When it
was marked as \Seen in webmail/IMAP?