
From sureshkumarallam@gmail.com  Tue Mar  8 23:12:37 2011
Return-Path: <sureshkumarallam@gmail.com>
X-Original-To: lemonade@core3.amsl.com
Delivered-To: lemonade@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id E4F473A683F for <lemonade@core3.amsl.com>; Tue,  8 Mar 2011 23:12:37 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.559
X-Spam-Level: 
X-Spam-Status: No, score=-1.559 tagged_above=-999 required=5 tests=[AWL=2.039,  BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 jblpZ3B1NGI5 for <lemonade@core3.amsl.com>; Tue,  8 Mar 2011 23:12:36 -0800 (PST)
Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by core3.amsl.com (Postfix) with ESMTP id 9BEA23A67E1 for <lemonade@ietf.org>; Tue,  8 Mar 2011 23:12:36 -0800 (PST)
Received: by wwi17 with SMTP id 17so1867894wwi.1 for <lemonade@ietf.org>; Tue, 08 Mar 2011 23:13:49 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=LTFnh8tnrMqi3xfI0g8wexeY5vH26MMYqwXraMT3jIU=; b=f1jEfTCT0cKcplbVPzo9nYXrWS4PlMSw7577ixCET+pALVo/kM7Nwa9gR/6S/n16IG vCsI/9PX9ibs9rTvQsGdzKhaW0bjriH6O4nZh/lK1BtZzzeF5V1BERi60suxk8wdkD// Hfg/6gHs6ZwZqyZAxAjbuAvzcAt8QF7uc8LXc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Cz+ae094FovuzdKfF0qt4X5zSXfUbzufEs5CgsDpOQehGBQvxe//AZtDleYq1OB+cG BR2Rl6eo0/scbI5Gr+v4+MsqFK/0kyXODdadWGup1S6r4RMQsxH61F92xlogFtHPETx8 3HiWCXYUm/goV+X5n7jj0jcnL/jXY0gSVajhA=
MIME-Version: 1.0
Received: by 10.227.202.73 with SMTP id fd9mr1724553wbb.72.1299654829018; Tue, 08 Mar 2011 23:13:49 -0800 (PST)
Received: by 10.227.135.4 with HTTP; Tue, 8 Mar 2011 23:13:49 -0800 (PST)
Date: Wed, 9 Mar 2011 12:43:49 +0530
Message-ID: <AANLkTi=mDsW-yCtXymTYqEAprKWTM2HiBm3vm8sdyvx=@mail.gmail.com>
From: allam sureshkumar <sureshkumarallam@gmail.com>
To: lemonade@ietf.org
Content-Type: multipart/alternative; boundary=00151747531a6a0f15049e07788f
Subject: [lemonade] How to update UNSEEN count in case of an IMAP client which implements Partial Download of Message Headers (i.e, downloading headers chunk by chunk)
X-BeenThere: lemonade@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Enhancements to Internet email to support diverse service enivronments <lemonade.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/lemonade>, <mailto:lemonade-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/lemonade>
List-Post: <mailto:lemonade@ietf.org>
List-Help: <mailto:lemonade-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lemonade>, <mailto:lemonade-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Mar 2011 07:12:38 -0000

--00151747531a6a0f15049e07788f
Content-Type: text/plain; charset=ISO-8859-1

Hi all,

If a client implements Partial Download of Message Headers (i.e, downloading
headers chunk by chunk whenever user requests), how do we update the unread
count in the following two cases:
(Keeping in mind that we cannot get calculate UNSEEN count by traversing
header list because we do not download complete header list)

*
1.When a folder is selected :*
  In SELECT command's response we cannot get the total UNSEEN count (the
UNSEEN count in response gives the sequence number of first occurrence of an
UNSEEN message but not the total unseen).

 I m not sure how and in which case the sequence number of first occurrence
of an UNSEEN msg is useful to any client, instead the total UNSEEN count
would be handy.

*2. During idle updates* *:*
  For example a message header that was not downloaded by Client is being
deleted at server by some other client, then in IDLE update we get the
expunged response,
  but we do not know whether its seen or unseen and hence cannot update the
UNSEEN count.

 Can we get UNSEEN count in IDLE updates whenever UNSEEN count is modified
?  (similar to EXISTS response in idle updates)


