A NOTE has been added to this issue. ====================================================================== http://www.dbmail.org/mantis/view.php?id=474 ====================================================================== Reported By: lkneschke Assigned To: ====================================================================== Project: DBMail Issue ID: 474 Category: IMAP daemon Reproducibility: always Severity: major Priority: normal Status: new target: ====================================================================== Date Submitted: 14-Dec-06 10:18 CET Last Modified: 23-Jan-07 04:42 CET ====================================================================== Summary: LIST with other users folder not working correctly Description: Have a look at this imap conversation:
all folders i have access too a002 list "" "*" * LIST (\hasnochildren) "/" "#Users/cweiss/INBOX" * LIST (\hasnochildren) "/" "Drafts" * LIST (\hasnochildren) "/" "INBOX" * LIST (\hasnochildren) "/" "Junk" * LIST (\haschildren) "/" "L&APY-sungen" * LIST (\hasnochildren) "/" "L&APY-sungen/H&AOQ-userchen" * LIST (\hasnochildren) "/" "L&APY-sungen/Schl&APYA3w-er" * LIST (\haschildren) "/" "Misc" * LIST (\hasnochildren) "/" "Misc/H&AOQ-userchen" * LIST (\hasnochildren) "/" "Misc/Hause" * LIST (\hasnochildren) "/" "Misc/M&AOQ-us&AN8-en" * LIST (\hasnochildren) "/" "Sent" * LIST (\hasnochildren) "/" "Templates" * LIST (\hasnochildren) "/" "Trash" a002 OK LIST completed info about one folder a004 list "" "Misc/H&AOQ-userchen" * LIST (\hasnochildren) "/" "Misc/H&AOQ-userchen" a004 OK LIST completed info about another users folder a004 list "" "#Users/cweiss/INBOX" a004 OK LIST completed As you can see in the first query, the folder exists. But if you have a look at the logfile, you will see what goes wrong. Dec 12 18:12:20 ubuntu dbmail/imap4d[31256]: Info:[imap] imap4.c,IMAPClientHandler(+193): COMMAND: [a004 list "" "#Users/cweiss/INBOX"] Dec 12 18:12:20 ubuntu dbmail/imap4d[31256]: Debug:[imapsession] dbmail-imapsession.c,build_args_array_ext(+2128): arg[0]: '' Dec 12 18:12:20 ubuntu dbmail/imap4d[31256]: Debug:[imapsession] dbmail-imapsession.c,build_args_array_ext(+2128): arg[1]: '#Users/cweiss/INBOX' Dec 12 18:12:20 ubuntu dbmail/imap4d[31256]: Info:[imap] imap4.c,IMAPClientHandler(+306): Executing command list... Dec 12 18:12:20 ubuntu dbmail/imap4d[31256]: Info:[imap] imapcommands.c,_ic_list(+706): search with pattern: [#Users/cweiss/INBOX] Dec 12 18:12:20 ubuntu dbmail/imap4d[31256]: Debug:[sql] dbmysql.c,db_query(+286): query [SELECT distinct(mbx.name), mbx.mailbox_idnr, mbx.owner_idnr FROM dbmail_mailboxes mbx LEFT JOIN dbmail_acl acl ON mbx.mailbox_idnr = acl.mailbox_id LEFT JOIN dbmail_users usr ON acl.user_id = usr.user_idnr WHERE mbx.name = '#Users/cweiss/INBOX' AND ((mbx.owner_idnr = 4) OR (acl.user_id = 4 AND acl.lookup_flag = 1) OR (usr.userid = 'anyone' AND acl.lookup_flag = 1))] Dec 12 18:12:20 ubuntu dbmail/imap4d[31256]: Info:[db] db.c,db_findmailbox_by_regex(+2726): did not find any mailboxes that match pattern. returning 0, nchildren = 0 Dec 12 18:12:20 ubuntu dbmail/imap4d[31256]: Debug:[imapsession] dbmail-imapsession.c,dbmail_imap_session_printf(+1295): RESPONSE: [a004 OK LIST completed^M ] Dec 12 18:12:20 ubuntu dbmail/imap4d[31256]: Info:[imap] imap4.c,IMAPClientHandler(+334): Finished command list [0] The sql query can not find the folder from other users. ====================================================================== ---------------------------------------------------------------------- aaron - 01-Jan-07 02:48 ---------------------------------------------------------------------- Ok, another problem is that it mailbox names are case sensitive through this code path: a06 list "drafts" "*" a06 OK LIST completed a05 list "Drafts" "*" * LIST (\hasnochildren) "/" "Drafts" a05 OK LIST completed I suspect that means it also fails to work with utf-7 names. ---------------------------------------------------------------------- aaron - 23-Jan-07 04:42 ---------------------------------------------------------------------- The patch changes behavior of the LIST operation to be case insensitive, and to handle namespaces in the search pattern. I am not sure if we actually want to be case insensitive for these lookups. We'll need some discussion on the mailing list. Issue History Date Modified Username Field Change ====================================================================== 14-Dec-06 10:18 lkneschke New Issue 01-Jan-07 02:47 aaron Note Added: 0001706 01-Jan-07 02:48 aaron Note Edited: 0001706 23-Jan-07 04:33 aaron File Added: bug474fix.diff 23-Jan-07 04:42 aaron Note Added: 0001771 ====================================================================== _______________________________________________ Dbmail-dev mailing list [email protected] http://twister.fastxs.net/mailman/listinfo/dbmail-dev
