[imp] imp questions (usability issues)

Jeff Tucker jefft@wciatl.com
Mon, 15 Oct 2001 10:23:13 -0400


--On Monday, October 15, 2001 7:15 AM -0700 Max Kalika <max@lsit.ucsb.edu> 
wrote:

> Quoting Jeff Tucker <jefft@wciatl.com>:
>
>> For some reason, Courier is letting me search for imp without quotes but
>> not [imp]. However, I think the real problem is that c-client/imp should
>> be quoting all strings. Unless I've just got this totally screwed up.
>
> That is really strange.  IMP does indeed quote strings:
>
>      if (!empty($HTTP_POST_VARS['search_subject']))
>          $query .= ' SUBJECT "' . Horde::getFormData('search_subject') .
> '"';
>

Hmm, it gets stranger by the minute. Here's what I'm seeing from a tcpdump 
lo.

0x0000   4500 006c b1a4 4000 4006 8117 d81b abcc        E..l..@.@.......
0x0010   d81b abcc 8f19 008f 236a c520 23c5 8b01        ........#j..#...
0x0020   8018 7fff fa18 0000 0101 080a 1859 7530        .............Yu0
0x0030   1859 7530 3030 3030 3030 3034 2055 4944        .Yu000000004.UID
0x0040   2053 4f52 5420 2841 5252 4956 414c 2920        .SORT.(ARRIVAL).
0x0050   5553 2d41 5343 4949 2041 4c4c 2053 5542        US-ASCII.ALL.SUB
0x0060   4a45 4354 205b 696d 705d 0d0a                  JECT.[imp]..

0x0000   4500 006b fd98 4000 4006 3524 d81b abcc        E..k..@.@.5$....
0x0010   d81b abcc 008f 8f19 23c5 8b01 236a c558        ........#...#j.X
0x0020   8018 7fff d32b 0000 0101 080a 1859 7530        .....+.......Yu0
0x0030   1859 7530 3030 3030 3030 3034 204e 4f20        .Yu000000004.NO.
0x0040   4572 726f 7220 696e 2049 4d41 5020 636f        Error.in.IMAP.co
0x0050   6d6d 616e 6420 7265 6365 6976 6564 2062        mmand.received.b
0x0060   7920 7365 7276 6572 2e0d 0a                    y.server...

Mulberry also does not quote strings. I get exactly the same problem and 
exactly the same error. Mulberry sends a much simpler search, something 
like SEARCH SUBJECT [imp], instead of the UID SORT that c-client (or imp) 
is sending.

Jeff

-- 
Jeff Tucker
Williams Consulting, Inc.
jefft@wciatl.com