Subject: Notes server hangs while mail_sort

From: "Alex Shvedov" <[email-masked]>
Date: Sat, 21 Aug 1999 22:03:48 -0400

UID SORT is not part of IMAP standard, but is still available as
part of c-client. If some driver doesn't provide sorting,
c-client is smart enough to use SEARCH which is part of IMAP
standard and then sorts message numbers on-site.

Version 4.6 of Domino IMAP4 server does not provide sorting on
the server side, its capability response is just "IMAP4rev1".
When I call mail_sort from the client, it sends SEARCH, not SORT,
to the server, but then the server hangs forever, and the client
is waiting in vain in tcp_getdata (see loginfo.txt attached).

What can be wrong? This same code was tested against
c-client-based imapd with imap_sort disabled (nullified) on the
client side; it also used SEARCH, but it worked fine!

I use imap toolkit version 4.4 on AIX.

Any ideas?

-- 
------------------------------------------------------------------
 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: Sat, 21 Aug 1999 19:29:00 -0700 (Pacific Daylight Time)

On Sat, 21 Aug 1999, Alex Shvedov wrote:
> What can be wrong?

What kind of SEARCHPGM are you supplying to be doing all those ORs?
It's probably a server bug that it hangs with such an absurd search, but
how/why are you generating it?

---

From: "Alex Shvedov" <[email-masked]>
Date: Sun, 22 Aug 1999 12:31:00 -0400

> how/why are you generating it?

I need to sort by ARRIVAL amongst messages that have one of up to
10 given words in FROM, like

        <gimme ordered list of mail from "Alex" or "Crispen" or
"Karsten">

The list of words to be searched in FROM may be empty ("sort all"
situation).

Since IMAP allows me to OR only 2 arguments (RFC2060, p.39), I
have to build a tree of 1+2+4+8+16 search programs, 1+2+4+8 of
which serve the only purpose of ORing, 6 of the lower-level 16
are to be plugged in somehow and only 10 of these 16 are actually
used.

As you see, 16 appears here only because 8<10.

Question 1: does anyone know any other way of ORing?

Problems:
1. how to deal with "sort all".
2. how to fill in 6 fake programs;

Problem 1. In "sort all" case all 16 programs are to be trivial.
I tried empty program (ALL FROM "") and found out that it works
fine with c-client based imapd of 12.254 version (AA FROM ""
returns all messages), but not with 10.190 or 10.223 versions
(ALL FROM "" returns 0 messages).

So I have to use some other triviality instead of ALL FROM "" in
"sort all" case; I've chosen

        ALL LARGER 1

as something that's always true.

Later I found out that Domino 4.6 replies "NO SEARCH Searching by
size (SMALLER, LARGER) is not supported" (!!!), but that's
another story, which simply indicates that Domino 4.6 is NOT 100%
IMAP4r1.

Question 2: if my tree ORing scheme has no alternatives, what to
use in all 16 programs in "sort all" case?

Problem 2. Actually, it's solution depends on solution of Problem
1, because if I have at least 1 word to search for, I just put
the first word I have in all 16 programs, so if I want all
messages from Marc or Alex,
I search for Marc|Alex|Marc|Marc|...|Marc (1 time Alex and 15
times Marc).

Related question 3: is there any way to put a wildcard in a
search program? Neither * nor % work.

Another story once again: Domino 4.6 proved to be not 100% IMAP,
that's why it hangs on my search program of ORing depth equal to
4. I think it's a bug.

Domino's reply to CAPABILITY is "IMAP4rev1". Terse.

I didn't try Domino 5.0.