Subject: mixing different versions of imap-server and imap-utils

From: Jose Luis Rodriguez Garcia <[email-masked]>
Date: Fri, 12 Dec 2003 01:53:53 +0100

My SO is RedHatLinux Advanced Server 2.1
It includes UWIMAP release called IMAP-2001a-10.0as
I wish to use mbx , but the problem is the next: RedHat distribution 
doesn't include imap-utils, and
therefore tmail, and mbxcvt (I need this one for migrate serveral 
mailboxes from a SCO).

I am thinking in compile imap-utils for the two commands mentioned above 
(tmail and mbxcvt)
My questions:
1 Can I use the actual version imap-utils with my installed IMAP 
version.? I think that it must be
possible, becuase the backwards compatibility of mbx is guaranteed.
2 If it is not possible where can I obtain a version compatible of 
imap-utils with my IMAP version.

Reemplaze the IMAP server with the actual version is not a option for 
me, because it won't be
supported by RedHat.

The only strange thing in my configuration is: /etc/c-client.cf

I accept the risk
set new-folder-format mbx
set mail-subdirectory mail
set allow-reverse-dns 0

I know that it is discouraged to use c-client.cf, but it is my only 
option if I want to use the supported
version of IMAP that provides RedHat. (I know that the compiled tmail 
and mbxcvt won't be supported).

Regards

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: "Khoa Vo" <[email-masked]>
Date: Fri, 12 Dec 2003 15:24:08 +0700

Hi,

I used the c-client library to write new email service (on Outlook2000
Corporate mode), connecting to server using IMAP4 protocol. The
synchronization chosen is the disconnected mode: data  is retrieved and
stored locally, then mail's properties (like flags, priority,
read/unread,etc) will be updated whenever any change on the server is
detected.

I found the c-client library does not support the IDLE command, so I could
not get the server inform new changes. The way I did:
-New mail checking: using the response of the SELECT command and comparing
the uid validity and the number of mails in each folder.
-Changes to existing mail, or mails deleted: I can do this by comparing
mail-by-mail, folder-by-folder. This is very slow.

What I need now is a implementation way that the server informs the client
every update to a certain mailbox that the client has access permission.
Currently I only know that the IDLE command can do that.
If anyone has ever worked on this, please help to tell me?
-Is the IDLE command supported in a certain version of c-client library?
-If not, has c-client library been extended to support IDLE command by a
designer, which is not included to the formal library? Can I use that
library?
-Is there any way other than using the IDLE command? How to implement that?

Any help would be much appreciated.
Thanks,
Khoa

---

From: Mark Crispin <[email-masked]>
Date: Fri, 12 Dec 2003 02:22:00 -0800 (PST)

All IMAP commands will inform you of updates to the selected mailbox.
IDLE is simply a way of being informed without doing a command.

So, all you need to do in order to stay informed of updates to the mailbox
is to do any command.  If you do not have any command to do, you can do
the NOOP command.  The mail_ping() function will do a NOOP.

NOOP does nothing, but it is a command, and all IMAP commands return
updates.

If an application is not otherwise doing anything to the server, it
generally executes the mail_ping() function every 1 to 3 minutes.

In other words, something like:
	while (nothing_to_do) {
	  mail_ping (stream);
	  sleep (60);
	}
is very close in function to IDLE.

Of course, if the application is doing other IMAP commands, it does not
need to do NOOP with mail_ping().  mail_ping() is only needed if the
application is not doing anything.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

---

From: "Khoa Vo" <[email-masked]>
Date: Fri, 12 Dec 2003 17:35:58 +0700

Hi Mark,

My purpose is to have the server inform me only new changes. For example, in
my mail box on server there is one new mail just arrived, and three among
1000 email have changed status to 'read'. Using the IDLE command, and keep
the connection alive, the server will inform any change to that mailbox
using the current connection.
I don't want to scan folder-by-folder, mail-by-mail to detect changes made
to mail items on the server, and update to the mail items on client machine.

Is there any way to do that?

Regards,
Khoa

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]]On Behalf Of Mark Crispin
Sent: Friday, December 12, 2003 5:22 PM
To: Khoa Vo
Cc: [email-masked]
Subject: Re: implement the IDLE command

-- Mark --

---

From: Mark Crispin <[email-masked]>
Date: Fri, 12 Dec 2003 11:21:58 -0800 (PST)

> using the current connection.

The procedure which I outlined, in which you do a NOOP every so often, is
functionally identical to IDLE.

IDLE does not do anything different.  It just saves you from having to
send a NOOP every so often.  Instead of sending a NOOP every 2 minutes,
you send an IDLE every 29 minutes.

> to mail items on the server, and update to the mail items on client machine.

Even with IDLE, you are never informed about changes to a mailbox that is
not SELECTED.  So I do not understand your "scan folder-by-folder"
argument.

-- Mark --

---

From: "Khoa Vo" <[email-masked]>
Date: Mon, 15 Dec 2003 10:15:14 +0700

Hi Mark,

Thanks for your answers. I would like to detail the situation:
I have two clients connecting to the same mailbox on the IMAP server:
-One is Windows client, synchronize with server using disconnected mode:
copies of every folder/mail item are stored locally, and updated if
something changed on the server.
-The other is Web client, synchronize with server using online mode.

At time t1, the web client create a new folder F1
At time t2, web client creates a new folder F2
At time t3, web client deletes a few mail items: m1&m2 in folder INBOX
At time t4, web client selects some mail items, and change their status from
'unread' to 'read' : m3&m4&m5 in folder  INBOX

If the client open the IDLE command, keeping the connection alive, and
listening to that connection, the server will tell the client every changes
made to that mailbox on the server. For example server will tell the window
client that m1&m2 are deleted, etc.

Do you know someone who has implmented the IDLE command? Or any other way to
get the server inform us new changes?

Regards,
Khoa

-----Original Message-----
From: [email-masked]
[mailto:[email-masked]]On Behalf Of Mark Crispin
Sent: Saturday, December 13, 2003 2:22 AM
To: Khoa Vo
Cc: [email-masked]
Subject: RE: implement the IDLE command

-- Mark --

---

From: Mark Crispin <[email-masked]>
Date: Sun, 14 Dec 2003 20:37:52 -0800 (PST)

> client that m1&m2 are deleted, etc.

You will get the same behavior if the client opens a session, and every
minute or two issues a NOOP command.  You can call mail_ping() in c-client
to do this.

-- Mark --