One way to handle the above two cases is to send STATUS command to get the
UNSEEN count, but RFC 3501 suggests not to send STATUS command when a folder
is selected.

What RFC 3501 says

*Note: " The STATUS command is intended to access the
status of mailboxes other than the currently selected
mailbox. Because the STATUS command can cause the
mailbox to be opened internally, and because this
information is available by other means on the selected
mailbox, the STATUS command SHOULD NOT be used on the
currently selected mailbox*."

So can you please suggest how to get UNSEEN in the above two cases.

Thanks and Regards,
Suresh Kumar.

--00151747531a6a0f15049e07788f
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi all,<br><br>If a client implements Partial Download of Message Headers (=
i.e, downloading headers chunk by chunk whenever user requests), how do we =
update the unread count in the following two cases:<br>(Keeping in mind tha=
t we cannot get calculate UNSEEN count by traversing header list because we=
 do not download complete header list)<br>
<br><b><br>1.When a folder is selected :</b> <br>=A0 In SELECT command&#39;=
s response we cannot get the total UNSEEN count (the UNSEEN count in respon=
se gives the sequence number of first occurrence of an UNSEEN message but n=
ot the total unseen).<br>
=A0<br>=A0I m not sure how and in which case the sequence number of first o=
ccurrence of an UNSEEN msg is useful to any client, instead the total UNSEE=
N count would be handy.<br><br><b>2. During idle updates</b> <b>:</b><br>=
=A0 For example a message header that was not downloaded by Client is being=
 deleted at server by some other client, then in IDLE update we get the exp=
unged response,<br>




=A0 but we do not know whether its seen or unseen and hence cannot update t=
he UNSEEN count.<br>=A0<br>=A0Can we get UNSEEN count in IDLE updates whene=
ver UNSEEN count is modified ?=A0 (similar to EXISTS response in idle updat=
es)<br>
=A0=A0 <br><br>One way to handle the above two cases is to send STATUS comm=
and to get the UNSEEN count, but RFC 3501 suggests not to send STATUS comma=
nd when a folder is selected.<br>



<br>What RFC 3501 says <br><br><i>Note: &quot; The STATUS command is intend=
ed to access the<br>status of mailboxes other than the currently selected<b=
r>mailbox. Because the STATUS command can cause the<br>mailbox to be opened=
 internally, and because this<br>



information is available by other means on the selected<br>mailbox, the STA=
TUS command SHOULD NOT be used on the<br>currently selected mailbox</i>.&qu=
ot;<br><br>So can you please suggest how to get UNSEEN in the above two cas=
es.<br>
<br>
Thanks and Regards,<br>

Suresh Kumar.<br>

--00151747531a6a0f15049e07788f--

