[mew-dist 20410] Re: IMAP

Hajimu UMEMOTO ume at example.com
2002年 2月 25日 (月) 01:21:42 JST


  梅本@IMASYです。

>>>>> On Sat, 23 Feb 2002 10:08:53 +0900 (JST)
>>>>> Kazu Yamamoto (山本和彦) <kazu at example.com> said:

kazu> cyrus-imap は以下のような謎の挙動をします。

kazu> xxx uid fetch 561:* uid
kazu> * 558 FETCH (UID 560)
kazu> xxx OK Completed

kazu> uid 561 以降を指定しているのに、uid 560 も返す。

kazu> IMAP はアマチュアなのでよく分りませんが、cryus-imapd のバグのような気
kazu> がします。

  2.0.16 および最新版である 2.1.2 で試してみて同じ挙動を示します。
  RFC2060 を見てもよく分からなかったので、info-cyrus で聞いてみました。
「*」は一番大きな UID を指すそうです。
   私は IMAP4 の専門家ではないのでこの答えが妥当なのか評価できません。
直観的には理解しづらい挙動のような気もしますけど。

>>>>> On Sun, 24 Feb 2002 10:56:16 -0500
>>>>> Lawrence Greenfield <leg+ at example.com> said:

leg+> "*" is interpreted as the highest UID number:

leg+>    sequence-num    = nz-number / "*"
leg+>                        ; * is the largest number in use.  For message
leg+>                        ; sequence numbers, it is the number of messages
leg+>                        ; in the mailbox.  For unique identifiers, it is
leg+>                        ; the unique identifier of the last message in
leg+>                        ; the mailbox.

leg+> so the question is what should Cyrus do with:

leg+>    . uid fetch 63956:* flags
leg+>    * 1286 FETCH (FLAGS (\Recent) UID 63955)

leg+> well, it interprets it as:

leg+>    . uid fetch 63956:63955 flags
leg+>    * 1286 FETCH (FLAGS (\Recent) UID 63955)

leg+> which makes sense.

--
梅本 肇 @ インターネット互助会横浜  http://www.imasy.org/~ume/
ume at example.com  ume at example.com  ume@{,jp.}FreeBSD.org
プログラムは書いた人の意図ではなく書かれた通り動く  I hate Modula-3 :-)



Mew-dist メーリングリストの案内