On Fri, 9 Jul 2004, RYAN vAN GINNEKEN wrote:
>This is a repost of an archived message as i am having the same problems
>and just wondered if anyone came up with a solution. As setting
>squirrel mail to US-ASCII is not recommended and does not seem to solve
>things.
Here's something you can post to the Squirrelmail list. A protocol dump
between Binc IMAP and Squirrelmail 1.4.1. Short version: A bug in
Squirrelmail.
C: A049 UID SEARCH CHARSET ISO-8859-1 ALL SUBJECT {8}
S: + ok, send 8 bytes of data.
C: bincimap
S: A049 NO SEARCH failed: [BADCHARSET ("US-ASCII")]
This means that Binc doesn't support other character sets than US-ASCII.
Now, Squirrelmail actually does the correct thing, it reissues the search
using the US-ASCII charset:
C: A050 SEARCH CHARSET "US-ASCII" ALL SUBJECT {8}
^^^
But the UID SEACH from the first query has become a regular SEARCH in the
meantime. This is the bug.
S: + ok, send 8 bytes of data
C: bincimap
S: * SEARCH 507 512 515 530 532 533 673 734 736 737 738 739 766 768 830 831 862 863
864 866 867 925 926 957
S: A050 OK SEARCH completed
C: A051 UID FETCH
507,512,515,530,532:533,673,734,736:739,766,768,830:831,862:864,866:867,925:926,957
(FLAGS UID RFC822.SIZE BODY.PEEK[HEADER.FIELDS (Date To Cc From Subject X-Priority
Content-Type)])
Now, Squirrelmail uses UID FETCH with the sequence numbers it got from the
reissued SEARCH. This makes Binc IMAP report a list of messages that most
likely didn't at all match the query.
Andy ;-)
--
Andreas Aardal Hanssen | http://www.andreas.hanssen.name/gpg
Author of Binc IMAP | "It is better not to do something
http://www.bincimap.org/ | than to do it poorly."