Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DBMail: dev

[DBMail 0000978]: List command returns folder with \Noselect when it has no such flag saved

 

 

DBMail dev RSS feed   Index | Next | Previous | View Threaded


bugtrack at dbmail

Aug 7, 2013, 4:39 AM

Post #1 of 1 (16 views)
Permalink
[DBMail 0000978]: List command returns folder with \Noselect when it has no such flag saved

The following issue has been RESOLVED.
======================================================================
http://www.dbmail.org/mantis/view.php?id=978
======================================================================
Reported By: fabiangergely
Assigned To:
======================================================================
Project: DBMail
Issue ID: 978
Category: IMAP daemon
Reproducibility: always
Severity: minor
Priority: normal
Status: resolved
target:
Resolution: fixed
Fixed in Version: 3.2.0
======================================================================
Date Submitted: 26-Jul-12 17:18 CEST
Last Modified: 07-Aug-13 13:39 CEST
======================================================================
Summary: List command returns folder with \Noselect when it
has no such flag saved
Description:
If I create a specific hierarchy of folders (below), and
mailboxes_by_regex() returns matching folders in a given order (depends on
database, and the exact data), then the "target folder" will be returned
with the \Noselect flag, even though it does not have this flag saved in
the database.
This is reproducible just if I use the '%' wildcard.

Example:

.. list "Test another/" "%"
* LIST (\noselect \haschildren) "/" "Test another/test"
.. OK LIST completed
======================================================================

----------------------------------------------------------------------
(0003464) fabiangergely (reporter) - 26-Jul-12 17:45
http://www.dbmail.org/mantis/view.php?id=978#c3464
----------------------------------------------------------------------
The attached patch
(0001-IMAP-fix-unexpected-Noselect-in-list-command-respons.patch) is one
solution to the problem. It orders the folders returned by
dm_db.c/mailboxes_by_regex(), so that parent folders always appear before
their children. Then the bug cannot be reproduced.
An alternative solution would be to give folder names originating from
partial matches a lower "priority", so that they wouldn't mask out real
folders (with priority queue or two lists).



----------------------------------------------------------------------
(0003465) fabiangergely (reporter) - 31-Jul-12 17:32
http://www.dbmail.org/mantis/view.php?id=978#c3465
----------------------------------------------------------------------
The attached patch
(0001-IMAP-fix-hierarchy-elements-masking-out-real-folders.patch) is
another (in my opinion better) fix for the problem.
It creates two trees in the _ic_list_enter, one for found the real
folders, and one for found hierarchy elements. Then adds all found
hierarchy elements to found real folders (assuming they are not there
already). This way real folders get a higher priority, so hierarchy names
cannot "mask" them out.
The patch also includes a test suite written in Ruby, that should
reproduce the problem with unchanged C code (ie: the test should fail
then). Of course with the changes in the patch the test passes.

----------------------------------------------------------------------
(0003493) fabiangergely (reporter) - 27-Sep-12 12:54
http://www.dbmail.org/mantis/view.php?id=978#c3493
----------------------------------------------------------------------
Regarding the reproduction description, this sentence was improper: 'So it
will be possible to reproduce it with the "Test another/2012" folder.'. Of
course I was thinking about the "Test another/test" folder, because
subfolders for this folder appear earlier in the SQL results than the
folder itself.

----------------------------------------------------------------------
(0003502) fabiangergely (reporter) - 04-Oct-12 17:13
http://www.dbmail.org/mantis/view.php?id=978#c3502
----------------------------------------------------------------------
Our fork's (https://github.com/moveone/dbmail) m1 branch contains a rebased
version (with 9bed91b1, aka. origin/master~17; we could do just this due to
an error in master) of the patch. It has also been extended with Python
tests (testBug978() method in testimap.py).



Issue History
Date Modified Username Field Change
======================================================================
26-Jul-12 17:18 fabiangergely New Issue
26-Jul-12 17:18 fabiangergely File Added: 0001-Imapcommands.c-debugging.patch

26-Jul-12 17:40 fabiangergely File Added:
0001-IMAP-fix-unexpected-Noselect-in-list-command-respons.patch

26-Jul-12 17:44 fabiangergely Note Added: 0003464
26-Jul-12 17:45 fabiangergely Note Edited: 0003464
31-Jul-12 17:27 fabiangergely File Added:
0001-IMAP-fix-hierarchy-elements-masking-out-real-folders.patch

31-Jul-12 17:32 fabiangergely Note Added: 0003465
27-Sep-12 12:54 fabiangergely Note Added: 0003493
04-Oct-12 17:10 fabiangergely Note Added: 0003502
04-Oct-12 17:13 fabiangergely Note Edited: 0003502
07-Aug-13 13:39 paul Status new => resolved
07-Aug-13 13:39 paul Resolution open => fixed
07-Aug-13 13:39 paul Fixed in Version => 3.2.0
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev [at] dbmail
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

DBMail dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.