Subject: [c-client with php] imap sorting problem

From: Pierre Laden <[email-masked]>
Date: Wed, 22 Jan 2003 17:38:10 +0100

hi all

hope u can help me
i ve opened a bug on php bug site :
http://bugs.php.net/bug.php?id=21271

we found that this does not imply php and is due only to c-client

i ve got a problem with imap2002x c-client library
this library is used by php to access an imap server

when i use 2002x i m not able to sort messages
i had to "downgrade" to imap2001 for it to work !

is it a known issue ?

my imap server is a bit exotic : it's mailsite email server
http://www.rockliffe.com/products/emailserver.asp

all details on the php bug report

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

---

From: Mark Crispin <[email-masked]>
Date: Wed, 22 Jan 2003 09:36:07 -0800 (PST)

> we found that this does not imply php and is due only to c-client

I read this bug ID, and saw that it mentions the Courier server.  The
Courier server advertises server-based sorting, and consequently any bad
sorting behavior would be due to the server.

It has proven to be impossible to get the author of the Courier server to
fix any bugs in it.

Try adding the undocumented "/loser" flag to the mailbox name, e.g.
	{my.imap.server.com/loser}INBOX
and see if sorting works better for you.  Among other things, "/loser"
tells c-client to disregard the IMAP server's claims to support sorting
and threading, and instead c-client does sorting and threading locally.
This should solve your problem, albeit at a performance cost.

If "/loser" solves your problem, then this is yet another Courier problem.
The best solution is to use a compliant IMAP server, such as UW or Cyrus,
and not use Courier.

-- Mark --

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

---

From: Pierre Laden <[email-masked]>
Date: Wed, 22 Jan 2003 20:08:29 +0100

> sorting behavior would be due to the server.

thx for your so quick answer !

but this occurs with mailsite email server, not with Courier
http://www.rockliffe.com/products/emailserver.asp
it s a nt4 mail server, i m not admin on it but ithk it works well

the difference between the working installation and the non-working one 
is just the version of imap c-client !
when i compile php with imap=imap2001 it works but with imap2002{a-b} it 
doesn't

so i thought that there s a bug in imap2002* that didn t exists in 2001*

am i misunderstanding ?

thx for ur time
Pedro

---

From: Mark Crispin <[email-masked]>
Date: Wed, 22 Jan 2003 12:46:55 -0800 (PST)

> http://www.rockliffe.com/products/emailserver.asp

The original problem was reported with Courier.  As far as the Rockliffe
server goes, I don't know anything about this server.  Unless I am given
access to a system running this server for testing, or at least a
telemetry of the IMAP protocol transactions with the server, I can't say
what is wrong.

Although you should try the "/loser" flag, the fact that it works with
imap-2001 and not more modern versions suggests that it may be a different
problem.

I suspect that the Rockliffe server does not offer server based sorting
(so "/loser" would be ineffective), and the actual problem is in data
access.  Since imap-2002 is a more advanced package than imap-2001, it
makes somewhat more complex demands on the server.  A fully compliant
server would have no problems with this, but it could be that the
Rockliffe server may not fully support IMAP protocol.

However, this is all just speculation until such time as I can either test
with a Rockliffe server or seen a transcript of an IMAP session with the
Rockliffe server that had the problem.

It is conceivable that there is a problem with imap-2002 and Rockliffe is
working fine.  However, there are no known bugs in imap-2002 in this area
that would account for the reported behavior.

That's why I need either access or a session transcript.

-- Mark --