Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 30536 - c-client mail bug: incorrect behavior on folders with [brackets]
Summary: c-client mail bug: incorrect behavior on folders with [brackets]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-06 20:25 UTC by thegarbageman
Modified: 2004-01-06 05:54 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thegarbageman 2003-10-06 20:25:53 UTC
while developing a webmail application, I have encountered a problem in mod_php
when querying an imap folder for undeleted messages.  I get no results from
folders which contain [brackets] in the name.  I am under the impression php
just wraps the c-client library and that the mail_search_full() function is at
fault.

Reproducible: Always
Steps to Reproduce:
1. <?php $stream = @imap_open($server . $containsbrackets, $user, $pass,
OP_READONLY); ?>
2. <?php $msgs=imap_search($stream, 'UNDELETED'); ?>

Actual Results:  
$msgs == false;


Expected Results:  
returned an array of message header ids

mod_php compiled with the c-client library.  There are definitely messages in
the folder with brackets in the name.  Renaming the folder to not have brackets
allows the array to be returned.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-10-06 22:17:02 UTC
if you quote the brackets, is the expected result returned?
Comment 2 thegarbageman 2003-10-07 08:54:49 UTC
I am not sure precisely what you mean.  I have tried the following strings:

"{mail.xxxxxx.com:993/imap/ssl/novalidate-cert}INBOX.Lists.[gentoo]"
"{mail.xxxxxx.com:993/imap/ssl/novalidate-cert}INBOX.Lists.\"[\"gentoo\"]\""
"{mail.xxxxxx.com:993/imap/ssl/novalidate-cert}INBOX.Lists.\"[gentoo]\""
"{mail.xxxxxx.com:993/imap/ssl/novalidate-cert}INBOX.Lists.\\[gentoo\\]"

none of these work (these are actually just examples).
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-10-07 10:49:59 UTC
Try one like this:
"{mail.xxxxxx.com:993/imap/ssl/novalidate-cert}INBOX.Lists.\[gentoo\]"
Comment 4 thegarbageman 2003-10-07 11:09:42 UTC
I tried it.  No luck.  I also separately tried using the PHP function imap_utf7_encode()
on the connection string before passing it.  I didn't really think it would
help with these particular characters, and it didn't.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-10-25 22:56:46 UTC
ok, i confirm said bug exists now, and that it's not a php problem, but instead
one in c-client itself (I can produce the problem outside of PHP...).

I'll ask the c-client mailing list when I get a bit of time.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2004-01-05 15:56:43 UTC
does this bug still occur with the latest c-client/uw-imap ?
Comment 7 thegarbageman 2004-01-06 05:54:31 UTC
Everything is now working as expected.  I am using c-client-2002e.  Thank you for your assistance.