Opened 6 years ago

Closed 6 years ago

#1485283 closed Bugs (fixed)

iil_C_Sort wrongly parses response from courier imap

Reported by: chugadie Owned by:
Priority: 6 Milestone: 0.2-stable
Component: IMAP connection Version: 0.2-alpha
Severity: major Keywords:
Cc:

Description

this code assumes that the server returns messages all on one line

   881     do {
   882         $line = chop(iil_ReadLine($fp, 1024));
   883         if (iil_StartsWith($line, '* SORT')) {
   884             $data .= ($data?' ':'') . substr($line, 7);
   885     } while ($line[0]!='s');

My courier imap server does not, it breaks up the response without reprinting the * SORT prefix, then finally it sense the line that begins with 's OK'...

This code properly sorts my inbox of over 5,000 messages both date up and down.

   881     do {
   882         $line = chop(iil_ReadLine($fp, 8096));
   883         if (iil_StartsWith($line, '* SORT')) {
   884             $data .= ($data?' ':'') . substr($line, 7);
   885             //@@CUSTOMIZED
   886         } else {
   887             if ($line[0] != 's')
   888             $data .= $line;
   889         }
   890     } while ($line[0]!='s');

Change History (3)

comment:1 Changed 6 years ago by alec

  • Milestone changed from later to 0.2-beta

comment:2 Changed 6 years ago by gav

This did not work for my Courier IMAP server. I have not yet done a tcpdump to trace it, but load times were not at all improved.

comment:3 Changed 6 years ago by alec

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [7ae46f2b].

Note: See TracTickets for help on using tickets.