From tss@iki.fi  Wed Mar  9 08:55:58 2011
Return-Path: <tss@iki.fi>
X-Original-To: lemonade@core3.amsl.com
Delivered-To: lemonade@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 4E8043A690B for <lemonade@core3.amsl.com>; Wed,  9 Mar 2011 08:55:58 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.449
X-Spam-Level: 
X-Spam-Status: No, score=-106.449 tagged_above=-999 required=5 tests=[AWL=0.150, BAYES_00=-2.599, 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 uNSWIKJzACtu for <lemonade@core3.amsl.com>; Wed,  9 Mar 2011 08:55:53 -0800 (PST)
Received: from dovecot.org (dovecot.org [62.236.108.70]) by core3.amsl.com (Postfix) with ESMTP id 079643A68CF for <lemonade@ietf.org>; Wed,  9 Mar 2011 08:55:52 -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 42EDBFA8AB4; Wed,  9 Mar 2011 18:57:06 +0200 (EET)
From: Timo Sirainen <tss@iki.fi>
To: allam sureshkumar <sureshkumarallam@gmail.com>
In-Reply-To: <AANLkTi=mDsW-yCtXymTYqEAprKWTM2HiBm3vm8sdyvx=@mail.gmail.com>
References: <AANLkTi=mDsW-yCtXymTYqEAprKWTM2HiBm3vm8sdyvx=@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-15"
Date: Wed, 09 Mar 2011 18:57:05 +0200
Message-ID: <1299689825.19220.531.camel@hurina>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.3 
Content-Transfer-Encoding: 7bit
Cc: lemonade@ietf.org
Subject: Re: [lemonade] How to update UNSEEN count in case of an IMAP client which implements Partial Download of Message Headers (i.e, downloading headers chunk by chunk)
X-BeenThere: lemonade@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Enhancements to Internet email to support diverse service enivronments <lemonade.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/lemonade>, <mailto:lemonade-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/lemonade>
List-Post: <mailto:lemonade@ietf.org>
List-Help: <mailto:lemonade-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lemonade>, <mailto:lemonade-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Mar 2011 16:55:58 -0000

On Wed, 2011-03-09 at 12:43 +0530, allam sureshkumar wrote:

> If a client implements Partial Download of Message Headers (i.e,
> downloading headers chunk by chunk whenever user requests), how do we
> update the unread count in the following two cases:

After SELECTing mailbox, issue SEARCH UNSEEN command and remember which
messages are unseen. Then you can keep the number of unseen messages
up-to-date by updating the list when you get untagged FETCH FLAGS
updates.



From barryleiba.mailing.lists@gmail.com  Wed Mar  9 08:58:18 2011
Return-Path: <barryleiba.mailing.lists@gmail.com>
X-Original-To: lemonade@core3.amsl.com
Delivered-To: lemonade@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 6305F3A6881 for <lemonade@core3.amsl.com>; Wed,  9 Mar 2011 08:58:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -103.124
X-Spam-Level: 
X-Spam-Status: No, score=-103.124 tagged_above=-999 required=5 tests=[AWL=-0.147, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1, 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 3mtsHUunKoag for <lemonade@core3.amsl.com>; Wed,  9 Mar 2011 08:58:17 -0800 (PST)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by core3.amsl.com (Postfix) with ESMTP id 5DD173A691E for <lemonade@ietf.org>; Wed,  9 Mar 2011 08:58:17 -0800 (PST)
Received: by iyj8 with SMTP id 8so878715iyj.31 for <lemonade@ietf.org>; Wed, 09 Mar 2011 08:59:33 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+XJF3p+JC/hHB6yujovm2h2R48s5gEEY3ssTTY2C4jE=; b=HYT9vs6eXQdNrbD7lflEwyNRZatNZPgV1UUGWS09TYMHSgR/5FgJoWgSbYGF7GD6Dx kMlWDnK68xD4C0DKDSi0+6t1RrGo+MycfCUNztAZbhHzjji2xBQNY0q2i1Kf1a9pCi+H S+t7gJZVm6DkoKIBlQTD/6cWHfMi7G3rnH9nk=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Vr5Y5XEdrSiS4fXzxc8T/gYVI+qJE0NqTrRYPaxoBSMPciKFIRWwmMzznkYkLkbq0X K/BwO5wiiaj3aTwqI9Oa4uy6Tz+3vkOxjMTH74RoJ8PkhSVM28J3cZAfKTgT/ks0+/jc vura+ff8Cor/0bD80OH+s1+X1nY/p/peKhBNs=
MIME-Version: 1.0
Received: by 10.42.152.65 with SMTP id h1mr8347042icw.383.1299689973896; Wed, 09 Mar 2011 08:59:33 -0800 (PST)
Sender: barryleiba.mailing.lists@gmail.com
Received: by 10.42.223.1 with HTTP; Wed, 9 Mar 2011 08:59:33 -0800 (PST)
In-Reply-To: <AANLkTi=mDsW-yCtXymTYqEAprKWTM2HiBm3vm8sdyvx=@mail.gmail.com>
References: <AANLkTi=mDsW-yCtXymTYqEAprKWTM2HiBm3vm8sdyvx=@mail.gmail.com>
Date: Wed, 9 Mar 2011 11:59:33 -0500
X-Google-Sender-Auth: 1Qs1Qo6rlDd8IoqIle5vjyxw1Eg
Message-ID: <AANLkTims9VPOStob1G3fVqKapk7i5Cn6F=ws1jUxpM3s@mail.gmail.com>
From: Barry Leiba <barryleiba@computer.org>
To: allam sureshkumar <sureshkumarallam@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: lemonade@ietf.org
Subject: Re: [lemonade] How to update UNSEEN count in case of an IMAP client which implements Partial Download of Message Headers (i.e, downloading headers chunk by chunk)
X-BeenThere: lemonade@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Enhancements to Internet email to support diverse service enivronments <lemonade.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/lemonade>, <mailto:lemonade-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/lemonade>
List-Post: <mailto:lemonade@ietf.org>
List-Help: <mailto:lemonade-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lemonade>, <mailto:lemonade-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 09 Mar 2011 16:58:18 -0000

> =A0I m not sure how and in which case the sequence number of first occurr=
ence
> of an UNSEEN msg is useful to any client, instead the total UNSEEN count
> would be handy.

History: The original idea in IMAP was that the client might show the
user a message list starting at the first (oldest) unseen message and
continuing to newer messages.  Suppose the mailbox has 9,000 messages
and message 8,548 is the first unseen one.  The client might then
fetch information only about messages 8548 to 9000 (perhaps in batches
of 50 or 100).

Whether or not your client (or any you can imagine) might do it that
way, that was the design point.

The way to get the list of unseen messages is to use SEARCH UNSEEN
after SELECT.  There are also extensions to SEARCH (see RFC 4731) that
let you get just the COUNT if you don't want the list.

> 2. During idle updates :
> =A0 For example a message header that was not downloaded by Client is bei=
ng
> deleted at server by some other client, then in IDLE update we get the
> expunged response,
> =A0 but we do not know whether its seen or unseen and hence cannot update=
 the
> UNSEEN count.

If, when you SELECT the mailbox, you do SEARCH UNSEEN and keep track
of which messages are unseen (updating it as your client views the
messages and as you see FLAGS updates from the server), you will
always know which are UNSEEN.  Caching information about the messages
in the selected mailbox is key to an IMAP client's success.

Barry

From sureshkumarallam@gmail.com  Mon Mar 14 00:57:14 2011
Return-Path: <sureshkumarallam@gmail.com>
X-Original-To: lemonade@core3.amsl.com
Delivered-To: lemonade@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 434CB3A6A5C for <lemonade@core3.amsl.com>; Mon, 14 Mar 2011 00:57:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.579
X-Spam-Level: 
X-Spam-Status: No, score=-2.579 tagged_above=-999 required=5 tests=[AWL=1.019,  BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1]
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 emU8JSprnG6s for <lemonade@core3.amsl.com>; Mon, 14 Mar 2011 00:57:13 -0700 (PDT)
Received: from mail-pv0-f172.google.com (mail-pv0-f172.google.com [74.125.83.172]) by core3.amsl.com (Postfix) with ESMTP id 306213A6AAD for <lemonade@ietf.org>; Mon, 14 Mar 2011 00:57:13 -0700 (PDT)
Received: by pve39 with SMTP id 39so1379099pve.31 for <lemonade@ietf.org>; Mon, 14 Mar 2011 00:58:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=rTFfxWXn6sh3Qr0l57xjBVUob4jkugih8JC6U3lLOxk=; b=pm/utwA+VRMhvUJ2ZcvT6QmifLEPoePLPw+ij77B98+Vi1S0eep0qUNraY8VGgGK2T HdLZMV3CwWkzu8yk2Q80d7B7ZU5Qy738RmnkJXAL0u4rna7QgV7PXEmCFLIRlWK5OsZ4 6eWvih2dEWMaR9IfCB6ErPRHmxVNXUVXzcFqc=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Wq0wGTyCeZFh+iJv5wBlTKsaxDZhh7GG3CsC4llVGCqKbBLt/dAI5oBml3zi4zbd8m V+HK0Vn2CyE5FlT6ARCXRz9zTF8vpB9Obw+htdI4WSnOqaZnz+2XOOhJE40yxl6F2MzQ ccP7BkZEo99gnwr9RhqDKlSZ1lRSirWzhGsoU=
MIME-Version: 1.0
Received: by 10.142.150.34 with SMTP id x34mr1806652wfd.374.1300089516524; Mon, 14 Mar 2011 00:58:36 -0700 (PDT)
Received: by 10.142.43.18 with HTTP; Mon, 14 Mar 2011 00:58:36 -0700 (PDT)
In-Reply-To: <AANLkTimYxt6jrLtu7ZjpVCyBWm+a-QU737fSiy13qCS0@mail.gmail.com>
References: <AANLkTi=mDsW-yCtXymTYqEAprKWTM2HiBm3vm8sdyvx=@mail.gmail.com> <AANLkTims9VPOStob1G3fVqKapk7i5Cn6F=ws1jUxpM3s@mail.gmail.com> <AANLkTimYxt6jrLtu7ZjpVCyBWm+a-QU737fSiy13qCS0@mail.gmail.com>
Date: Mon, 14 Mar 2011 13:28:36 +0530
Message-ID: <AANLkTimXnH6iMJiT+TaHQ+d+YAbHWTN_ic+ozcczQY2W@mail.gmail.com>
From: allam sureshkumar <sureshkumarallam@gmail.com>
To: lemonade@ietf.org
Content-Type: multipart/alternative; boundary=000e0cd28d68cf03c2049e6cad0a
Subject: Re: [lemonade] How to update UNSEEN count in case of an IMAP client which implements Partial Download of Message Headers (i.e, downloading headers chunk by chunk)
X-BeenThere: lemonade@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Enhancements to Internet email to support diverse service enivronments <lemonade.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/lemonade>, <mailto:lemonade-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/lemonade>
List-Post: <mailto:lemonade@ietf.org>
List-Help: <mailto:lemonade-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/lemonade>, <mailto:lemonade-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 14 Mar 2011 07:57:14 -0000

--000e0cd28d68cf03c2049e6cad0a
Content-Type: text/plain; charset=ISO-8859-1

+lemonade@ietf.org

On Mon, Mar 14, 2011 at 1:23 PM, allam sureshkumar <
sureshkumarallam@gmail.com> wrote:

> Hi ,
>
> Firstly, thank you for your valuable suggestions.
>
>  SEARCH UNSEEN i think is a good idea , but the problem is
>     1. Gmail  does not update the client about the FETCH FLAG updates.
> (Gmail's IDLE, updates only about new mails and expunges)
>     2. ESEARCH capability is not being advertised by Gmail.
>
> (AOL supports above two features, but most people use GMAIL :-( ).
>
> Considering the above two problems ,
> What do you think is a better way to get UNSEEN count.
> a. SEARCH UNSEEN and then count all the messages in response to get total
> UNSEEN
>           (or)
> b. send STATUS command
>
>
> If we assume that gmail supports ESEARCH in future, in this case what do u
> think is a better way to get UNSEEN count
> a. SEARCH RETURN (COUNT) UNSEEN
>         (or)
> b. send STATUS command.
>
> (or is there any alternative way (apart from the above two) to get UNSEEN
> count)
>
> (Note: We cache the message header information of the messages when the
> user scrolls down to view older messages, but
>  we don't cache *all* the UNSEEN uids because, we will have an overhead of
> keeping these unseen uids updated for any change from client or from
> server).
>
>
> Thanks and Regards,
> Suresh Kumar.
>
> On Wed, Mar 9, 2011 at 10:29 PM, Barry Leiba <barryleiba@computer.org>wrote:
>
>> >  I m not sure how and in which case the sequence number of first
>> occurrence
>> > of an UNSEEN msg is useful to any client, instead the total UNSEEN count
>> > would be handy.
>>
>> History: The original idea in IMAP was that the client might show the
>> user a message list starting at the first (oldest) unseen message and
>> continuing to newer messages.  Suppose the mailbox has 9,000 messages
>> and message 8,548 is the first unseen one.  The client might then
>> fetch information only about messages 8548 to 9000 (perhaps in batches
>> of 50 or 100).
>>
>> Whether or not your client (or any you can imagine) might do it that
>> way, that was the design point.
>>
>> The way to get the list of unseen messages is to use SEARCH UNSEEN
>> after SELECT.  There are also extensions to SEARCH (see RFC 4731) that
>> let you get just the COUNT if you don't want the list.
>>
>> > 2. During idle updates :
>> >   For example a message header that was not downloaded by Client is
>> being
>> > deleted at server by some other client, then in IDLE update we get the
>> > expunged response,
>> >   but we do not know whether its seen or unseen and hence cannot update
>> the
>> > UNSEEN count.
>>
>> If, when you SELECT the mailbox, you do SEARCH UNSEEN and keep track
>> of which messages are unseen (updating it as your client views the
>> messages and as you see FLAGS updates from the server), you will
>> always know which are UNSEEN.  Caching information about the messages
>> in the selected mailbox is key to an IMAP client's success.
>>
>> Barry
>>
>
>

--000e0cd28d68cf03c2049e6cad0a
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

+<a href=3D"mailto:lemonade@ietf.org">lemonade@ietf.org</a><br><br><div cla=
ss=3D"gmail_quote">On Mon, Mar 14, 2011 at 1:23 PM, allam sureshkumar <span=
 dir=3D"ltr">&lt;<a href=3D"mailto:sureshkumarallam@gmail.com">sureshkumara=
llam@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin: 0pt 0pt 0pt 0.8ex; borde=
r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi ,<br><br>First=
ly, thank you for your valuable suggestions.<br><br>=A0SEARCH UNSEEN i thin=
k is a good idea , but the problem is<br>
=A0=A0=A0 1. Gmail=A0 does not update the client about the FETCH FLAG updat=
es. (Gmail&#39;s IDLE, updates only about new mails and expunges)<br>
=A0=A0=A0 2. ESEARCH capability is not being advertised by Gmail.<br>=A0 <b=
r>(AOL supports above two features, but most people use GMAIL :-( ).<br><br=
>Considering the above two problems ,<br>What do you think is a better way =
to get UNSEEN count.<br>

a. SEARCH UNSEEN and then count all the messages in response to get total U=
NSEEN <br>=A0=A0=A0=A0 =A0 =A0=A0 (or)<br>b. send STATUS command <br><br><b=
r>If we assume that gmail supports ESEARCH in future, in this case what do =
u think is a better way to get UNSEEN count<br>

a. SEARCH RETURN (COUNT) UNSEEN <br>=A0 =A0 =A0 =A0 (or)<br>b. send STATUS =
command.<br><br>(or is there any alternative way (apart from the above two)=
 to get UNSEEN count)<br><br>(Note: We cache the message header information=
 of the messages when the user scrolls down to view older messages, but <br=
>

=A0we don&#39;t cache <b>all</b> the UNSEEN uids because, we will have an o=
verhead of keeping these unseen uids updated for any change from client or =
from server).<div class=3D"im"><br><br>Thanks and Regards,<br>Suresh Kumar.=
<br>
<br></div><div><div></div><div class=3D"h5"><div class=3D"gmail_quote">
On Wed, Mar 9, 2011 at 10:29 PM, Barry Leiba <span dir=3D"ltr">&lt;<a href=
=3D"mailto:barryleiba@computer.org" target=3D"_blank">barryleiba@computer.o=
rg</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"marg=
in: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-l=
eft: 1ex;">

<div>&gt; =A0I m not sure how and in which case the sequence number of firs=
t occurrence<br>
&gt; of an UNSEEN msg is useful to any client, instead the total UNSEEN cou=
nt<br>
&gt; would be handy.<br>
<br>
</div>History: The original idea in IMAP was that the client might show the=
<br>
user a message list starting at the first (oldest) unseen message and<br>
continuing to newer messages. =A0Suppose the mailbox has 9,000 messages<br>
and message 8,548 is the first unseen one. =A0The client might then<br>
fetch information only about messages 8548 to 9000 (perhaps in batches<br>
of 50 or 100).<br>
<br>
Whether or not your client (or any you can imagine) might do it that<br>
way, that was the design point.<br>
<br>
The way to get the list of unseen messages is to use SEARCH UNSEEN<br>
after SELECT. =A0There are also extensions to SEARCH (see RFC 4731) that<br=
>
let you get just the COUNT if you don&#39;t want the list.<br>
<div><br>
&gt; 2. During idle updates :<br>
&gt; =A0 For example a message header that was not downloaded by Client is =
being<br>
&gt; deleted at server by some other client, then in IDLE update we get the=
<br>
&gt; expunged response,<br>
&gt; =A0 but we do not know whether its seen or unseen and hence cannot upd=
ate the<br>
&gt; UNSEEN count.<br>
<br>
</div>If, when you SELECT the mailbox, you do SEARCH UNSEEN and keep track<=
br>
of which messages are unseen (updating it as your client views the<br>
messages and as you see FLAGS updates from the server), you will<br>
always know which are UNSEEN. =A0Caching information about the messages<br>
in the selected mailbox is key to an IMAP client&#39;s success.<br>
<font color=3D"#888888"><br>
Barry<br>
</font></blockquote></div><br>
</div></div></blockquote></div><br>

--000e0cd28d68cf03c2049e6cad0a--
